x86/nestedvmx: Fix nested VMX bugs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 0 repliesNew
- v18 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Drop V1 patch 2 (Implement nhvm_hap_walk_L1_p2m2), a temporary change.
- Rebased onto current master.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | x86/nestedvmx: Preserve hardware access bits in reflected EPT violationsxen/ | +6 | 0 replies | |
| 2/7 | x86/nestedvmx: Emulate L2 accesses to L1's LAPIC pagexen/ | +12 | 0 replies | |
| 3/7 | x86/nestedvmx: Reflect EPT holes hit during L2 emulationxen/ xen/ xen/ +1 more | +47 | 0 replies | |
| 4/7 | x86/nestedvmx: Load L2's EFER on VM entry and restore L1's on VM exitxen/ | +28 | 0 replies | |
| 5/7 | x86/p2m: invalidate EPT caches after flushing a nested p2mxen/ | +11 | 0 replies | |
| 6/7 | x86/nestedhap: Retry nested page fault if the np2m changes during walkxen/ | +39 | 0 replies | |
| 7/7 | x86/vmx: Fix nested VPID handlingxen/ xen/ xen/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/7] x86/nestedvmx: Fix nested VMX bugs
From: Chunjie Zhu <[email protected]>
This series fixes several bugs found while running nested VMX guests (L1 Xen running an L2 guest) on top of Xen:
- Patch 1: stop leaking L0's widened access bits into the EPT violation exit qualification reflected to L1.
- Patch 2: emulate L2 accesses that hit the APIC-access dummy page against L1's vLAPIC instead of mapping the page directly.
- Patch 3: reflect EPT holes hit during L2 emulation to L1 as EPT violations rather than injecting a bogus #PF into L2.
- Patch 4: load L2's EFER on VM entry and restore L1's on VM exit, so L2 neither sees L0's LME nor fails VM entry with invalid guest state.
- Patch 5: invalidate EPT caches after flushing a nested p2m, to avoid L2 walking stale paging-structure caches into freed pages.
- Patch 6: retry a nested page fault if the np2m changes while L1/L0 p2m are being walked without the np2m lock held.
- Patch 7: fix several nested VPID problems.
Changes in v2:
- Drop V1 patch 2 (Implement nhvm_hap_walk_L1_p2m2), a temporary change.
- Rebased onto current master.
Chunjie Zhu (7):
x86/nestedvmx: Preserve hardware access bits in reflected EPT
violations
x86/nestedvmx: Emulate L2 accesses to L1's LAPIC page x86/nestedvmx: Reflect EPT holes hit during L2 emulation x86/nestedvmx: Load L2's EFER on VM entry and restore L1's on VM exit x86/p2m: invalidate EPT caches after flushing a nested p2m x86/nestedhap: Retry nested page fault if the np2m changes during walk x86/vmx: Fix nested VPID handling
xen/arch/x86/hvm/hvm.c | 6 +++ xen/arch/x86/hvm/vmx/vmx.c | 4 +- xen/arch/x86/hvm/vmx/vvmx.c | 71 ++++++++++++++++++++++--- xen/arch/x86/include/asm/hvm/vmx/vvmx.h | 4 ++ xen/arch/x86/mm/hap/nested_ept.c | 9 +++- xen/arch/x86/mm/hap/nested_hap.c | 52 +++++++++++++++++- xen/arch/x86/mm/p2m.c | 19 ++++++- 7 files changed, 152 insertions(+), 13 deletions(-)
Signature · 1 line
2.34.1