All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs
@ 2016-06-30 15:56 Vitaly Kuznetsov
  2016-06-30 15:56 ` [PATCH linux v2 1/9] x86/xen: update cpuid.h from Xen-4.7 Vitaly Kuznetsov
                   ` (17 more replies)
  0 siblings, 18 replies; 44+ messages in thread
From: Vitaly Kuznetsov @ 2016-06-30 15:56 UTC (permalink / raw)
  To: xen-devel
  Cc: linux-kernel, x86, Stefano Stabellini, Boris Ostrovsky,
	David Vrabel, Juergen Gross, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Jan Beulich, Andrew Cooper

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 we
need to have a mapping between Linux's and Xen's vCPU ids.

This series solves the issue for x86 PVHVM guests. PV guests don't (and
probably won't) support kdump so I always assume Xen's vCPU id == Linux's
vCPU id. ARM guests will probably need to get proper mapping once we start
supporting kexec/kdump there.

Changes since v1:
- "x86/acpi: store ACPI ids from MADT for future usage" patch added.
- Use ACPI ids instead of vLAPIC ids/2 [Andrew Cooper, Jan Beulich]
- Introduce xen_vcpu_nr() helper [David Vrabel].
- Modify all callers of HYPERVISOR_vcpu_op() instead of modifying
  HYPERVISOR_vcpu_op() [David Vrabel]

Vitaly Kuznetsov (9):
  x86/xen: update cpuid.h from Xen-4.7
  x86/acpi: store ACPI ids from MADT for future usage
  xen: introduce xen_vcpu_id mapping
  x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op
  x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to the
    shared_info page
  xen/events: use xen_vcpu_id mapping in events_base
  xen/events: fifo: use xen_vcpu_id mapping
  xen/evtchn: use xen_vcpu_id mapping
  xen/pvhvm: run xen_vcpu_setup() for the boot CPU

 arch/arm/xen/enlighten.c         | 13 +++++++++++-
 arch/x86/include/asm/cpu.h       |  1 +
 arch/x86/include/asm/smp.h       |  2 ++
 arch/x86/include/asm/xen/cpuid.h |  5 ++++-
 arch/x86/kernel/acpi/boot.c      | 16 ++++++++++----
 arch/x86/kernel/apic/apic.c      |  2 ++
 arch/x86/kernel/setup_percpu.c   |  3 +++
 arch/x86/xen/enlighten.c         | 45 +++++++++++++++++++++++++++++++---------
 arch/x86/xen/irq.c               |  3 ++-
 arch/x86/xen/smp.c               | 18 +++++++++++-----
 arch/x86/xen/time.c              | 18 ++++++++++------
 arch/x86/xen/xen-ops.h           |  1 +
 drivers/xen/events/events_base.c | 13 ++++++------
 drivers/xen/events/events_fifo.c |  2 +-
 drivers/xen/evtchn.c             |  3 ++-
 drivers/xen/time.c               |  2 +-
 include/xen/xen-ops.h            |  6 ++++++
 17 files changed, 116 insertions(+), 37 deletions(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 44+ messages in thread
* [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs
@ 2016-06-30 15:56 Vitaly Kuznetsov
  0 siblings, 0 replies; 44+ messages in thread
From: Vitaly Kuznetsov @ 2016-06-30 15:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Stefano Stabellini, Andrew Cooper, x86,
	linux-kernel, Ingo Molnar, David Vrabel, Jan Beulich,
	H. Peter Anvin, Boris Ostrovsky, Thomas Gleixner

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 we
need to have a mapping between Linux's and Xen's vCPU ids.

This series solves the issue for x86 PVHVM guests. PV guests don't (and
probably won't) support kdump so I always assume Xen's vCPU id == Linux's
vCPU id. ARM guests will probably need to get proper mapping once we start
supporting kexec/kdump there.

Changes since v1:
- "x86/acpi: store ACPI ids from MADT for future usage" patch added.
- Use ACPI ids instead of vLAPIC ids/2 [Andrew Cooper, Jan Beulich]
- Introduce xen_vcpu_nr() helper [David Vrabel].
- Modify all callers of HYPERVISOR_vcpu_op() instead of modifying
  HYPERVISOR_vcpu_op() [David Vrabel]

Vitaly Kuznetsov (9):
  x86/xen: update cpuid.h from Xen-4.7
  x86/acpi: store ACPI ids from MADT for future usage
  xen: introduce xen_vcpu_id mapping
  x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op
  x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to the
    shared_info page
  xen/events: use xen_vcpu_id mapping in events_base
  xen/events: fifo: use xen_vcpu_id mapping
  xen/evtchn: use xen_vcpu_id mapping
  xen/pvhvm: run xen_vcpu_setup() for the boot CPU

 arch/arm/xen/enlighten.c         | 13 +++++++++++-
 arch/x86/include/asm/cpu.h       |  1 +
 arch/x86/include/asm/smp.h       |  2 ++
 arch/x86/include/asm/xen/cpuid.h |  5 ++++-
 arch/x86/kernel/acpi/boot.c      | 16 ++++++++++----
 arch/x86/kernel/apic/apic.c      |  2 ++
 arch/x86/kernel/setup_percpu.c   |  3 +++
 arch/x86/xen/enlighten.c         | 45 +++++++++++++++++++++++++++++++---------
 arch/x86/xen/irq.c               |  3 ++-
 arch/x86/xen/smp.c               | 18 +++++++++++-----
 arch/x86/xen/time.c              | 18 ++++++++++------
 arch/x86/xen/xen-ops.h           |  1 +
 drivers/xen/events/events_base.c | 13 ++++++------
 drivers/xen/events/events_fifo.c |  2 +-
 drivers/xen/evtchn.c             |  3 ++-
 drivers/xen/time.c               |  2 +-
 include/xen/xen-ops.h            |  6 ++++++
 17 files changed, 116 insertions(+), 37 deletions(-)

-- 
2.5.5


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2016-07-26  8:28 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 15:56 [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 1/9] x86/xen: update cpuid.h from Xen-4.7 Vitaly Kuznetsov
2016-06-30 15:56 ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 2/9] x86/acpi: store ACPI ids from MADT for future usage Vitaly Kuznetsov
2016-06-30 15:56   ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov
2016-06-30 15:56   ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 4/9] x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op Vitaly Kuznetsov
2016-06-30 15:56 ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 5/9] x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to the shared_info page Vitaly Kuznetsov
2016-06-30 15:56   ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 6/9] xen/events: use xen_vcpu_id mapping in events_base Vitaly Kuznetsov
2016-06-30 15:56 ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 7/9] xen/events: fifo: use xen_vcpu_id mapping Vitaly Kuznetsov
2016-06-30 15:56   ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 8/9] xen/evtchn: " Vitaly Kuznetsov
2016-06-30 15:56 ` Vitaly Kuznetsov
2016-06-30 15:56 ` [PATCH linux v2 9/9] xen/pvhvm: run xen_vcpu_setup() for the boot CPU Vitaly Kuznetsov
2016-06-30 15:56 ` Vitaly Kuznetsov
2016-07-25  9:17 ` [PATCH linux v2 0/9] xen: pvhvm: support bootup on secondary vCPUs Vitaly Kuznetsov
2016-07-25  9:17 ` Vitaly Kuznetsov
2016-07-25 12:38 ` David Vrabel
2016-07-25 12:38 ` [Xen-devel] " David Vrabel
2016-07-25 13:17   ` Julien Grall
2016-07-25 13:17   ` [Xen-devel] " Julien Grall
2016-07-25 13:39     ` Vitaly Kuznetsov
2016-07-25 13:39     ` [Xen-devel] " Vitaly Kuznetsov
2016-07-25 14:01       ` Julien Grall
2016-07-25 14:09         ` David Vrabel
2016-07-25 14:09         ` David Vrabel
2016-07-25 14:19         ` [Xen-devel] " Vitaly Kuznetsov
2016-07-25 19:18           ` Stefano Stabellini
2016-07-26  8:28             ` Vitaly Kuznetsov
2016-07-26  8:28             ` [Xen-devel] " Vitaly Kuznetsov
2016-07-25 19:18           ` Stefano Stabellini
2016-07-25 14:19         ` Vitaly Kuznetsov
2016-07-25 21:37         ` [Xen-devel] " Stefano Stabellini
2016-07-25 21:37         ` Stefano Stabellini
2016-07-25 14:01       ` Julien Grall
2016-07-25 13:43     ` [Xen-devel] " David Vrabel
2016-07-25 21:16       ` Stefano Stabellini
2016-07-25 21:16       ` [Xen-devel] " Stefano Stabellini
2016-07-25 13:43     ` David Vrabel
2016-06-30 15:56 Vitaly Kuznetsov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.