[PATCH v2 14/18] memory-device: move stubs out of stubs/

Paolo Bonzini posted 7 patches 1 year, 10 months ago
Maintainers: Jason Wang <jasowang@redhat.com>, Andrew Melnychenko <andrew@daynix.com>, Yuri Benditovich <yuri.benditovich@daynix.com>, Gerd Hoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, "Alex Bennée" <alex.bennee@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
[PATCH v2 14/18] memory-device: move stubs out of stubs/
Posted by Paolo Bonzini 1 year, 10 months ago
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>
---
 stubs/memory_device.c => hw/mem/memory-device-stubs.c | 0
 hw/mem/meson.build                                    | 1 +
 stubs/meson.build                                     | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename stubs/memory_device.c => hw/mem/memory-device-stubs.c (100%)

diff --git a/stubs/memory_device.c b/hw/mem/memory-device-stubs.c
similarity index 100%
rename from stubs/memory_device.c
rename to hw/mem/memory-device-stubs.c
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
index faee1fe9360..1c1c6da24b5 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'))
diff --git a/stubs/meson.build b/stubs/meson.build
index 92887660e41..a4404e765ab 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -31,7 +31,6 @@ stub_ss.add(files('monitor.c'))
 stub_ss.add(files('monitor-core.c'))
 stub_ss.add(files('physmem.c'))
 stub_ss.add(files('qemu-timer-notify-cb.c'))
-stub_ss.add(files('memory_device.c'))
 stub_ss.add(files('qmp-command-available.c'))
 stub_ss.add(files('qmp-quit.c'))
 stub_ss.add(files('qtest.c'))
-- 
2.44.0
Re: [PATCH v2 14/18] memory-device: move stubs out of stubs/
Posted by Philippe Mathieu-Daudé 1 year, 10 months ago
On 8/4/24 17:53, Paolo Bonzini wrote:
> 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>
> ---
>   stubs/memory_device.c => hw/mem/memory-device-stubs.c | 0
>   hw/mem/meson.build                                    | 1 +
>   stubs/meson.build                                     | 1 -
>   3 files changed, 1 insertion(+), 1 deletion(-)
>   rename stubs/memory_device.c => hw/mem/memory-device-stubs.c (100%)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH v2 14/18] memory-device: move stubs out of stubs/
Posted by Richard Henderson 1 year, 10 months ago
On 4/8/24 05:53, Paolo Bonzini wrote:
> 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>
> ---
>   stubs/memory_device.c => hw/mem/memory-device-stubs.c | 0
>   hw/mem/meson.build                                    | 1 +
>   stubs/meson.build                                     | 1 -
>   3 files changed, 1 insertion(+), 1 deletion(-)
>   rename stubs/memory_device.c => hw/mem/memory-device-stubs.c (100%)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~