|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN][PATCH] xen: make VMTRACE support optional
On 03.11.25 11:47, Teddy Astie wrote: Le 31/10/2025 à 22:24, Grygorii Strashko a écrit :From: Grygorii Strashko <grygorii_strashko@xxxxxxxx> The VMTRACE feature depends on Platform/Arch HW and code support and now can be used only on x86 HVM with Intel VT-x (INTEL_VMX) enabled. This makes VMTRACE support optional by introducing two Kconfig options: - CONFIG_HAS_VMTRACE which allows Platform/Arch to advertise VMTRACE support readiness - CONFIG_VMTRACE to enable/disable the feature.I like the idea of making it optional since it's only used in specific contexts.Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx> --- Based on top of patch "domain: adjust soft-reset arch dependency" [1] [1] https://patchwork.kernel.org/project/xen-devel/patch/c9c8c9c6-a155-4986-bf77-5766cdcd6024@xxxxxxxx/ xen/Kconfig.debug | 15 +++++++++++++++ xen/arch/x86/domctl.c | 4 ++++ xen/arch/x86/hvm/Kconfig | 1 + xen/arch/x86/hvm/vmx/vmcs.c | 2 ++ xen/arch/x86/hvm/vmx/vmx.c | 10 ++++++++++ xen/arch/x86/include/asm/guest-msr.h | 2 ++ xen/arch/x86/include/asm/hvm/hvm.h | 9 +++++++++ xen/arch/x86/include/asm/hvm/vmx/vmcs.h | 2 ++ xen/arch/x86/mm/mem_sharing.c | 2 ++ xen/arch/x86/vm_event.c | 6 ++++-- xen/common/domain.c | 10 ++++++++++ xen/common/memory.c | 6 ++++++ xen/common/vm_event.c | 3 ++- xen/include/xen/domain.h | 4 ++++ xen/include/xen/sched.h | 4 ++++ 15 files changed, 77 insertions(+), 3 deletions(-) diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index d900d926c555..70ec4f0d14a5 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -155,4 +155,19 @@ config DEBUG_INFO "make install-xen" for installing xen.efi, stripping needs to be done outside the Xen build environment).+config HAS_VMTRACE+ bool + +config VMTRACE + bool "HW VM tracing support" + depends on HAS_VMTRACE + default y + help + Enables HW VM tracing support which allows to configure HW processor + features (vmtrace_op) to enable capturing information about software + execution using dedicated hardware facilities with minimal interference + to the software being traced. The trace date can be retrieved using buffer + shared between Xen and domain + (see XENMEM_acquire_resource(XENMEM_resource_vmtrace_buf)). + endmenu [...] diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c I assume you are asking for hvm_vmtrace_output_position() stub, Right? #endif } @@ -303,12 +305,12 @@ void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp) #endif }+#ifdef CONFIG_VMTRACE Are you thinking about: xen/common/ |- vmtrace.c xen/arch/x86/hvm/vmx/ |- vmtrace.c ? or smth else? [...] -- Best regards, -grygorii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |