KVM: allow mapping non-refcounted pages
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 13 repliesIn review
- v44 patches 3 repliesSuperseded
- v34 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 5 patches | 2 replies | Superseded | |
| v1 | 6 patches | 27 replies | Superseded |
Changes in v5 from the cover letter
- rebase on kvm next branch again
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: mmu: introduce new gfn_to_pfn_page functionsinclude/ virt/ | +162 | 1 reply | |
| 2/4 | KVM: x86/mmu: use gfn_to_pfn_pagearch/ arch/ arch/ +1 more | +22 | 1 reply | |
| 3/4 | KVM: arm64/mmu: use gfn_to_pfn_pagearch/ | +17 | 1 reply | |
| 4/4 | KVM: mmu: remove over-aggressive warningsarch/ virt/ | +1 | 10 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/4] KVM: allow mapping non-refcounted pages
From: David Stevens <[email protected]>
This patch series adds support for mapping non-refcount VM_IO and VM_PFNMAP memory into the guest.
Currently, the gfn_to_pfn functions require being able to pin the target pfn, so they will fail if the pfn returned by follow_pte isn't a ref-counted page. However, the KVM secondary MMUs do not require that the pfn be pinned, since they are integrated with the mmu notifier API. This series adds a new set of gfn_to_pfn_page functions which parallel the gfn_to_pfn functions but do not pin the pfn. The new functions return the page from gup if it was present, so callers can use it and call put_page when done.
The gfn_to_pfn functions should be depreciated, since as they are unsafe due to relying on trying to obtain a struct page from a pfn returned by follow_pte. I added new functions instead of simply adding another optional parameter to the existing functions to make it easier to track down users of the deprecated functions.
This series updates x86 and arm64 secondary MMUs to the new API.
v4 -> v5:
- rebase on kvm next branch again
v3 -> v4:
- rebase on kvm next branch again
- Add some more context to a comment in ensure_pfn_ref
v2 -> v3:
- rebase on kvm next branch
v1 -> v2:
- Introduce new gfn_to_pfn_page functions instead of modifying the behavior of existing gfn_to_pfn functions, to make the change less invasive.
- Drop changes to mmu_audit.c
- Include Nicholas Piggin's patch to avoid corrupting refcount in the follow_pte case, and use it in depreciated gfn_to_pfn functions.
- Rebase on kvm/next
David Stevens (4):
KVM: mmu: introduce new gfn_to_pfn_page functions
KVM: x86/mmu: use gfn_to_pfn_page
KVM: arm64/mmu: use gfn_to_pfn_page
KVM: mmu: remove over-aggressive warnings
arch/arm64/kvm/mmu.c | 27 +++-- arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/mmu/mmu.c | 25 ++--- arch/x86/kvm/mmu/paging_tmpl.h | 9 +- arch/x86/kvm/x86.c | 6 +- include/linux/kvm_host.h | 17 +++ virt/kvm/kvm_main.c | 198 ++++++++++++++++++++++++--------- 7 files changed, 202 insertions(+), 81 deletions(-)
Signature · 7 lines
2.34.0.rc2.393.gf8c9666880-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel