guest_memfd: Fix handling for conversions of MMIO ranges
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | accel/kvm: Add helper for handling conversions of MMIO holesaccel/ | +64 | 0 replies | |
| 2/4 | accel/kvm: Fix kvm_convert_memory() calls crossing memory regionsaccel/ | +63 | 0 replies | |
| 3/4 | accel/kvm: Fix handling of MMIO holes at start of conversion rangesaccel/ | +16 | 0 replies | |
| 4/4 | accel/kvm: Fix handling of conversion ranges with multiple MMIO holesaccel/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] guest_memfd: Fix handling for conversions of MMIO ranges
This patchset is also available at:
https://github.com/amdese/qemu/commits/gmem-fix-mmio-conversions-v1
and is based on top of qemu master (3f89b5de5b)
Overview
--------
Calls to kvm_convert_memory() currently only produce the intended behavior if the entire range is within an MMIO hole/region, or is completely covered by a guest_memfd-backed region.
In reality this is not the case:
1) some ranges contain multiple regions (e.g. multiple guest NUMA nodes backed by separate guest_memfd backends).
2) some ranges contain multiple MMIO holes (e.g. a range that contains 2 non-adjacent regions, or a single region followed by a hole)
These scenarios bring about multiple unhandled corner cases that this series is meant to address.
The section-by-section processing is also heavily guided by requirements that will come about when enabling in-place conversion support (where memory attribute tracking will move down into each guest_memfd instance and further require region-by-region processing of each range). That will be posted as a follow-up series based on this patchset.
NOTES/TODO
----------
- If TDX folks could test this that would be appreciated as SNP guests don't seem to trigger some of the original cases that were introduced for TDX guests and I only have access to SNP systems atm.
Thanks,
Mike
----------------------------------------------------------------
Ashish Kalra (1):
accel/kvm: Fix kvm_convert_memory() calls crossing memory regions
Michael Roth (3):
accel/kvm: Add helper for handling conversions of MMIO holes accel/kvm: Fix handling of MMIO holes at start of conversion ranges accel/kvm: Fix handling of conversion ranges with multiple MMIO holes
accel/kvm/kvm-all.c | 167 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 125 insertions(+), 42 deletions(-)