Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1434683
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH linux v2 9/9] xen/pvhvm: run xen_vcpu_setup() for the boot CPU |
| Date | 2016-06-30 18:00 +0200 |
| Message-ID | <rPMxI-2YZ-35@gated-at.bofh.it> (permalink) |
| References | <rPMxH-2YZ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Historically we didn't call VCPUOP_register_vcpu_info for CPU0 for PVHVM
guests (while we had it for PV and ARM guests). This is usually fine as we
can use vcpu info in the sared_info page but when we try booting on a vCPU
with Xen's vCPU id > 31 (e.g. when we try to kdump after crashing on this
CPU) we're not able to boot. Switch to always doing
VCPUOP_register_vcpu_info for the boot CPU.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/xen/enlighten.c | 2 +-
arch/x86/xen/smp.c | 7 +++++++
arch/x86/xen/xen-ops.h | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index bfdd51b..7c91631 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -184,7 +184,7 @@ static void clamp_max_cpus(void)
#endif
}
-static void xen_vcpu_setup(int cpu)
+void xen_vcpu_setup(int cpu)
{
struct vcpu_register_vcpu_info info;
int err;
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index a3118f2..0b4d04c 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -322,6 +322,13 @@ static void __init xen_smp_prepare_boot_cpu(void)
xen_filter_cpu_maps();
xen_setup_vcpu_info_placement();
}
+
+ /*
+ * Setup vcpu_info for boot CPU.
+ */
+ if (xen_hvm_domain())
+ xen_vcpu_setup(0);
+
/*
* The alternative logic (which patches the unlock/lock) runs before
* the smp bootup up code is activated. Hence we need to set this up
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 4140b07..3cbce3b 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -76,6 +76,7 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
bool xen_vcpu_stolen(int vcpu);
+void xen_vcpu_setup(int cpu);
void xen_setup_vcpu_info_placement(void);
#ifdef CONFIG_SMP
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:00 +0200 [PATCH linux v2 9/9] xen/pvhvm: run xen_vcpu_setup() for the boot CPU Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:00 +0200 [PATCH linux v2 4/9] x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:00 +0200 [PATCH linux v2 6/9] xen/events: use xen_vcpu_id mapping in events_base Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:00 +0200 [PATCH linux v2 8/9] xen/evtchn: use xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:00 +0200 [PATCH linux v2 2/9] x86/acpi: store ACPI ids from MADT for future usage Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:10 +0200 [PATCH linux v2 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-30 18:10 +0200
csiph-web