summary refs log tree commit diff stats
path: root/accel
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-06-16 10:39:09 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-04 14:43:46 +0200
commit80a1efdedd3099cde51cabf91789e037a6af11df (patch)
treef854e3976faa25a5b060bbbb27141c2f903483e2 /accel
parent04bd6c3631e0184dcafb0403e0248a2052585914 (diff)
downloadfocaccia-qemu-80a1efdedd3099cde51cabf91789e037a6af11df.tar.gz
focaccia-qemu-80a1efdedd3099cde51cabf91789e037a6af11df.zip
accel/nvmm: Expose nvmm_enabled() to common code
Currently nvmm_enabled() is restricted to target-specific code.
By defining CONFIG_NVMM_IS_POSSIBLE we allow its use anywhere.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250703173248.44995-25-philmd@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/stubs/meson.build1
-rw-r--r--accel/stubs/nvmm-stub.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build
index 8ca1a4529e..4c34287215 100644
--- a/accel/stubs/meson.build
+++ b/accel/stubs/meson.build
@@ -3,5 +3,6 @@ system_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
 system_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
 system_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
 system_stubs_ss.add(when: 'CONFIG_HVF', if_false: files('hvf-stub.c'))
+system_stubs_ss.add(when: 'CONFIG_NVMM', if_false: files('nvmm-stub.c'))
 
 specific_ss.add_all(when: ['CONFIG_SYSTEM_ONLY'], if_true: system_stubs_ss)
diff --git a/accel/stubs/nvmm-stub.c b/accel/stubs/nvmm-stub.c
new file mode 100644
index 0000000000..ec14837501
--- /dev/null
+++ b/accel/stubs/nvmm-stub.c
@@ -0,0 +1,12 @@
+/*
+ * NVMM stubs for QEMU
+ *
+ *  Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "system/nvmm.h"
+
+bool nvmm_allowed;