]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/vlapic: allow setting APIC_SPIV_FOCUS_DISABLED in x2APIC mode
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 22 Nov 2019 16:52:59 +0000 (17:52 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Nov 2019 16:52:59 +0000 (17:52 +0100)
Current code unconditionally prevents setting APIC_SPIV_FOCUS_DISABLED
regardless of the processor model, which is not correct according to
the specification.

This issue was discovered while trying to boot a pvshim with x2APIC
enabled.

Always allow setting APIC_SPIV_FOCUS_DISABLED: the local APIC
provided to guests is emulated by Xen, and as such doesn't depend on
the features found on the hardware processor. Note for example that
Xen offers x2APIC support to guests even when the underlying hardware
doesn't have such feature.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/hvm/vlapic.c

index 9466258d6f08aadf98bff2a8a1806cb587134fc7..b790ba6bbd6c249a682ea6b728e9a8654e1177c7 100644 (file)
@@ -993,6 +993,7 @@ int guest_wrmsr_x2apic(struct vcpu *v, uint32_t msr, uint64_t msr_content)
 
     case APIC_SPIV:
         if ( msr_content & ~(APIC_VECTOR_MASK | APIC_SPIV_APIC_ENABLED |
+                             APIC_SPIV_FOCUS_DISABLED |
                              (VLAPIC_VERSION & APIC_LVR_DIRECTED_EOI
                               ? APIC_SPIV_DIRECTED_EOI : 0)) )
             return X86EMUL_EXCEPTION;