Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH 00/10] RFC: make RamDiscardManager work with multiple sources
@ 2026-02-04 10:06 marcandre.lureau
  2026-02-04 10:06 ` [PATCH 01/10] system/rba: use DIV_ROUND_UP marcandre.lureau
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: marcandre.lureau @ 2026-02-04 10:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cédric Le Goater, kvm, Alex Williamson, Paolo Bonzini,
	Ben Chaney, Michael S. Tsirkin, David Hildenbrand, Fabiano Rosas,
	Peter Xu, Philippe Mathieu-Daudé, Mark Kanda,
	Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

This is an attempt to fix the incompatibility of virtio-mem with confidential
VMs. The solution implements what was discussed earlier with D. Hildenbrand:
https://patchwork.ozlabs.org/project/qemu-devel/patch/20250407074939.18657-5-chenyi.qiang@intel.com/#3502238

The first patches are misc cleanups. Then some code refactoring to have split a
manager/source. And finally, the manager learns to deal with multiple sources.

I haven't done thorough testing. I only launched a SEV guest with a virtio-mem
device. It would be nice to have more tests for those scenarios with
VFIO/virtio-mem/confvm.. In any case, review & testing needed!

(should fix https://issues.redhat.com/browse/RHEL-131968)

thanks

Marc-André Lureau (10):
  system/rba: use DIV_ROUND_UP
  memory: drop RamDiscardListener::double_discard_supported
  virtio-mem: use warn_report_err_once()
  system/memory: minor doc fix
  kvm: replace RamDicardManager by the RamBlockAttribute
  system/memory: split RamDiscardManager into source and manager
  system/memory: move RamDiscardManager to separate compilation unit
  system/memory: constify section arguments
  memory: implement RamDiscardManager multi-source aggregation
  tests: add unit tests for RamDiscardManager multi-source aggregation

 include/hw/vfio/vfio-container.h            |    2 +-
 include/hw/vfio/vfio-cpr.h                  |    2 +-
 include/hw/virtio/virtio-mem.h              |    3 -
 include/system/memory.h                     |  285 +---
 include/system/ram-discard-manager.h        |  394 ++++++
 include/system/ramblock.h                   |    3 +-
 accel/kvm/kvm-all.c                         |    2 +-
 hw/vfio/cpr-legacy.c                        |    4 +-
 hw/vfio/listener.c                          |   12 +-
 hw/virtio/virtio-mem.c                      |  204 +--
 migration/ram.c                             |    6 +-
 system/memory.c                             |   78 +-
 system/memory_mapping.c                     |    4 +-
 system/ram-block-attributes.c               |  205 +--
 system/ram-discard-manager.c                |  590 +++++++++
 tests/unit/test-ram-discard-manager-stubs.c |   48 +
 tests/unit/test-ram-discard-manager.c       | 1313 +++++++++++++++++++
 system/meson.build                          |    1 +
 tests/unit/meson.build                      |    8 +-
 19 files changed, 2489 insertions(+), 675 deletions(-)
 create mode 100644 include/system/ram-discard-manager.h
 create mode 100644 system/ram-discard-manager.c
 create mode 100644 tests/unit/test-ram-discard-manager-stubs.c
 create mode 100644 tests/unit/test-ram-discard-manager.c

-- 
2.52.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-02-23 17:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 10:06 [PATCH 00/10] RFC: make RamDiscardManager work with multiple sources marcandre.lureau
2026-02-04 10:06 ` [PATCH 01/10] system/rba: use DIV_ROUND_UP marcandre.lureau
2026-02-04 11:01   ` Cédric Le Goater
2026-02-04 10:06 ` [PATCH 02/10] memory: drop RamDiscardListener::double_discard_supported marcandre.lureau
2026-02-04 11:01   ` Cédric Le Goater
2026-02-04 10:06 ` [PATCH 03/10] virtio-mem: use warn_report_err_once() marcandre.lureau
2026-02-04 11:01   ` Cédric Le Goater
2026-02-04 10:07 ` [PATCH 04/10] system/memory: minor doc fix marcandre.lureau
2026-02-04 11:01   ` Cédric Le Goater
2026-02-04 10:07 ` [PATCH 05/10] kvm: replace RamDicardManager by the RamBlockAttribute marcandre.lureau
2026-02-04 11:02   ` Cédric Le Goater
2026-02-04 10:07 ` [PATCH 06/10] system/memory: split RamDiscardManager into source and manager marcandre.lureau
2026-02-19 19:39   ` Peter Xu
2026-02-20 20:28     ` Marc-André Lureau
2026-02-23 17:37       ` Peter Xu
2026-02-04 10:07 ` [PATCH 07/10] system/memory: move RamDiscardManager to separate compilation unit marcandre.lureau
2026-02-04 10:07 ` [PATCH 08/10] system/memory: constify section arguments marcandre.lureau
2026-02-04 11:02   ` Cédric Le Goater
2026-02-04 10:07 ` [PATCH 09/10] memory: implement RamDiscardManager multi-source aggregation marcandre.lureau
2026-02-04 10:07 ` [PATCH 10/10] tests: add unit tests for " marcandre.lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox