linux_dsm_epyc7002/arch/arm/xen
Vitaly Kuznetsov de75abbe01 arm/xen: fix SMP guests boot
Commit 88e957d6e4 ("xen: introduce xen_vcpu_id mapping") broke SMP
ARM guests on Xen. When FIFO-based event channels are in use (this is
the default), evtchn_fifo_alloc_control_block() is called on
CPU_UP_PREPARE event and this happens before we set up xen_vcpu_id
mapping in xen_starting_cpu. Temporary fix the issue by setting direct
Linux CPU id <-> Xen vCPU id mapping for all possible CPUs at boot. We
don't currently support kexec/kdump on Xen/ARM so these ids always
match.

In future, we have several ways to solve the issue, e.g.:

- Eliminate all hypercalls from CPU_UP_PREPARE, do them from the
  starting CPU. This can probably be done for both x86 and ARM and, if
  done, will allow us to get Xen's idea of vCPU id from CPUID/MPIDR on
  the starting CPU directly, no messing with ACPI/device tree
  required.

- Save vCPU id information from ACPI/device tree on ARM and use it to
  initialize xen_vcpu_id mapping. This is the same trick we currently
  do on x86.

Reported-by: Julien Grall <julien.grall@arm.com>
Tested-by: Wei Chen <Wei.Chen@arm.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2016-09-14 14:39:13 +01:00
..
efi.c ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services 2016-07-06 10:34:46 +01:00
enlighten.c arm/xen: fix SMP guests boot 2016-09-14 14:39:13 +01:00
grant-table.c arm/xen: remove duplicate arch_gnttab_init() function 2014-08-11 11:59:14 +01:00
hypercall.S arm/xen: add support for vm_assist hypercall 2016-07-06 10:42:14 +01:00
Makefile ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services 2016-07-06 10:34:46 +01:00
mm.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
p2m.c xen/grant-table: Make it running on 64KB granularity 2015-10-23 14:20:39 +01:00