]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
system/ramblock: Move ram_block_discard_*_range() declarations
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Sep 2025 14:25:59 +0000 (16:25 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 7 Oct 2025 01:37:03 +0000 (03:37 +0200)
Keep RAM blocks API in the same header: "system/ramblock.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Peter Xu <peterx@redhat.com>
Message-Id: <20251002032812.26069-4-philmd@linaro.org>

accel/kvm/kvm-all.c
hw/hyperv/hv-balloon-our_range_memslots.c
hw/virtio/virtio-balloon.c
hw/virtio/virtio-mem.c
include/exec/cpu-common.h
include/system/ramblock.h

index 9060599cd736af72729afaecb160e323174e4c6b..e3c84723406241df73d0ef011bef15429f74d788 100644 (file)
@@ -32,6 +32,7 @@
 #include "system/runstate.h"
 #include "system/cpus.h"
 #include "system/accel-blocker.h"
+#include "system/ramblock.h"
 #include "accel/accel-ops.h"
 #include "qemu/bswap.h"
 #include "exec/tswap.h"
index 1505a395cf7da5fa134a1a1610ea698a2eec07fa..1fc95e164802112d845b5986de32bc931a3d1868 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "system/ramblock.h"
 #include "hv-balloon-internal.h"
 #include "hv-balloon-our_range_memslots.h"
 #include "trace.h"
index db787d00b312edc957982f319c1d1467db28c157..02cdd807d77e2000bbfa39dfd05a8ba7c664da99 100644 (file)
@@ -23,6 +23,7 @@
 #include "hw/qdev-properties.h"
 #include "hw/boards.h"
 #include "system/balloon.h"
+#include "system/ramblock.h"
 #include "hw/virtio/virtio-balloon.h"
 #include "system/address-spaces.h"
 #include "qapi/error.h"
index c46f6f9c3e2f8594ee8dea00aaf1607f7c3d3240..1de2d3de521fe661e9eebc7fc1ba8afdbbd81190 100644 (file)
@@ -17,6 +17,7 @@
 #include "qemu/units.h"
 #include "system/numa.h"
 #include "system/system.h"
+#include "system/ramblock.h"
 #include "system/reset.h"
 #include "system/runstate.h"
 #include "hw/virtio/virtio.h"
index b96ac49844aff1534f7f1d00342ff1425bafb9ad..df520f15d30206eb378b1c3a5de1a76f0384d90b 100644 (file)
@@ -163,9 +163,6 @@ void cpu_flush_icache_range(hwaddr start, hwaddr len);
 typedef int (RAMBlockIterFunc)(RAMBlock *rb, void *opaque);
 
 int qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque);
-int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length);
-int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start,
-                                        size_t length);
 
 /* Returns: 0 on success, -1 on error */
 int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
index 7059b20d9199b32ca84d90feb300b663ea8bcbd1..530c5a2e4c287d3d889c3e180fcba4a580807efc 100644 (file)
@@ -103,6 +103,10 @@ struct RamBlockAttributes {
     QLIST_HEAD(, RamDiscardListener) rdl_list;
 };
 
+int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length);
+int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start,
+                                        size_t length);
+
 RamBlockAttributes *ram_block_attributes_create(RAMBlock *ram_block);
 void ram_block_attributes_destroy(RamBlockAttributes *attr);
 int ram_block_attributes_state_change(RamBlockAttributes *attr, uint64_t offset,