mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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 <ross.lagerwall@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 33829ead9a
master date: 2026-09-21 10:10:22 +0200
This commit is contained in:
1 parent
2a797c6d6e
commit
85f95eed7b
1 file changed
+7
-2
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||