All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] Add support for Mirror VM.
@ 2021-08-16 13:25 Ashish Kalra
  2021-08-16 13:26 ` [RFC PATCH 01/13] machine: Add mirrorvcpus=N suboption to -smp Ashish Kalra
                   ` (15 more replies)
  0 siblings, 16 replies; 102+ messages in thread
From: Ashish Kalra @ 2021-08-16 13:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: pbonzini, thomas.lendacky, brijesh.singh, ehabkost, mst,
	richard.henderson, jejb, tobin, dovmurik, frankeh, dgilbert, kvm

From: Ashish Kalra <ashish.kalra@amd.com>

This is an RFC series for Mirror VM support that are 
essentially secondary VMs sharing the encryption context 
(ASID) with a primary VM. The patch-set creates a new 
VM and shares the primary VM's encryption context
with it using the KVM_CAP_VM_COPY_ENC_CONTEXT_FROM capability.
The mirror VM uses a separate pair of VM + vCPU file 
descriptors and also uses a simplified KVM run loop, 
for example, it does not support any interrupt vmexit's. etc.
Currently the mirror VM shares the address space of the
primary VM. 

The mirror VM can be used for running an in-guest migration 
helper (MH). It also might have future uses for other in-guest
operations.

The mirror VM support is enabled by adding a mirrorvcpus=N
suboption to -smp, which also designates a few vcpus (normally 1)
to the mirror VM.

Example usage for starting a 4-vcpu guest, of which 1 vcpu is marked as
mirror vcpu.

    qemu-system-x86_64 -smp 4,mirrorvcpus=1 ...

Ashish Kalra (7):
  kvm: Add Mirror VM ioctl and enable cap interfaces.
  kvm: Add Mirror VM support.
  kvm: create Mirror VM and share primary VM's encryption context.
  softmmu/cpu: Skip mirror vcpu's for pause, resume and synchronization.
  kvm/apic: Disable in-kernel APIC support for mirror vcpu's.
  hw/acpi: disable modern CPU hotplug interface for mirror vcpu's
  hw/i386/pc: reduce fw_cfg boot cpu count taking into account mirror
    vcpu's.

Dov Murik (5):
  machine: Add mirrorvcpus=N suboption to -smp
  hw/boards: Add mirror_vcpu flag to CPUArchId
  hw/i386: Mark mirror vcpus in possible_cpus
  cpu: Add boolean mirror_vcpu field to CPUState
  hw/i386: Set CPUState.mirror_vcpu=true for mirror vcpus

Tobin Feldman-Fitzthum (1):
  hw/acpi: Don't include mirror vcpus in ACPI tables

 accel/kvm/kvm-accel-ops.c |  45 ++++++-
 accel/kvm/kvm-all.c       | 244 +++++++++++++++++++++++++++++++++++++-
 accel/kvm/kvm-cpus.h      |   2 +
 hw/acpi/cpu.c             |  21 +++-
 hw/core/cpu-common.c      |   1 +
 hw/core/machine.c         |   7 ++
 hw/i386/acpi-build.c      |   5 +
 hw/i386/acpi-common.c     |   5 +
 hw/i386/kvm/apic.c        |  15 +++
 hw/i386/pc.c              |  10 ++
 hw/i386/x86.c             |  11 +-
 include/hw/acpi/cpu.h     |   1 +
 include/hw/boards.h       |   3 +
 include/hw/core/cpu.h     |   3 +
 include/hw/i386/x86.h     |   3 +-
 include/sysemu/kvm.h      |  15 +++
 qapi/machine.json         |   5 +-
 softmmu/cpus.c            |  27 +++++
 softmmu/vl.c              |   3 +
 target/i386/kvm/kvm.c     |  42 +++++++
 20 files changed, 459 insertions(+), 9 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2021-08-23 16:29 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 13:25 [RFC PATCH 00/13] Add support for Mirror VM Ashish Kalra
2021-08-16 13:26 ` [RFC PATCH 01/13] machine: Add mirrorvcpus=N suboption to -smp Ashish Kalra
2021-08-16 21:23   ` Eric Blake
2021-08-16 21:23     ` Eric Blake
2021-08-16 13:27 ` [RFC PATCH 02/13] hw/boards: Add mirror_vcpu flag to CPUArchId Ashish Kalra
2021-08-16 13:27 ` [RFC PATCH 03/13] hw/i386: Mark mirror vcpus in possible_cpus Ashish Kalra
2021-08-16 13:27 ` [RFC PATCH 04/13] hw/acpi: Don't include mirror vcpus in ACPI tables Ashish Kalra
2021-08-16 13:28 ` [RFC PATCH 05/13] cpu: Add boolean mirror_vcpu field to CPUState Ashish Kalra
2021-08-16 13:28 ` [RFC PATCH 06/13] hw/i386: Set CPUState.mirror_vcpu=true for mirror vcpus Ashish Kalra
2021-08-16 13:29 ` [RFC PATCH 07/13] kvm: Add Mirror VM ioctl and enable cap interfaces Ashish Kalra
2021-08-16 13:29 ` [RFC PATCH 08/13] kvm: Add Mirror VM support Ashish Kalra
2021-08-16 13:29 ` [RFC PATCH 09/13] kvm: create Mirror VM and share primary VM's encryption context Ashish Kalra
2021-08-16 13:30 ` [RFC PATCH 10/13] softmmu/cpu: Skip mirror vcpu's for pause, resume and synchronization Ashish Kalra
2021-08-16 13:30 ` [RFC PATCH 11/13] kvm/apic: Disable in-kernel APIC support for mirror vcpu's Ashish Kalra
2021-08-16 13:31 ` [RFC PATCH 12/13] hw/acpi: disable modern CPU hotplug interface " Ashish Kalra
2021-08-16 13:31 ` [RFC PATCH 13/13] hw/i386/pc: reduce fw_cfg boot cpu count taking into account " Ashish Kalra
2021-08-16 14:01 ` [RFC PATCH 00/13] Add support for Mirror VM Claudio Fontana
2021-08-16 14:01   ` Claudio Fontana
2021-08-16 14:15 ` Paolo Bonzini
2021-08-16 14:15   ` Paolo Bonzini
2021-08-16 14:23   ` Daniel P. Berrangé
2021-08-16 14:23     ` Daniel P. Berrangé
2021-08-16 15:00     ` Paolo Bonzini
2021-08-16 15:00       ` Paolo Bonzini
2021-08-16 15:16       ` Daniel P. Berrangé
2021-08-16 15:16         ` Daniel P. Berrangé
2021-08-16 15:35         ` Paolo Bonzini
2021-08-16 15:35           ` Paolo Bonzini
2021-08-16 14:44   ` Ashish Kalra
2021-08-16 14:58     ` Paolo Bonzini
2021-08-16 14:58       ` Paolo Bonzini
2021-08-16 15:13       ` Ashish Kalra
2021-08-16 15:38         ` Paolo Bonzini
2021-08-16 15:38           ` Paolo Bonzini
2021-08-16 15:48           ` Dr. David Alan Gilbert
2021-08-16 15:48             ` Dr. David Alan Gilbert
2021-08-18 10:31           ` Ashish Kalra
2021-08-18 11:25             ` James Bottomley
2021-08-18 11:25               ` James Bottomley
2021-08-18 15:31               ` Dr. David Alan Gilbert
2021-08-18 15:31                 ` Dr. David Alan Gilbert
2021-08-18 15:35                 ` James Bottomley
2021-08-18 15:35                   ` James Bottomley
2021-08-18 15:43                   ` Dr. David Alan Gilbert
2021-08-18 15:43                     ` Dr. David Alan Gilbert
2021-08-18 16:28                     ` James Bottomley
2021-08-18 16:28                       ` James Bottomley
2021-08-18 17:30                       ` Dr. David Alan Gilbert
2021-08-18 17:30                         ` Dr. David Alan Gilbert
2021-08-18 18:51                         ` James Bottomley
2021-08-18 18:51                           ` James Bottomley
2021-08-18 19:47             ` Paolo Bonzini
2021-08-16 17:23   ` Dr. David Alan Gilbert
2021-08-16 17:23     ` Dr. David Alan Gilbert
2021-08-16 20:53     ` Paolo Bonzini
2021-08-16 23:53 ` Steve Rutherford
2021-08-16 23:53   ` Steve Rutherford
2021-08-17  7:05   ` Michael S. Tsirkin
2021-08-17  7:05     ` Michael S. Tsirkin
2021-08-17  8:38   ` Dr. David Alan Gilbert
2021-08-17  8:38     ` Dr. David Alan Gilbert
2021-08-17 14:08     ` Ashish Kalra
2021-08-17 16:32   ` Paolo Bonzini
2021-08-17 16:32     ` Paolo Bonzini
2021-08-17 20:50     ` Tobin Feldman-Fitzthum
2021-08-17 20:50       ` Tobin Feldman-Fitzthum
2021-08-17 22:04       ` Steve Rutherford
2021-08-17 22:04         ` Steve Rutherford
2021-08-18 15:32         ` Tobin Feldman-Fitzthum
2021-08-18 15:32           ` Tobin Feldman-Fitzthum
2021-08-18 19:04           ` Dr. David Alan Gilbert
2021-08-18 19:04             ` Dr. David Alan Gilbert
2021-08-18 21:42             ` Tobin Feldman-Fitzthum
2021-08-18 21:42               ` Tobin Feldman-Fitzthum
2021-08-19  8:22               ` Dr. David Alan Gilbert
2021-08-19  8:22                 ` Dr. David Alan Gilbert
2021-08-19 14:06                 ` James Bottomley
2021-08-19 14:06                   ` James Bottomley
2021-08-19 14:28                   ` Dr. David Alan Gilbert
2021-08-19 14:28                     ` Dr. David Alan Gilbert
2021-08-19 22:10                     ` James Bottomley
2021-08-19 22:10                       ` James Bottomley
2021-08-23 12:26                       ` Dr. David Alan Gilbert
2021-08-23 12:26                         ` Dr. David Alan Gilbert
2021-08-23 16:28                         ` Tobin Feldman-Fitzthum
2021-08-23 16:28                           ` Tobin Feldman-Fitzthum
2021-08-19 14:07                 ` Tobin Feldman-Fitzthum
2021-08-19 14:07                   ` Tobin Feldman-Fitzthum
2021-08-17 23:20       ` Paolo Bonzini
2021-08-17 23:20         ` Paolo Bonzini
2021-08-17 21:54     ` Steve Rutherford
2021-08-17 21:54       ` Steve Rutherford
2021-08-17 22:37       ` Paolo Bonzini
2021-08-17 22:37         ` Paolo Bonzini
2021-08-17 22:57         ` James Bottomley
2021-08-17 22:57           ` James Bottomley
2021-08-17 23:10           ` Steve Rutherford
2021-08-17 23:10             ` Steve Rutherford
2021-08-18  2:49             ` James Bottomley
2021-08-18  2:49               ` James Bottomley
2021-08-18 14:06         ` Ashish Kalra
2021-08-18 17:07           ` Ashish Kalra

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.