KVM: nVMX: shadow VMCS support, v1
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 32 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | KVM: nVMX: Stats counters for nVMXarch/ arch/ arch/ | +19 | 3 replies | |
| 2/11 | KVM: nVMX: Shadow-vmcs control fields/bitsarch/ | +3 | 0 replies | |
| 3/11 | KVM: nVMX: Detect shadow-vmcs capabilityarch/ | +24 | 2 replies | |
| 4/11 | KVM: nVMX: Introduce vmread and vmwrite bitmapsarch/ | +74 | 2 replies | |
| 5/11 | KVM: nVMX: Refactor handle_vmwritearch/ | +28 | 2 replies | |
| 6/11 | KVM: nVMX: Allocate shadow vmcsarch/ | +15 | 0 replies | |
| 7/11 | KVM: nVMX: Release shadow vmcsarch/ | +15 | 0 replies | |
| 8/11 | KVM: nVMX: Copy processor-specific shadow-vmcs to VMCS12arch/ | +35 | 0 replies | |
| 9/11 | KVM: nVMX: Copy VMCS12 to processor-specific shadow vmcsarch/ | +45 | 2 replies | |
| 10/11 | KVM: nVMX: Synchronize VMCS12 content with the shadow vmcsarch/ | +12 | 19 replies | |
| 11/11 | KVM: nVMX: Enable and disable shadow vmcs functionalityarch/ | +11 | 0 replies |
Reviews trailers per patch
None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Orit Wasserman |
|---|---|
| Series | R-b |
| 1/11 | |
| 2/11 | |
| 3/11 | |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | |
| 9/11 | |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/11] KVM: nVMX: shadow VMCS support, v1
This series of patches implements shadow-vmcs capability for nested VMX.
Shadow-vmcs - background and overview:
In Intel VMX, vmread and vmwrite privileged instructions are used by the hypervisor to read and modify the guest and host specifications (VMCS). In a nested virtualization environment, L1 executes multiple vmread and vmwrite instruction to handle a single L2 exit. Each vmread and vmwrite executed by L1 traps (cause an exit) to the L0 hypervisor (KVM). L0 emulates the instruction behaviour and resumes L1 execution.
Removing the need to trap and emulate these special instructions reduces the number of exits and improves nested virtualization performance. As it was first evaluated in [1], exit-less vmread and vmwrite can reduce nested virtualization overhead up-to 40%.
Intel introduced a new feature to their processors called shadow-vmcs. Using shadow-vmcs, L0 can configure the processor to let L1 running in guest-mode access VMCS12 fields using vmread and vmwrite instructions but without causing an exit to L0. The VMCS12 fields' data is stored in a shadow-vmcs controlled by L0.
Shadow-vmcs - design considerations:
A shadow-vmcs is processor-dependent and must be accessed by L0 or L1 using vmread and vmwrite instructions. With nested virtualization we aim to abstract the hardware from the L1 hypervisor. Thus, to avoid hardware dependencies we prefered to keep the software defined VMCS12 format as part of L1 address space and hold the processor-specific shadow-vmcs format only in L0 address space. In other words, the shadow-vmcs is used by L0 as an accelerator but the format and content is never exposed to L1 directly. L0 syncs the content of the processor-specific shadow vmcs with the content of the software-controlled VMCS12 format.
We could have been kept the processor-specific shadow-vmcs format in L1 address space to avoid using the software defined VMCS12 format, however, this type of design/implementation would have been created hardware dependencies and would complicate other capabilities (e.g. Live Migration of L1).
Acknowledgments:
Many thanks to
"Xu, Dongxiao" <[email protected]>
"Nakajima, Jun" <[email protected]>
"Har'El, Nadav" <[email protected]>
for the insightful discussions, comments and reviews.
These patches were easily created and maintained using
Patchouli -- patch creator
http://patchouli.sourceforge.net/
[1] "The Turtles Project: Design and Implementation of Nested Virtualization",
http://www.usenix.org/events/osdi10/tech/full_papers/Ben-Yehuda.pdf