linux_dsm_epyc7002/arch/x86/xen
Ankur Arora c9b5d98b25 xen/vcpu: Handle xen_vcpu_setup() failure in hotplug
The hypercall VCPUOP_register_vcpu_info can fail. This failure is
handled by making per_cpu(xen_vcpu, cpu) point to its shared_info
slot and those without one (cpu >= MAX_VIRT_CPUS) be NULL.

For PVH/PVHVM, this is not enough, because we also need to pull
these VCPUs out of circulation.

Fix for PVH/PVHVM: on registration failure in the cpuhp prepare
callback (xen_cpu_up_prepare_hvm()), return an error to the cpuhp
state-machine so it can fail the CPU init.

Fix for PV: the registration happens before smp_init(), so, in the
failure case we clamp setup_max_cpus and limit the number of VCPUs
that smp_init() will bring-up to MAX_VIRT_CPUS.
This is functionally correct but it makes the code a bit simpler
if we get rid of this explicit clamping: for VCPUs that don't have
valid xen_vcpu, fail the CPU init in the cpuhp prepare callback
(xen_cpu_up_prepare_pv()).

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
2017-06-13 16:10:55 +02:00
..
apic.c x86/xen: Fix APIC id mismatch warning on Intel 2017-01-29 18:59:16 -05:00
debugfs.c x86/xen: Audit and remove any unnecessary uses of module.h 2016-07-14 15:06:59 +02:00
debugfs.h debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
efi.c xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
enlighten_hvm.c xen/vcpu: Handle xen_vcpu_setup() failure in hotplug 2017-06-13 16:10:55 +02:00
enlighten_pv.c xen/vcpu: Handle xen_vcpu_setup() failure in hotplug 2017-06-13 16:10:55 +02:00
enlighten_pvh.c xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() 2017-05-02 11:17:39 +02:00
enlighten.c xen/vcpu: Handle xen_vcpu_setup() failure in hotplug 2017-06-13 16:10:55 +02:00
grant-table.c xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc() 2016-08-26 10:44:22 +01:00
irq.c x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op 2016-07-25 13:32:34 +01:00
Kconfig x86/xen: enable PVHVM-only builds 2017-05-02 11:10:16 +02:00
Makefile x86/xen: enable PVHVM-only builds 2017-05-02 11:10:16 +02:00
mmu_hvm.c x86/xen: split off mmu_hvm.c 2017-05-02 11:05:10 +02:00
mmu_pv.c xen: cleanup pvh leftovers from pv-only sources 2017-05-19 08:04:20 +02:00
mmu.c xen: make xen_flush_tlb_all() static 2017-05-19 08:04:25 +02:00
mmu.h x86/xen: Change __xen_pgd_walk() and xen_cleanmfnmap() to support p4d 2017-03-27 08:56:49 +02:00
multicalls.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pci-swiotlb-xen.c treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00
platform-pci-unplug.c xen/pvh: PVH guests always have PV devices 2017-02-07 08:07:01 -05:00
pmu.c xen: Make VPMU init message look less scary 2016-08-24 18:45:38 +01:00
pmu.h x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV 2017-05-02 11:09:28 +02:00
setup.c xen/x86: Remove PVH support 2017-02-07 08:07:01 -05:00
smp_hvm.c xen/pvh*: Support > 32 VCPUs at domain restore 2017-06-13 16:05:17 +02:00
smp_pv.c xen/x86: Call xen_smp_intr_init_pv() on BSP 2017-05-02 11:18:13 +02:00
smp.c x86/xen: split off smp_pv.c 2017-05-02 11:05:00 +02:00
smp.h x86/xen: split off smp_pv.c 2017-05-02 11:05:00 +02:00
spinlock.c locking/spinlocks/x86, paravirt: Remove paravirt_ticketlocks_enabled 2017-01-14 09:33:46 +01:00
suspend_hvm.c xen/pvh*: Support > 32 VCPUs at domain restore 2017-06-13 16:05:17 +02:00
suspend_pv.c x86/xen: split suspend.c for PV and PVHVM guests 2017-05-02 11:09:17 +02:00
suspend.c x86/xen: split suspend.c for PV and PVHVM guests 2017-05-02 11:09:17 +02:00
time.c xen/x86: Do not call xen_init_time_ops() until shared_info is initialized 2017-05-05 10:43:15 +02:00
trace.c xen: use generated hypervisor symbols in arch/x86/xen/trace.c 2015-03-16 14:49:13 +00:00
vdso.h
vga.c xen/vga: add the xen EFI video mode support 2012-09-24 09:28:57 -04:00
xen-asm_32.S x86/paravirt: Remove the unused irq_enable_sysexit pv op 2015-11-23 10:48:16 +01:00
xen-asm_64.S x86/asm/xen: Set ELF function type for xen_adjust_exception_frame() 2016-02-24 08:35:41 +01:00
xen-asm.h xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
xen-asm.S x86/asm/xen: Create stack frames in xen-asm.S 2016-02-24 08:35:42 +01:00
xen-head.S x86/xen: define startup_xen for XEN PV only 2017-05-02 11:09:37 +02:00
xen-ops.h xen/vcpu: Handle xen_vcpu_setup() failure in hotplug 2017-06-13 16:10:55 +02:00
xen-pvh.S xen/pvh: Bootstrap PVH guest 2017-02-07 08:07:01 -05:00