[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel() |
Date: |
Mon, 4 Sep 2023 14:43:16 +0200 |
In order to have cpu-sysemu.c become accelerator-agnostic,
inline kvm_apic_in_kernel() -- which is a simple wrapper
to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h"
header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/kvm/kvm_i386.h | 2 --
target/i386/cpu-sysemu.c | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h
index e24753abfe..470627b750 100644
--- a/target/i386/kvm/kvm_i386.h
+++ b/target/i386/kvm/kvm_i386.h
@@ -13,8 +13,6 @@
#include "sysemu/kvm.h"
-#define kvm_apic_in_kernel() (kvm_irqchip_in_kernel())
-
#ifdef CONFIG_KVM
#define kvm_pit_in_kernel() \
diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c
index 28115edf44..2375e48178 100644
--- a/target/i386/cpu-sysemu.c
+++ b/target/i386/cpu-sysemu.c
@@ -19,9 +19,9 @@
#include "qemu/osdep.h"
#include "cpu.h"
+#include "sysemu/kvm.h"
#include "sysemu/xen.h"
#include "sysemu/whpx.h"
-#include "kvm/kvm_i386.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-run-state.h"
#include "qapi/qmp/qdict.h"
@@ -253,7 +253,7 @@ APICCommonClass *apic_get_class(Error **errp)
/* TODO: in-kernel irqchip for hvf */
if (kvm_enabled()) {
- if (!kvm_apic_in_kernel()) {
+ if (!kvm_irqchip_in_kernel()) {
error_setg(errp, "KVM does not support userspace APIC");
return NULL;
}
--
2.41.0
- [PATCH 00/13] target/i386: Cleanups around KVM declarations, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 01/13] hw/i386/pc: Include missing 'sysemu/tcg.h' header, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 02/13] hw/i386/pc: Include missing 'cpu.h' header, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 03/13] hw/i386/fw_cfg: Include missing 'cpu.h' header, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 04/13] target/i386/helper: Restrict KVM declarations to system emulation, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel(),
Philippe Mathieu-Daudé <=
- [PATCH 06/13] target/i386: Remove unused KVM stubs, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 07/13] target/i386: Allow elision of kvm_enable_x2apic(), Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 08/13] target/i386: Allow elision of kvm_hv_vpindex_settable(), Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 11/13] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 09/13] target/i386: Restrict declarations specific to CONFIG_KVM, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 10/13] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH 12/13] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets, Philippe Mathieu-Daudé, 2023/09/04