[PATCH v1 0/5] softmmu/memory_mapping: optimize dump/tpm for virtio-mem

David Hildenbrand posted 5 patches 3 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210210171537.32932-1-david@redhat.com
Test checkpatch passed
There is a newer version of this series
hw/tpm/tpm_ppi.c         |   4 +-
softmmu/memory_mapping.c | 118 +++++++++++++++++++++++++++------------
2 files changed, 84 insertions(+), 38 deletions(-)
[PATCH v1 0/5] softmmu/memory_mapping: optimize dump/tpm for virtio-mem
Posted by David Hildenbrand 3 years, 2 months ago
Minor fixes and cleanups, followed by an optimization for virtio-mem
regarding guest dumps and tpm.

virtio-mem logically plugs/unplugs memory within a sparse memory region
and notifies via the RamDiscardMgr interface when parts become
plugged (populated) or unplugged (discarded).

Currently, guest_phys_blocks_append() appends the whole (sparse)
virtio-mem managed region and therefore tpm code might zero the hole
region and dump code will dump the whole region. Let's only add logically
plugged (populated) parts of that region, skipping over logically
unplugged (discarded) parts by reusing the RamDiscardMgr infrastructure
introduced to handle virtio-mem + VFIO properly.

Based-on: https://lkml.kernel.org/r/20210121110540.33704-1-david@redhat.com

David Hildenbrand (5):
  tpm: mark correct memory region range dirty when clearing RAM
  softmmu/memory_mapping: reuse qemu_get_guest_simple_memory_mapping()
  softmmu/memory_mapping: never merge ranges accross memory regions
  softmmu/memory_mapping: factor out adding physical memory ranges
  softmmu/memory_mapping: optimize for RamDiscardMgr sections

 hw/tpm/tpm_ppi.c         |   4 +-
 softmmu/memory_mapping.c | 118 +++++++++++++++++++++++++++------------
 2 files changed, 84 insertions(+), 38 deletions(-)

-- 
2.29.2