[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/smp: check APIC ID on AP bringup
commit 3d05407025ed1f83f492f81ba8175fa26b1e2fb3 Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Fri Dec 20 16:28:27 2019 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Dec 20 16:28:27 2019 +0100 x86/smp: check APIC ID on AP bringup Check that the processor to be woken up APIC ID is addressable in the current APIC mode. Note that in practice systems with APIC IDs > 255 should already have x2APIC enabled by the firmware, and hence this is mostly a safety belt. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/smpboot.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index fa691b6ba0..e439845802 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -1317,6 +1317,14 @@ int __cpu_up(unsigned int cpu) if ( (apicid = x86_cpu_to_apicid[cpu]) == BAD_APICID ) return -ENODEV; + if ( (!x2apic_enabled && apicid >= APIC_ALL_CPUS) || + (!iommu_intremap && (apicid >> 8)) ) + { + printk("Unsupported: APIC ID %#x in xAPIC mode w/o interrupt remapping\n", + apicid); + return -EINVAL; + } + if ( (ret = do_boot_cpu(apicid, cpu)) != 0 ) return ret; -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |