]> git.proxmox.com Git - mirror_qemu.git/commitdiff
include/sysemu: Poison all accelerator CONFIG switches in common code
authorThomas Huth <thuth@redhat.com>
Wed, 14 Apr 2021 11:20:01 +0000 (13:20 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 14 May 2021 10:31:44 +0000 (12:31 +0200)
We are already poisoning CONFIG_KVM since this switch is not working
in common code. Do the same with the other accelerator switches, too
(except for CONFIG_TCG, which is special, since it is also defined in
config-host.h).

Message-Id: <20210414112004.943383-2-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
include/exec/poison.h
include/sysemu/hax.h
include/sysemu/hvf.h
include/sysemu/whpx.h

index 8fc7530b6eaab6e334474a2442d2f9ce34bc0694..a527def5f08cf3f8f0b8da9e8375ba6bd68af76d 100644 (file)
 #pragma GCC poison CONFIG_SPARC_DIS
 #pragma GCC poison CONFIG_XTENSA_DIS
 
+#pragma GCC poison CONFIG_HAX
+#pragma GCC poison CONFIG_HVF
 #pragma GCC poison CONFIG_LINUX_USER
 #pragma GCC poison CONFIG_KVM
 #pragma GCC poison CONFIG_SOFTMMU
+#pragma GCC poison CONFIG_WHPX
+#pragma GCC poison CONFIG_XEN
 
 #endif
index 12fb54f9902713443fa40e63cdf4d6b56e7b52ca..247f0661d1263b1dcd6d58d1144b547af2e82128 100644 (file)
@@ -24,6 +24,8 @@
 
 int hax_sync_vcpus(void);
 
+#ifdef NEED_CPU_H
+
 #ifdef CONFIG_HAX
 
 int hax_enabled(void);
@@ -34,4 +36,6 @@ int hax_enabled(void);
 
 #endif /* CONFIG_HAX */
 
+#endif /* NEED_CPU_H */
+
 #endif /* QEMU_HAX_H */
index c98636bc8127caa373fda281790349206a3b5070..bb70082e4581818ee20fa35b45e898345e3c5372 100644 (file)
@@ -16,6 +16,8 @@
 #include "qemu/accel.h"
 #include "qom/object.h"
 
+#ifdef NEED_CPU_H
+
 #ifdef CONFIG_HVF
 uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
                                  int reg);
@@ -26,6 +28,8 @@ extern bool hvf_allowed;
 #define hvf_get_supported_cpuid(func, idx, reg) 0
 #endif /* !CONFIG_HVF */
 
+#endif /* NEED_CPU_H */
+
 #define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
 
 typedef struct HVFState HVFState;
index 8ca1c1c4ac71428c15b957fc1cd02e34091f240c..2889fa2278b3d60b39fdd82d2b49cf8cbc0fe748 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef QEMU_WHPX_H
 #define QEMU_WHPX_H
 
+#ifdef NEED_CPU_H
+
 #ifdef CONFIG_WHPX
 
 int whpx_enabled(void);
@@ -25,4 +27,6 @@ bool whpx_apic_in_platform(void);
 
 #endif /* CONFIG_WHPX */
 
+#endif /* NEED_CPU_H */
+
 #endif /* QEMU_WHPX_H */