[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN][PATCH v2] xen: make VMTRACE support optional
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
- Date: Thu, 13 Nov 2025 22:40:21 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RQzzAAYw9zTW2yfYSVKXWyR8tCZ+w6FInkL57yJpFYM=; b=klKOiS11Wm8u6P8xXku3ZhrHvVaBSfbL1bX43VIvXXG7HyZgUcfJSb4lKvJey0z8ANc3uHettYYbg9SEaVIJRNBNetPWbAJugXMck7qd6yLTJ/LD8rCXL/kiPYhtAVr4RzY2RMd5jkACpMfy57sraCjoj78f1SCdZ4kg23lwLIBI4pg4JrTUK3A4Oxy/qZDXaoS7yUISXJ+i5i4x03GAMs1+QhUMPHPqBNqaTVXII1PHAUcfdmPxmOO/hsnDGVfaon5WgDMStCy5e84T/YlkSD8TiyyXkHsgg4zdmjPlJFs/q36fdn8qt1nN+bfqg6IzrGyhhHVDTucHcXqaryh6yw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZKOhSGYorot0Ajb9JiWaWhGkmiyArQFTFt7RQlwNL50xRt2mANQvML33aOSS7UcG9ka+pAIsU1Ixm+QuG59VGMmv/B2G9EFujNqeK15gr6luGceQo6VADkxNt1r5NaMhv9iZt5QzDOYCCPx/KBHKiFhFq/Fqqfjz38EqbCrSqJiU4EOVokxQ7Gw/xlmsVEGRXKkAACw61ZymGVrjS2i3eJyFcRwwXK8TWphuyjnacVnrV4wfnoz8js9/vVzUTQaZR30HWqmbUuYDAwJW9NVUmkXSwGmRCe3LMsjp1qCpA6cpusQs07LBIckj3S5PWLKLMmeWIXw/t2UyKajpgUsbOw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 13 Nov 2025 20:40:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.11.25 14:58, Jan Beulich wrote:
On 13.11.2025 13:53, Grygorii Strashko wrote:
On 13.11.25 10:36, Jan Beulich wrote:
On 12.11.2025 21:24, Grygorii Strashko wrote:
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -307,6 +307,7 @@ static int vmx_init_vmcs_config(bool bsp)
rdmsrl(MSR_IA32_VMX_MISC, _vmx_misc_cap);
/* Check whether IPT is supported in VMX operation. */
+#ifdef CONFIG_VMTRACE
if ( bsp )
vmtrace_available = cpu_has_proc_trace &&
(_vmx_misc_cap & VMX_MISC_PROC_TRACE);
@@ -317,6 +318,7 @@ static int vmx_init_vmcs_config(bool bsp)
smp_processor_id());
return -EINVAL;
}
+#endif
Initially I was inclined to ask for use of IS_ENABLED() here, but that wouldn't
work since vmtrace_available isn't an lvalue when VMTRACE=n. Hence why generally
I think it is better to check the particular identifier in such cases, rather
than the original CONFIG_* (i.e. "#ifndef vmtrace_available" here). I'm not
going to insist though, as I expect opinions may differ on this matter.
Yep. assignment required ifdef wrapping.
"#ifndef vmtrace_available" will not work out of the box as there are
"if (vmtrace_available)" in code. So, can't just "not define"/undef
"vmtrace_available".
I meant this just for the case here, though. Elsewhere you want to stick to
checking CONFIG_VMTRACE.
I'd prefer to keep this part as is. Please tell me if you insist.
--
Best regards,
-grygorii
|