On 2026/02/27 7:22, BALATON Zoltan wrote:
On Thu, 26 Feb 2026, Philippe Mathieu-Daudé wrote:
physmem.c defines 2 stubs which are related to ram-block:
qemu_ram_block_from_host() and qemu_ram_get_fd().
Move them with the other ram-block stubs.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
stubs/physmem.c | 13 -------------
stubs/ram-block.c | 11 +++++++++++
Maybe should be the other way around moving what's in subs/ram-block.c
to stubs/physmem.c considering the the functions these stub out are in
system/physmem.c and there's no system/ram-block.c.
But this stubs out functions in "ramblock.h" (though it's not
"ram-block.h")
Regards,
Akihiko Odaki
Regards,
BALATON Zoltan
stubs/meson.build | 1 -
3 files changed, 11 insertions(+), 14 deletions(-)
delete mode 100644 stubs/physmem.c
diff --git a/stubs/physmem.c b/stubs/physmem.c
deleted file mode 100644
index 14667f2bd8f..00000000000
--- a/stubs/physmem.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "qemu/osdep.h"
-#include "system/ramblock.h"
-
-RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
- ram_addr_t *offset)
-{
- return NULL;
-}
-
-int qemu_ram_get_fd(RAMBlock *rb)
-{
- return -1;
-}
diff --git a/stubs/ram-block.c b/stubs/ram-block.c
index 8790a59593e..f0650b19ac6 100644
--- a/stubs/ram-block.c
+++ b/stubs/ram-block.c
@@ -35,3 +35,14 @@ int ram_block_discard_disable(bool state)
{
return 0;
}
+
+RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
+ ram_addr_t *offset)
+{
+ return NULL;
+}
+
+int qemu_ram_get_fd(RAMBlock *rb)
+{
+ return -1;
+}
diff --git a/stubs/meson.build b/stubs/meson.build
index 8a07059500d..0171f531523 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -20,7 +20,6 @@ if have_block
stub_ss.add(files('get-vm-name.c'))
stub_ss.add(files('iothread-lock-block.c'))
stub_ss.add(files('migr-blocker.c'))
- stub_ss.add(files('physmem.c'))
stub_ss.add(files('ram-block.c'))
stub_ss.add(files('runstate-check.c'))
stub_ss.add(files('uuid.c'))