Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/i386/cpu-sysemu: Inline kvm_apic_in_kernel()
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>
Message-ID: <20230904124325.79040-6-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
philmd authored and bonzini committed Sep 7, 2023
1 parent 28a43cb commit 721cf73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions target/i386/cpu-sysemu.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions target/i386/kvm/kvm_i386.h
Expand Up @@ -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() \
Expand Down

0 comments on commit 721cf73

Please sign in to comment.