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

Re: [RESEND PATCH v2 1/3] x86/hvm: move hvm_shadow_handle_cd() to vmx code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Thu, 13 Nov 2025 15:25:49 +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=u34W0itE/so5UXnaNLLHFdfb+egyXWA9pu9/vH2ID2s=; b=OjWOwvOXZNxK4QCTGFds5oCtjF8qDUjNq+go8mUNzOCRLmhrUgF2435RYW7l6zruvpam2D1fPZPDq+mkUN2xhkhb3lrmPk3g1HDjyB3cUkEqjDxqWiOnL+TDBy3H6RCyi5L23seT2936l6pIE+LxzTiLf9X6LbAG+YXUTXKkvVWzOCAm2uoVzUIIXsUESErdt8ba/fVFC1YXXlF3wRe5e++SYJ/fXM+iuQimWYKmCrOBEaSDeGdiI07s0gqzNfamWZe/sfB0AwnQvCVSpTjfCdRGQuN1NfPFHBM9qZXUm1g4G7+aWtdc7ihs26DIWktM6+7V0IPKwJUzASNHRiiTOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XgoPIw22xj6XUAYkvp5NSkZ/mzqToPeUIOFVfLkNgOflfSfJoxQPCeVUddT+qnvcn3mLF8beIYhQoymju/Higip/isgx7ehgzMGI88Sr+XRUNQVFcFh47s1si4fjzDjMnVm9HIiGSMKu2P0fZyBiagZnuOu/moif0Y05dOlx20+S+ivf6yDd934Zu667JeoM23ztlJ/w+Fv2G18y7DSzQi2FdrW/0nZcJQcOp7Jj4jX4A5+8u87Gd9VEi9LVxMphgwvcNfBWeK6urOn++15Mptm++dw6zM1mSjZkaUPrYsAtIw7VtjJuwDcnEeNyI41VvmjcfqNmBP+sc26x3jB3jg==
  • 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>, Jason Andryuk <jason.andryuk@xxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 13 Nov 2025 13:26:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 13.11.25 13:19, Jan Beulich wrote:
On 13.11.2025 11:44, Jan Beulich wrote:
On 11.11.2025 21:10, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

Functions:
  hvm_shadow_handle_cd()
  hvm_set_uc_mode()
  domain_exit_uc_mode()
are used only by Intel VMX code, so move them to VMX code.

While here:
- minor format change in domain_exit_uc_mode()
- s/(0/1)/(false/true) for bool types
- use "struct domain *" as parameter in hvm_set_uc_mode()
- use "struct domain *d" as local var in hvm_shadow_handle_cd()

One more please:

@@ -1451,6 +1452,66 @@ static int cf_check vmx_get_guest_pat(struct vcpu *v, 
u64 *gpat)
      return 1;
  }
+/* Exit UC mode only if all VCPUs agree on MTRR/PAT and are not in no_fill. */
+static bool domain_exit_uc_mode(struct vcpu *v)
+{
+    struct domain *d = v->domain;
+    struct vcpu *vs;

const on all three pointer target types. Then, together with the function
prefix adjustment discussed on the other sub-thread,
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Seeing that the other two patches are ready to go in (again, once the tree is
fully open again), I might as well do these edits while committing. So long as
you agree, of course.

Of course I agree and will be infinitely grateful.

Thank you.

--
Best regards,
-grygorii




 


Rackspace

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