Skip to content

Commit

Permalink
x86/xen: mark boot CPU of PV guest in MSR_IA32_APICBASE
Browse files Browse the repository at this point in the history
Recent topology checks of the x86 boot code uncovered the need for
PV guests to have the boot cpu marked in the APICBASE MSR.

Fixes: 9d22c96 ("x86/topology: Handle bogus ACPI tables correctly")
Reported-by: Niels Dettenbach <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
  • Loading branch information
jgross1 committed Oct 8, 2024
1 parent 9af4821 commit bf56c41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/xen/enlighten_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,10 @@ static u64 xen_do_read_msr(unsigned int msr, int *err)
switch (msr) {
case MSR_IA32_APICBASE:
val &= ~X2APIC_ENABLE;
if (smp_processor_id() == 0)
val |= MSR_IA32_APICBASE_BSP;
else
val &= ~MSR_IA32_APICBASE_BSP;
break;
}
return val;
Expand Down

0 comments on commit bf56c41

Please sign in to comment.