From: Alexander Graf <agraf@suse.de>
To: kvm@vger.kernel.org
Cc: joro@8bytes.org, anthony@codemonkey.ws, avi@redhat.com
Subject: [PATCH 00/12] Add support for nested SVM (kernel) v6
Date: Fri, 21 Nov 2008 16:14:30 +0100 [thread overview]
Message-ID: <1227280482-25361-1-git-send-email-agraf@suse.de> (raw)
The current generation of virtualization extensions only supports one VM layer.
While we can't change that, it is pretty easy to emulate the CPU's behavior
and implement the virtualization opcodes ourselves.
This patchset does exactly this for SVM. Using it, KVM can run within a VM.
Since we're emulating the real CPU's behavior, this should also enable other
VMMs to run within KVM.
So far I've only tested to run KVM inside the VM though.
As always, comments and suggestions are highly welcome.
v2 takes most comments from Avi into account.
v3 addresses Joergs comments, including
- V_INTR_MASKING support
- a generic permission checking helper
v4 addresses even more comments from Joerg, including
- don't use the guest's hsave to store the guest's vmcb in
- add nested=<int> flag for kvm-amd.ko, defaults to 0 (off)
- include Joerg's VM_CR MSR patch
v5 removes the IOPM merging code
v6 addresses comments from Joerg and Anthony:
- don't flood the host's log with printks
- export SVM capability to userspace (SVM CPUID capability)
- prettify nsvm_printk
- pass an error code on inject_gp (0)
- always close interrupt_window if GIF=0
- fix 32-bit l1 guests
- warn in syslog if nested=1 on module load
- huge speed improvements
To be usable, this patchset requires simple changes in the userspace part.
For now you can easily use the patches I sent to the list when I sent the first
version if you comment out the new svm masking in qemu/target-i386/helper.c.
I will submit a newer version of the userspace patch once the kernel parts are OK.
Known issues:
- TODO: #VMEXIT on save/restore
- SMP l2 guests break with in-kernel-apic
Thanks for reviewing!
Alex
Alexander Graf (11):
Clean up VINTR setting v6
Move EFER and MSR constants to generic x86 code v6
Add helper functions for nested SVM v6
Implement GIF, clgi and stgi v6
Implement hsave v6
Add VMLOAD and VMSAVE handlers v6
Add VMRUN handler v6
Add VMEXIT handler and intercepts v6
Allow setting the SVME bit v6
Only allow setting of EFER_SVME when CPUID SVM is set v6
Accelerate nested SVM by emulating parts of GIF=0 v6
Joerg Roedel (1):
Allow read access to MSR_VM_VR v6
arch/x86/include/asm/kvm_host.h | 6 +
arch/x86/include/asm/msr-index.h | 7 +
arch/x86/kvm/kvm_svm.h | 10 +
arch/x86/kvm/svm.c | 763 +++++++++++++++++++++++++++++++++++++-
arch/x86/kvm/svm.h | 4 -
arch/x86/kvm/x86.c | 60 +++-
6 files changed, 811 insertions(+), 39 deletions(-)
next reply other threads:[~2008-11-21 15:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 15:14 Alexander Graf [this message]
2008-11-21 15:14 ` [PATCH 01/12] Clean up VINTR setting v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 02/12] Move EFER and MSR constants to generic x86 code v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 03/12] Add helper functions for nested SVM v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 04/12] Implement GIF, clgi and stgi v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 05/12] Implement hsave v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 06/12] Add VMLOAD and VMSAVE handlers v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 07/12] Add VMRUN handler v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 08/12] Add VMEXIT handler and intercepts v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 09/12] Allow read access to MSR_VM_VR v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 10/12] Allow setting the SVME bit v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 11/12] Only allow setting of EFER_SVME when CPUID SVM is set v6 Alexander Graf
2008-11-21 15:14 ` [PATCH 12/12] Accelerate nested SVM by emulating parts of GIF=0 v6 Alexander Graf
2008-11-21 16:53 ` Avi Kivity
2008-11-21 16:58 ` Alexander Graf
2008-11-21 17:07 ` Avi Kivity
2008-11-21 17:14 ` Alexander Graf
2008-11-21 17:18 ` Avi Kivity
2008-11-21 17:35 ` Alexander Graf
2008-11-21 15:23 ` [PATCH 07/12] Add VMRUN handler v6 Muli Ben-Yehuda
2008-11-21 15:26 ` Alexander Graf
2008-11-21 15:35 ` Alexander Graf
2008-11-23 8:06 ` Muli Ben-Yehuda
2008-11-23 13:48 ` Alexander Graf
2008-11-23 15:09 ` Muli Ben-Yehuda
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=1227280482-25361-1-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox