[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/3] x86/viridian: Workaround Hyper-V GP fault writing to MSR
- To: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
- From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Date: Tue, 8 Sep 2026 10:26:48 +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=XG3OLYfogiIpj1NnZTtoGu3tcU7fDM3bO+5n2zd3SYs=; b=h4/EgOJTHyUH+j7KkZmuZi5K9WkACmrgDWvLPTaWzYFODEk4D9ZdiUqkBuG1rCYHmXZpImeXzx1BZmYfuhZ5WBRsD2ETUClbf8biIfWO4HgRUQ+4KUGmWSAfGWniGg2CS2jLZR+9hpw/06uwFYbyI21qbtbkEw1O/Wja3R40EPj+Shq9YqV47SH544VdKJZI7rRh1HFtl7UF8sc0uRRJ0QeffnOtx4etGWIjFH7YLynMK+xabTwwgshRziNW/uihhPHtwwywLEcJ66FAyQ063kBvI0AkpfANofd8QE9kIO8KjOEB7w+cPlcEYPFFyDf0muSBHVIU+uaxrLBR/NmGKQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j8/lBlIEjayLSegD7LL5zfUp9GIM/aRy/qo/uBBUFPvY70InDJEdQIXTs2KgZSt6C7zjZgHkBZBgoYvUIWOU8uouCvJJ5Q3SGWPIllQcNBwdckUokhLl6W98YYN0OX+WCAY8k+Uyj19NafZEMLbdbvo6y2NUVw8auLVOtYv/GN5FfEsJDbzBYxrLD+/q1jn0itnWLNKQBcdJI6YUcD+YhEWcPQ3yYRoObHVhC9FKs6hq8uBioq8OVstU8oh7vBqtTe5BwEHqlLW9KMfeGXBrnwXhV+VOn6h70qI8/FGKezcLQuprul9l4GXRjVXvl1QRQTKpuPNPLeGhOMAYby/wiA==
- 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: xen-devel@xxxxxxxxxxxxxxxxxxxx, Paul Durrant <paul@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
- Delivery-date: Tue, 08 Sep 2026 09:27:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 9/4/26 3:53 PM, Roger Pau Monné wrote:
On Fri, Sep 04, 2026 at 03:15:14PM +0100, Ross Lagerwall wrote:
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;
To make this a bit less workaround like, could we ignore the vector if
the SINT is masked (bit 16 set)?
Yes, that might be better and it appears to be what KVM does.
Ross
|