]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: introduce xen_vcpu_id mapping
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 30 Jun 2016 15:56:37 +0000 (17:56 +0200)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:02:08 +0000 (04:02 -0400)
commit3b42f4a8aee6fb24d9851bda2c3514d9f9f43e0d
tree89ac36881a2a0e3b053b47e9c9e692e745650665
parent85925dcc778d6e1575eea7c0385cdd799eba3d8f
xen: introduce xen_vcpu_id mapping

It may happen that Xen's and Linux's ideas of vCPU id diverge. In
particular, when we crash on a secondary vCPU we may want to do kdump
and unlike plain kexec where we do migrate_to_reboot_cpu() we try
booting on the vCPU which crashed. This doesn't work very well for
PVHVM guests as we have a number of hypercalls where we pass vCPU id
as a parameter. These hypercalls either fail or do something
unexpected.

To solve the issue introduce percpu xen_vcpu_id mapping. ARM and PV
guests get direct mapping for now. Boot CPU for PVHVM guest gets its
id from CPUID. With secondary CPUs it is a bit more
trickier. Currently, we initialize IPI vectors before these CPUs boot
so we can't use CPUID. Use ACPI ids from MADT instead.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 88e957d6e47f1232ad15b21e54a44f1147ea8c1b)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

 Conflicts:
arch/arm/xen/enlighten.c
arch/arm/xen/enlighten.c
arch/x86/xen/enlighten.c
include/xen/xen-ops.h