On 4/3/25 16:58, Philippe Mathieu-Daudé wrote:
Hardware accelerators depends on the host, not the guest.
While this is true, no we can't unpoison those define.
They are applied per target, and not in config-host. So unpoisoining
them opens the possibility to miss something.
I would stick to clean up those ifdef instead, by exposing interface to
all code, and link appropriate stubs depending on the variant built.
Suggested-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
include/exec/poison.h | 4 ----
scripts/make-config-p oison.sh | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/exec/poison.h b/include/exec/poison.h
index 00aedc41d82..0574d683f6a 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -62,11 +62,7 @@
#pragma GCC poison CONFIG_SPARC_DIS
#pragma GCC poison CONFIG_XTENSA_DIS
-#pragma GCC poison CONFIG_HVF
#pragma GCC poison CONFIG_LINUX_USER
-#pragma GCC poison CONFIG_KVM
-#pragma GCC poison CONFIG_WHPX
-#pragma GCC poison CONFIG_XEN
#ifndef COMPILING_SYSTEM_VS_USER
#pragma GCC poison CONFIG_USER_ONLY
diff --git a/scripts/make-config-poison.sh b/scripts/make-config-poison.sh
index 2b36907e239..09d2384745f 100755
--- a/scripts/make-config-poison.sh
+++ b/scripts/make-config-poison.sh
@@ -8,6 +8,10 @@ fi
# but filter out several which are handled manually.
exec sed -n \
-e' /CONFIG_TCG/d' \
+ -e' /CONFIG_HVF/d' \
+ -e' /CONFIG_KVM/d' \
+ -e' /CONFIG_WHPX/d' \
+ -e' /CONFIG_XEN/d' \
-e '/CONFIG_USER_ONLY/d' \
-e '/CONFIG_SOFTMMU/d' \
-e '/^#define / {' \