Skip to content

Commit

Permalink
x86/xen: use capabilities instead of fake cpuid values for x2apic
Browse files Browse the repository at this point in the history
When running as pv domain xen_cpuid() is being used instead of
native_cpuid(). In xen_cpuid() the x2apic feature is indicated as not
being present by special casing the related cpuid leaf.

Instead of delivering fake cpuid values clear the cpu capability bit
for x2apic instead.

Signed-off-by: Juergen Gross <[email protected]>
Reviewed-by: Boris Ostrovsky <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
  • Loading branch information
jgross1 committed May 2, 2017
1 parent ea01598 commit e657fcc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/xen/enlighten_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ static void __init xen_init_cpuid_mask(void)
unsigned int ax, bx, cx, dx;
unsigned int xsave_mask;

cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_X2APIC % 32));

ax = 1;
cx = 0;
cpuid(1, &ax, &bx, &cx, &dx);
Expand All @@ -309,6 +307,7 @@ static void __init xen_init_capabilities(void)
setup_clear_cpu_cap(X86_FEATURE_APERFMPERF);
setup_clear_cpu_cap(X86_FEATURE_MTRR);
setup_clear_cpu_cap(X86_FEATURE_ACC);
setup_clear_cpu_cap(X86_FEATURE_X2APIC);

if (!xen_initial_domain())
setup_clear_cpu_cap(X86_FEATURE_ACPI);
Expand Down

0 comments on commit e657fcc

Please sign in to comment.