Skip to content

Commit bf56c41

Browse files
committed
x86/xen: mark boot CPU of PV guest in MSR_IA32_APICBASE
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]>
1 parent 9af4821 commit bf56c41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/xen/enlighten_pv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,10 @@ static u64 xen_do_read_msr(unsigned int msr, int *err)
10321032
switch (msr) {
10331033
case MSR_IA32_APICBASE:
10341034
val &= ~X2APIC_ENABLE;
1035+
if (smp_processor_id() == 0)
1036+
val |= MSR_IA32_APICBASE_BSP;
1037+
else
1038+
val &= ~MSR_IA32_APICBASE_BSP;
10351039
break;
10361040
}
10371041
return val;

0 commit comments

Comments
 (0)