From: Roger Pau Monné Date: Wed, 14 Oct 2020 12:10:08 +0000 (+0200) Subject: x86/msr: handle IA32_THERM_STATUS X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1510 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=628055822452f8678c18193835fdc1e2c20d4d14;p=xen.git x86/msr: handle IA32_THERM_STATUS Windows 8 will attempt to read MSR_IA32_THERM_STATUS and panic if a #GP fault is injected as a result: vmx.c:3035:d8v0 RDMSR 0x0000019c unimplemented d8v0 VIRIDIAN CRASH: 3b c0000096 fffff8061de31651 fffff4088a613720 0 So handle the MSR and return 0 instead. Note that this is done on the generic MSR handler, and PV guest will also get 0 back when trying to read the MSR. There doesn't seem to be much value in handling the MSR for HVM guests only. Fixes: 84e848fd7a1 ('x86/hvm: disallow access to unknown MSRs') Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c index 81b34fb212..9c69ef8792 100644 --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -242,6 +242,12 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val) goto gp_fault; break; + case MSR_IA32_THERM_STATUS: + if ( cp->x86_vendor != X86_VENDOR_INTEL ) + goto gp_fault; + *val = 0; + break; + case MSR_X2APIC_FIRST ... MSR_X2APIC_LAST: if ( !is_hvm_domain(d) || v != curr ) goto gp_fault;