Nested Paging Virtualization for KVM v3
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest27 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/27 | KVM: MMU: Check for root_level instead of long modearch/ | +2 | 0 replies | |
| 2/27 | KVM: MMU: Make tdp_enabled a mmu-context parameterarch/ arch/ | +13 | 0 replies | |
| 3/27 | KVM: MMU: Make set_cr3 a function pointer in kvm_mmuarch/ arch/ | +4 | 0 replies | |
| 4/27 | KVM: X86: Introduce a tdp_set_cr3 functionarch/ arch/ arch/ +1 more | +19 | 0 replies | |
| 5/27 | KVM: MMU: Introduce get_cr3 function pointerarch/ arch/ arch/ | +11 | 0 replies | |
| 6/27 | KVM: MMU: Introduce inject_page_fault function pointerarch/ arch/ | +6 | 0 replies | |
| 7/27 | KVM: MMU: Introduce kvm_init_shadow_mmu helper functionarch/ arch/ | +36 | 0 replies | |
| 8/27 | KVM: MMU: Let is_rsvd_bits_set take mmu context instead of vcpuarch/ arch/ | +7 | 0 replies | |
| 9/27 | KVM: MMU: Introduce generic walk_addr functionarch/ | +18 | 0 replies | |
| 10/27 | KVM: MMU: Add infrastructure for two-level page walkerarch/ arch/ include/ | +12 | 0 replies | |
| 11/27 | KVM: X86: Introduce pointer to mmu context used for gva_to_gpaarch/ arch/ arch/ | +29 | 0 replies | |
| 12/27 | KVM: MMU: Implement nested gva_to_gpa functionsarch/ arch/ arch/ +1 more | +54 | 0 replies | |
| 13/27 | KVM: X86: Add kvm_read_guest_page_tdp functionarch/ arch/ | +27 | 0 replies | |
| 14/27 | KVM: MMU: Make walk_addr_generic capable for two-level walkingarch/ | +20 | 0 replies | |
| 15/27 | KVM: MMU: Introduce kvm_read_guest_page_x86()arch/ | +18 | 0 replies | |
| 16/27 | KVM: MMU: Introduce init_kvm_nested_mmu()arch/ arch/ arch/ +1 more | +55 | 0 replies | |
| 17/27 | KVM: MMU: Track page fault data in struct vcpuarch/ arch/ arch/ +2 more | +29 | 0 replies | |
| 18/27 | KVM: MMU: Propagate the right fault back to the guest after gva_to_gpaarch/ arch/ | +18 | 0 replies | |
| 19/27 | KVM: X86: Propagate fetch faultsarch/ arch/ | +7 | 0 replies | |
| 20/27 | KVM: MMU: Add kvm_mmu parameter to load_pdptrs functionarch/ arch/ arch/ +2 more | +27 | 0 replies | |
| 21/27 | KVM: MMU: Introduce kvm_pdptr_read_mmuarch/ arch/ arch/ | +9 | 0 replies | |
| 22/27 | KVM: MMU: Refactor mmu_alloc_roots functionarch/ | +60 | 0 replies | |
| 23/27 | KVM: MMU: Allow long mode shadows for legacy page tablesarch/ arch/ | +53 | 0 replies | |
| 24/27 | KVM: SVM: Implement MMU helper functions for Nested Nested Pagingarch/ | +32 | 0 replies | |
| 25/27 | KVM: SVM: Initialize Nested Nested MMU context on VMRUNarch/ arch/ | +42 | 0 replies | |
| 26/27 | KVM: SVM: Expect two more candiates for exit_int_infoarch/ | +2 | 0 replies | |
| 27/27 | KVM: SVM: Report Nested Paging support to userspacearch/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/27] Nested Paging Virtualization for KVM v3
Hi Avi, Marcelo,
here is finally the third round of my NPT virtualization patches for KVM. It took a while to get everything running (including KVM itself) on 32 bit again to actually test it. But testing on 32 bit host and with a 32 bit hypervisor was a very good idea. I found some serious bugs and shortcomings in my code that are fixed now in v3.
The patchset was tested in a number of combinations:
host(64|32e) ->kvm(shadow|npt) ->guest(64|32e|32) ->test(boot|kbuild) host(64|32e) ->kvm(npt) ->guest(64|32e|32) ->kvm(shadow|kvm) ->guest(64|32e|32) ->test(boot|kbuild)
Only the valid combinations where tested of course, so no 64 bit on 32 bit combinations were tested. Except for that I tested all of the above combinations and all worked without any regressions.
Other changes since v2 are:
* Addressed the review comments from v2:
- Rebased everything to latest upstream code
- renamed nested_mmu to walk_mmu to make its
meaning more clear
- the gva_to_gpa functions are not longer swapped between the two mmu states which makes it more consistent
- Moved struct vcpu page fault data into seperate sub-struct for better readability
- Other minor stuff (coding style, typos)
- Renamed the kvm_*_page_x86 functions to kvm_*_page_mmu so that they can be made more generic later.
* Made everything work on 32 bit
- Introduced mmu->lm_root pointer to let the softmmu shadow 32 bit page tables with a long-mode page table. The lm_root page-table root always just points to the mmu.pae_root, so this builds entirely on the pae-shadow code.
- Split mmu_alloc_roots into a shadow and direct_map version to simplify the code and to not break the direct_map paths anymore when changing something in that function.
* Probably other changes I forgot about
This patchset applies on todays avi/master + the three patches I sent end of last week. These patches are necessary for some of the tests above to run.
For the curious and impatient user I put everything in a branch on kernel.org. If you want to test it you can pull the tree from
git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-kvm.git npt-virt-v3
Please review and/or apply these patches if considered good enough. Otherwise I appreciate your feedback.
Thanks,
Joerg