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

[PATCH v1 1/2] x86/viridian: Workaround Hyper-V GP fault writing to MSR


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Fri, 28 Aug 2026 14:11:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=hxvuCWrZRUBjgBVuR44jM6nAu6HqPQeFkqd4ySn6LHQ=; b=sY/w7tip3XAoeWZ1Ugyi5yEcT9qK2sgA/qC5yodvsmEDG5zJfK/4Usu5lpaUjh8Q1D26Y5ecVyNRi5OXGN/q7QVvdE3WwclvUaqsAD0OwbxkraoanN1bbArT5mYlLOKga89v558NeuMtHzHM1yfL/Hi1TQik944r2SmxtPl9vGrobAh9g9/FjvuAJi0gebbmDhU2NHTL/F5A3ASnvB9HUwnAuiiWNx9VqJAv9043HYyL+li0ZQovr4rvMSQ0t/DtLsPQySQvzW6nzkjbXlVffmmySaEKFnE+DUg577jB4T9CNc26W1EWld+wNAvyZCNJ/r9lNAVB8KzjOCV2wSZIyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VQnD3oB06ogLrb+GpEDJD4cQ1eb3Mzy5JsqTnlqVe0i5J6rUUtAP5sjR/Hl43ZLaLi8CYNQdUG7tp5smLl/AZETUJ5IZRnW/y8jtSKAAheRWSvE46pn5Dc7Y9U6IdJ0dAfSkKYzxU4/Qc/UBZNyC79HEpvzzGXW25EbuLaBPTNnvdlOs9tzOSuLIJopYhYWRItXphRzkk++/UGfsAuwhIy2Nd0M5rzYbnF9XV1eoLWaMTbCvWOUKVTR14sLJk6IWFOgIW++qpmj1vZs4IQBjCct4m2NugSEFJi18ij5FXUOHqSTn1vWnalRl124dpWMw0M8ovbct+y2+vkYzZfFV4g==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Fri, 28 Aug 2026 13:12:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The Viridian spec requires the vector to be >= 0x10 when writing to the
SINTx MSR, otherwise it should #GP fault.
The spec-defined initial value is 0x0000000000010000, i.e. the vector is
0. On startup, for some reason Windows 11 Hyper-V tries to set the MSR to
the spec-defined initial value and since the vector is 0, it GP faults.
To workaround this, treat the write as a no-op if the value is
unchanged.

Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
---
 xen/arch/x86/hvm/viridian/synic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/hvm/viridian/synic.c 
b/xen/arch/x86/hvm/viridian/synic.c
index e6cba7548f1b..37ddff201a6b 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -157,6 +157,9 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, 
uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_synic) )
             return X86EMUL_EXCEPTION;
 
+        if ( val == vs->as_uint64 )
+            break;
+
         /* Vectors must be in the range 0x10-0xff inclusive */
         new.as_uint64 = val;
         if ( new.vector < 0x10 )
-- 
2.53.0




 


Rackspace

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