whpx_apic_in_platform() is called from:
- pic_irq_request() in hw/i386/x86.c
- cpu_thread_is_idle() softmmu/cpus.c
- apic_get_class() in target/i386/cpu-sysemu.c
whpx_enabled() is called from:
- cpu_report_tpr_access() in target/i386/helper.c
By converting macros to a function, we can remove the
NEED_CPU_H dependency and build softmmu/cpus.c once
for all targets.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/sysemu/whpx.h | 15 +--------------
accel/stubs/whpx-stub.c | 21 +++++++++++++++++++++
target/i386/whpx/whpx-all.c | 2 +-
MAINTAINERS | 1 +
accel/stubs/meson.build | 1 +
5 files changed, 25 insertions(+), 15 deletions(-)
create mode 100644 accel/stubs/whpx-stub.c
diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
index 2889fa2278b..b32f46f9ebf 100644
--- a/include/sysemu/whpx.h
+++ b/include/sysemu/whpx.h
@@ -13,20 +13,7 @@
#ifndef QEMU_WHPX_H
#define QEMU_WHPX_H
-#ifdef NEED_CPU_H
-
-#ifdef CONFIG_WHPX
-
-int whpx_enabled(void);
+bool whpx_enabled(void);
bool whpx_apic_in_platform(void);
-#else /* CONFIG_WHPX */
-
-#define whpx_enabled() (0)
-#define whpx_apic_in_platform() (0)