[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/3] x86/viridian: Workaround Hyper-V GP fault writing to MSR
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Date: Fri, 4 Sep 2026 15:15:14 +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=oAWojgnc1PX0meqiqPkIfh9aSER1BfswxCr1QfPRO50=; b=XWRbd8I9we6rpB0G8VsRD4ULdf5jX7k6RSDRYc+ld6AA6ET3jHLxE6ayk2qye0cv0PLluJWESFDRfAifqpFs6/iue/Ow8CDgLddQeIGHgoX6oDsNPYTUo1C9OV2GYUtXVb+4AqijVHhqwH7nVqzOTea3bKkeGB3pw8SmfZsp+NaM091sY2ohDFa96GXbjEfB8qWLoIXKzlOIHiMq37LL+Ovba6dLFUBCmHDDE+BwSNfEJVaobOnCFLjqJSFfRuH+1isPuxA1mL2LGXuBD9OoeqTU1ziZTNiBqyPqU9cKW9omdZ32JNjZEuhM4jXb9D3rmReEqKgWkwwMu462/cKQaA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KoUugHMxOf6kIbWoNQFPCSvhopmfSpF7maR+rCot5xxSMWR/LxhEKDDr/19352ACE9TA/y2MRIunoflOELasi2YGaD0/3YwwAbDPhmeCoOw0gR3Na/54Gk6dz7zPFoHEEka4DQV4ZiapzU1BA1th/HItvzO9ykipPvw7/YRjwOl2UIuHisKXbNEO8ZdKxsnanTl+7fed+9rzV7ZOxyD9RWaCeV1HuvsDgKA7N1oyigWT3PzAEceV+xR1EJGssaOT+5nwZzK7+owV1w0LfS1vVpZZtomOSJz6ZALJMKJy5nZwn9o4ytApV1s48i+Q+nKuu6lUii0EAikoHClQ1KyBcg==
- 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, 04 Sep 2026 14:15:38 +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>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
In v2: Added a comment to clarify
xen/arch/x86/hvm/viridian/synic.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/arch/x86/hvm/viridian/synic.c
b/xen/arch/x86/hvm/viridian/synic.c
index e6cba7548f1b..75b004440e58 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -157,6 +157,14 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx,
uint64_t val)
if ( !(viridian_feature_mask(d) & HVMPV_synic) )
return X86EMUL_EXCEPTION;
+ /*
+ * Windows 11 Hyper-V (26H1) has been seen to write this MSR to
+ * its default value, despite not being a spec compliant value.
+ * Tolerate writes which have no change in value.
+ */
+ 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
|