All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] PVH VCPU hotplug support
@ 2016-11-21 21:00 Boris Ostrovsky
  2016-11-21 21:00 ` [PATCH v3 01/11] x86/domctl: Add XEN_DOMCTL_set_avail_vcpus Boris Ostrovsky
                   ` (10 more replies)
  0 siblings, 11 replies; 51+ messages in thread
From: Boris Ostrovsky @ 2016-11-21 21:00 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, andrew.cooper3, ian.jackson, jbeulich, Boris Ostrovsky,
	roger.pau

This series adds support for ACPI-based VCPU hotplug for unprivileged
PVH guests.

New XEN_DOMCTL_set_avail_vcpus is introduced and is called during
guest creation and in response to 'xl vcpu-set' command. This domctl
updates GPE0's status and enable registers and sends an SCI to the
guest using (newly added) VIRQ_SCI.

I decided not to implement enforcement of avail_vcpus in this series
after I realized that HVM guests (just like PV) also start all
max_vcpus initially and then offline them
(firmware/hvmloader/smp.c:smp_initialise()). Together with the fact
that HVM hotplug only works in one direction (i.e. adding VCPUs but
not removing them) I think it's pretty clear that hotplug needs to be
fixed in general, and adding avail_vcpus enforcement should be part of that
fix.

I also didn't include changes to getdomaininfo to expanded with getting
number of available vcpus, mostly because I haven't needed it so
far. For live migration (where Andrew thought it might be needed) we
rely on xenstore's "cpu/available" value to keep hypervisor up-to-date
(see libxl__update_avail_vcpus_xenstore()) (I should say that I
haven't tested live migration, only save/restore but I think it's the
same codepath)

Boris Ostrovsky (11):
  x86/domctl: Add XEN_DOMCTL_set_avail_vcpus
  acpi: Define ACPI IO registers for PVH guests
  pvh: Set online VCPU map to avail_vcpus
  acpi: Make pmtimer optional in FADT
  acpi: Power and Sleep ACPI buttons are not emulated for PVH guests
  acpi: PVH guests need _E02 method
  pvh/ioreq: Install handlers for ACPI-related PVH IO accesses
  pvh/acpi: Handle ACPI accesses for PVH guests
  events/x86: Define SCI virtual interrupt
  pvh: Send an SCI on VCPU hotplug event
  docs: Describe PVHv2's VCPU hotplug procedure

 docs/misc/hvmlite.markdown            |  12 ++++
 tools/firmware/hvmloader/util.c       |   4 +-
 tools/flask/policy/modules/dom0.te    |   2 +-
 tools/flask/policy/modules/xen.if     |   4 +-
 tools/libacpi/build.c                 |   7 +++
 tools/libacpi/libacpi.h               |   2 +
 tools/libacpi/mk_dsdt.c               |  17 +++---
 tools/libacpi/static_tables.c         |  20 ++-----
 tools/libxc/include/xenctrl.h         |   5 ++
 tools/libxc/xc_domain.c               |  12 ++++
 tools/libxl/libxl.c                   |   7 +++
 tools/libxl/libxl_dom.c               |   7 +++
 tools/libxl/libxl_x86_acpi.c          |   6 +-
 xen/arch/arm/domain.c                 |   5 ++
 xen/arch/x86/domain.c                 |  16 ++++++
 xen/arch/x86/hvm/ioreq.c              | 103 ++++++++++++++++++++++++++++++++++
 xen/common/domctl.c                   |  26 +++++++++
 xen/common/event_channel.c            |   7 ++-
 xen/include/asm-x86/domain.h          |   1 +
 xen/include/asm-x86/hvm/domain.h      |   6 ++
 xen/include/public/arch-x86/xen-mca.h |   2 -
 xen/include/public/arch-x86/xen.h     |   7 ++-
 xen/include/public/domctl.h           |   9 +++
 xen/include/public/hvm/ioreq.h        |  25 +++++++++
 xen/include/xen/domain.h              |   1 +
 xen/include/xen/event.h               |   8 +++
 xen/include/xen/sched.h               |   6 ++
 xen/xsm/flask/hooks.c                 |   3 +
 xen/xsm/flask/policy/access_vectors   |   2 +
 29 files changed, 299 insertions(+), 33 deletions(-)

-- 
2.7.4


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

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

end of thread, other threads:[~2016-11-28 15:48 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-21 21:00 [PATCH v3 00/11] PVH VCPU hotplug support Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 01/11] x86/domctl: Add XEN_DOMCTL_set_avail_vcpus Boris Ostrovsky
2016-11-22 10:31   ` Jan Beulich
2016-11-22 10:39     ` Jan Beulich
2016-11-22 12:34       ` Boris Ostrovsky
2016-11-22 13:59         ` Jan Beulich
2016-11-22 14:37           ` Boris Ostrovsky
2016-11-22 15:07             ` Jan Beulich
2016-11-22 15:43               ` Boris Ostrovsky
2016-11-22 16:01                 ` Jan Beulich
     [not found]                   ` <a4ac4c28-833b-df5f-ce34-1fa72f7c4cd2@oracle.com>
2016-11-22 23:47                     ` Boris Ostrovsky
2016-11-23  8:09                       ` Jan Beulich
2016-11-23 13:33                         ` Boris Ostrovsky
2016-11-23 13:58                           ` Jan Beulich
2016-11-23 14:16                             ` Boris Ostrovsky
2016-11-25 18:16                               ` Boris Ostrovsky
2016-11-28  7:59                                 ` Jan Beulich
2016-11-22 12:19     ` Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 02/11] acpi: Define ACPI IO registers for PVH guests Boris Ostrovsky
2016-11-22 10:37   ` Jan Beulich
2016-11-22 12:28     ` Boris Ostrovsky
2016-11-22 14:07       ` Jan Beulich
2016-11-22 14:53         ` Boris Ostrovsky
2016-11-22 15:13           ` Jan Beulich
2016-11-22 15:52             ` Boris Ostrovsky
2016-11-22 16:02               ` Jan Beulich
2016-11-21 21:00 ` [PATCH v3 03/11] pvh: Set online VCPU map to avail_vcpus Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 04/11] acpi: Make pmtimer optional in FADT Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 05/11] acpi: Power and Sleep ACPI buttons are not emulated for PVH guests Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 06/11] acpi: PVH guests need _E02 method Boris Ostrovsky
2016-11-22  9:13   ` Jan Beulich
2016-11-22 20:20   ` Konrad Rzeszutek Wilk
2016-11-21 21:00 ` [PATCH v3 07/11] pvh/ioreq: Install handlers for ACPI-related PVH IO accesses Boris Ostrovsky
2016-11-22 11:34   ` Jan Beulich
2016-11-22 12:38     ` Boris Ostrovsky
2016-11-22 14:08       ` Jan Beulich
2016-11-28 15:16         ` Boris Ostrovsky
2016-11-28 15:48           ` Roger Pau Monné
2016-11-21 21:00 ` [PATCH v3 08/11] pvh/acpi: Handle ACPI accesses for PVH guests Boris Ostrovsky
2016-11-22 14:11   ` Paul Durrant
2016-11-22 15:01   ` Jan Beulich
2016-11-22 15:30     ` Boris Ostrovsky
2016-11-22 16:05       ` Jan Beulich
2016-11-22 16:33         ` Boris Ostrovsky
2016-11-21 21:00 ` [PATCH v3 09/11] events/x86: Define SCI virtual interrupt Boris Ostrovsky
2016-11-22 15:25   ` Jan Beulich
2016-11-22 15:57     ` Boris Ostrovsky
2016-11-22 16:07       ` Jan Beulich
2016-11-21 21:00 ` [PATCH v3 10/11] pvh: Send an SCI on VCPU hotplug event Boris Ostrovsky
2016-11-22 15:32   ` Jan Beulich
2016-11-21 21:00 ` [PATCH v3 11/11] docs: Describe PVHv2's VCPU hotplug procedure Boris Ostrovsky

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.