KVM: introduce readonly memslot
Status from this message: Thanks, applied 1-11.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest12 patches 20 repliesApplied
- v512 patches 22 repliesSuperseded
- v410 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 6 patches | 12 replies | Superseded |
Changelog from the cover letter
- fix endless retrying for unhandleable instruction which accesses on readonly host memory
- divide slot->flags by 16:16, the lower part is visible for userspace, the reset is internally used in kvm, and document this in the code
- check slot->flags for gfn_to_hva_memslot
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | KVM: x86: fix possible infinite loop caused by reexecute_instructionarch/ | +11 | 2 replies | |
| 2/12 | KVM: fix missing check for memslot flagsvirt/ | +12 | 0 replies | |
| 3/12 | KVM: hide KVM_MEMSLOT_INVALID from userspaceinclude/ include/ | +12 | 0 replies | |
| 4/12 | KVM: introduce gfn_to_pfn_memslot_atomicarch/ include/ virt/ | +11 | 0 replies | |
| 5/12 | KVM: introduce gfn_to_hva_read/kvm_read_hva/kvm_read_hva_atomicvirt/ | +23 | 0 replies | |
| 6/12 | KVM: reorganize hva_to_pfnvirt/ | +97 | 0 replies | |
| 7/12 | KVM: use 'writable' as a hint to map writable pfnvirt/ | +23 | 0 replies | |
| 8/12 | KVM: introduce KVM_PFN_ERR_RO_FAULTinclude/ | +1 | 0 replies | |
| 9/12 | KVM: introduce KVM_HVA_ERR_BADinclude/ virt/ | +8 | 0 replies | |
| 10/12 | KVM: introduce KVM_HVA_ERR_RO_BADinclude/ | +3 | 0 replies | |
| 11/12 | KVM: introduce readonly memslotDocumentation/ arch/ arch/ +4 more | +102 | 5 replies | |
| 12/12 | KVM: indicate readonly access faultarch/ include/ include/ +1 more | +21 | 12 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 00/12] KVM: introduce readonly memslot
Changelog:
- fix endless retrying for unhandleable instruction which accesses on readonly host memory
- divide slot->flags by 16:16, the lower part is visible for userspace, the reset is internally used in kvm, and document this in the code
- check slot->flags for gfn_to_hva_memslot
The test case can be found at:
http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/migrate-perf.tar.bz2
In current code, if we map a readonly memory space from host to guest and the page is not currently mapped in the host, we will get a fault-pfn and async is not allowed, then the vm will crash.
As Avi's suggestion, We introduce readonly memory region to map ROM/ROMD to the guest, read access is happy for readonly memslot, write access on readonly memslot will cause KVM_EXIT_MMIO exit.