From: Paolo Bonzini <pbonzini@redhat.com>
To: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>, natet@google.com
Cc: Dov Murik <dovmurik@linux.vnet.ibm.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, srutherford@google.com,
seanjc@google.com, rientjes@google.com,
Brijesh Singh <brijesh.singh@amd.com>,
Ashish Kalra <ashish.kalra@amd.com>,
Laszlo Ersek <lersek@redhat.com>,
James Bottomley <jejb@linux.ibm.com>,
Hubertus Franke <frankeh@us.ibm.com>
Subject: Re: [RFC] KVM: x86: Support KVM VMs sharing SEV context
Date: Thu, 11 Mar 2021 17:29:35 +0100 [thread overview]
Message-ID: <35dde628-f1a8-c3bf-9c7d-7789166b0ee1@redhat.com> (raw)
In-Reply-To: <7829472d-741c-1057-c61f-321fcfb5bdcd@linux.ibm.com>
On 11/03/21 16:30, Tobin Feldman-Fitzthum wrote:
> I am not sure how the mirror VM will be supported in QEMU. Usually there
> is one QEMU process per-vm. Now we would need to run a second VM and
> communicate with it during migration. Is there a way to do this without
> adding significant complexity?
I can answer this part. I think this will actually be simpler than with
auxiliary vCPUs. There will be a separate pair of VM+vCPU file
descriptors within the same QEMU process, and some code to set up the
memory map using KVM_SET_USER_MEMORY_REGION.
However, the code to run this VM will be very small as the VM does not
have to do MMIO, interrupts, live migration (of itself), etc. It just
starts up and communicates with QEMU using a mailbox at a predetermined
address.
I also think (but I'm not 100% sure) that the auxiliary VM does not have
to watch changes in the primary VM's memory map (e.g. mapping and
unmapping of BARs). In QEMU terms, the auxiliary VM's memory map tracks
RAMBlocks, not MemoryRegions, which makes things much simpler.
There are already many examples of mini VMMs running special purpose VMs
in the kernel's tools/testing/selftests/kvm directory, and I don't think
the QEMU code would be any more complex than that.
Paolo
next prev parent reply other threads:[~2021-03-11 16:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 8:59 [RFC] KVM: x86: Support KVM VMs sharing SEV context Nathan Tempelman
2021-02-24 9:18 ` Paolo Bonzini
2021-02-24 16:58 ` Sean Christopherson
2021-02-25 11:26 ` Paolo Bonzini
2021-02-24 17:37 ` Sean Christopherson
2021-02-25 3:55 ` Steve Rutherford
2021-03-12 23:47 ` Nathan Tempelman
2021-03-16 17:52 ` Sean Christopherson
2021-03-16 17:58 ` Paolo Bonzini
2021-03-16 18:08 ` Sean Christopherson
2021-02-25 3:44 ` Steve Rutherford
2021-02-25 14:57 ` Tom Lendacky
2021-02-25 18:49 ` Steve Rutherford
2021-03-05 22:36 ` Ashish Kalra
2021-03-09 17:45 ` Sean Christopherson
2021-02-25 17:53 ` James Bottomley
2021-02-25 18:18 ` Ashish Kalra
2021-02-25 20:33 ` Paolo Bonzini
2021-02-26 13:30 ` Ashish Kalra
2021-02-25 20:36 ` Paolo Bonzini
2021-03-05 14:04 ` Ashish Kalra
2021-03-05 15:13 ` Paolo Bonzini
2021-03-05 20:43 ` Nathan Tempelman
2021-03-11 15:30 ` Tobin Feldman-Fitzthum
2021-03-11 16:29 ` Paolo Bonzini [this message]
2021-03-15 17:05 ` Tobin Feldman-Fitzthum
2021-03-15 17:29 ` Paolo Bonzini
2021-05-24 21:29 ` Kalra, Ashish
2021-05-24 21:29 ` Kalra, Ashish
2021-05-27 15:51 ` Kalra, Ashish
2021-05-27 15:51 ` Kalra, Ashish
2021-06-01 8:26 ` Kalra, Ashish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35dde628-f1a8-c3bf-9c7d-7789166b0ee1@redhat.com \
--to=pbonzini@redhat.com \
--cc=ashish.kalra@amd.com \
--cc=brijesh.singh@amd.com \
--cc=dovmurik@linux.vnet.ibm.com \
--cc=frankeh@us.ibm.com \
--cc=jejb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natet@google.com \
--cc=rientjes@google.com \
--cc=seanjc@google.com \
--cc=srutherford@google.com \
--cc=thomas.lendacky@amd.com \
--cc=tobin@linux.ibm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.