aboutsummaryrefslogtreecommitdiff
path: root/hw/mem
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-04-08 17:53:26 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-04-18 11:17:27 +0200
commit2c888febdfa0290a9e1d1f2133b2a24de47f6120 (patch)
tree7dd42e5148d8e3e401d225c5c06619ff816c26cc /hw/mem
parent5643190b74df601719ca713ea21eea4997a26e78 (diff)
downloadqemu-2c888febdfa0290a9e1d1f2133b2a24de47f6120.zip
qemu-2c888febdfa0290a9e1d1f2133b2a24de47f6120.tar.gz
qemu-2c888febdfa0290a9e1d1f2133b2a24de47f6120.tar.bz2
memory-device: move stubs out of stubs/
Since the memory-device stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/mem/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240408155330.522792-15-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/mem')
-rw-r--r--hw/mem/memory-device-stubs.c22
-rw-r--r--hw/mem/meson.build1
2 files changed, 23 insertions, 0 deletions
diff --git a/hw/mem/memory-device-stubs.c b/hw/mem/memory-device-stubs.c
new file mode 100644
index 0000000..15fd93f
--- /dev/null
+++ b/hw/mem/memory-device-stubs.c
@@ -0,0 +1,22 @@
+#include "qemu/osdep.h"
+#include "hw/mem/memory-device.h"
+
+MemoryDeviceInfoList *qmp_memory_device_list(void)
+{
+ return NULL;
+}
+
+uint64_t get_plugged_memory_size(void)
+{
+ return (uint64_t)-1;
+}
+
+unsigned int memory_devices_get_reserved_memslots(void)
+{
+ return 0;
+}
+
+bool memory_devices_memslot_auto_decision_active(void)
+{
+ return false;
+}
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
index faee1fe..1c1c6da 100644
--- a/hw/mem/meson.build
+++ b/hw/mem/meson.build
@@ -6,6 +6,7 @@ mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
mem_ss.add(when: 'CONFIG_CXL_MEM_DEVICE', if_true: files('cxl_type3.c'))
system_ss.add(when: 'CONFIG_CXL_MEM_DEVICE', if_false: files('cxl_type3_stubs.c'))
+system_ss.add(when: 'CONFIG_MEM_DEVICE', if_false: files('memory-device-stubs.c'))
system_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
system_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c'))