From 85f95eed7bed299fcaa37b18f2a4de8bd43c80ae Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Wed, 30 Sep 2026 13:00:03 +0200 Subject: [PATCH] x86/viridian: Workaround Hyper-V GP fault writing to MSR 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 0x10000, 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. Fix this by doing as Hyper-V does and only fault if the SINT is unmasked. Signed-off-by: Ross Lagerwall Reviewed-by: Jan Beulich master commit: 33829ead9aedfb21b4103c7ebf1fcc497227a77a master date: 2026-09-21 10:10:22 +0200 --- xen/arch/x86/hvm/viridian/synic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index e6cba7548f..3125ccca0d 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -157,9 +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; - /* Vectors must be in the range 0x10-0xff inclusive */ + /* + * Vectors must be in the range 0x10-0xff inclusive unless the vector + * is masked since Windows 11 Hyper-V (26H1) has been seen to write + * this MSR to its default value, despite not being a spec compliant + * value. + */ new.as_uint64 = val; - if ( new.vector < 0x10 ) + if ( new.vector < 0x10 && !new.masked ) return X86EMUL_EXCEPTION; /*