[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN][PATCH] xen: make VMTRACE support optional


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Fri, 7 Nov 2025 17:47:40 +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=/wYgZ5ceYs3bI4jfU+7Qhn95e1/3T87DUOQUeA9mjhw=; b=Uke7G+gPib11Ayn3adzeXyIyRIwZNafm2neM4OAtUFbka6BrjUopwgII+N152JSg3n6Le4m+iNA2akcb4P+VUNl+1gE6cgT/A+EEYH/Eao3gJrtZJLqxPyzqEj4KcaZMqrvL7XZj0o0V6U/nArZ9qGqfiyCjbWL7WPpweHbyMatJ+qJ2zRdpcZ2tNthXY5UlDwJ4GXrlGTM+NCiWovoK9XVQQYuRzZ6NQAvU49Z3sluXic0zLer4ZIEglWUxr/UnjDu7CfbuKcA93JS00XGCM3dfTfQuyktfieQvHuUWvVoIvpuxAPIzUY7+HIo9o8dVx/iwk4XYYRyuvWTk0+n2rA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aPm0BwzFmqeLjFd0+QQxaCYD8IGtuQ5thNXGzLJxy7c3J5M01HrHdV/3cIlPHIpdnf2EbzJcCdZGEvqYqPPf6bKc112TQ7UkSIdaDOyhNHg9uvSEP5PLVlk8LwJbBrDRRA8iEUFOJwSaz0w/qRzDUzOk/mQRYMRjyUr8gY06fQRFTe/+YkFkUcOEmVYriLH1xEhJkLCIJF98E30SnOt0ty3sj7lttBSqBsuMQDDzchYzVDpygpLR5WvyET6RbND/C88zXtVdeWQmgMd8xN5DneVkbVO7FmasI1jx2goO109LF5wR3bUm29qD8ZLOvp9fDxVC+bg8nLggGqltwPtNPQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 07 Nov 2025 15:47:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi

On 06.11.25 16:09, Jan Beulich wrote:
On 06.11.2025 14:50, Grygorii Strashko wrote:
On 06.11.25 14:00, Jan Beulich wrote:
On 31.10.2025 22:20, Grygorii Strashko wrote:
--- 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

Nit: s/date/data/

+      shared between Xen and domain
+      (see XENMEM_acquire_resource(XENMEM_resource_vmtrace_buf)).
+

I was actually meaning to ask that "VMX only" should somehow be mentioned here,
but then I noticed this is an arch-independent location.

Right, Arch code advertise VMTRACE support with HAS_VMTRACE.
In this particular case:
config INTEL_VMX
...
        select HAS_VMTRACE


I'm not quite sure we want it like this (just yet).

?

To rephrase the question: Are we expecting anything other than VMX to support
VMTRACE any time soon?


That's I do not know.

I assume your point is similar to what Teddy noted [1].

I think vmtrace code can be consolidate, but question is on what level(s):

only:
 xen/arch/x86/hvm/vmx/
 |- vmtrace.c

or:
 xen/arch/x86/hvm
 |- vmtrace.c
    <- vmtrace_alloc/free_buffer(), acquire_vmtrace_buf(), do_vmtrace_op()
 xen/arch/x86/hvm/vmx/
 |- vmtrace.c

it will require more work comparing to the current change.

[1] https://patchwork.kernel.org/comment/26637627/

--
Best regards,
-grygorii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.