Commit 1d31f66b authored by Peter Maydell's avatar Peter Maydell Committed by Avi Kivity
Browse files

kvm: Move kvm_allows_irq0_override() to target-i386, fix return type



kvm_allows_irq0_override() is a totally x86 specific concept:
move it to the target-specific source file where it belongs.
This means we need a new header file for the prototype:
kvm_i386.h, in line with the existing kvm_ppc.h.

While we are moving it, fix the return type to be 'bool' rather
than 'int'.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 3889c3fa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include "sysbus.h"
#include "sysemu.h"
#include "kvm.h"
#include "kvm_i386.h"
#include "xen.h"
#include "blockdev.h"
#include "hw/block-common.h"
+0 −5
Original line number Diff line number Diff line
@@ -1701,11 +1701,6 @@ int kvm_has_gsi_routing(void)
#endif
}

int kvm_allows_irq0_override(void)
{
    return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
}

void *kvm_vmalloc(ram_addr_t size)
{
#ifdef TARGET_S390X
+0 −5
Original line number Diff line number Diff line
@@ -72,11 +72,6 @@ int kvm_has_many_ioeventfds(void)
    return 0;
}

int kvm_allows_irq0_override(void)
{
    return 1;
}

int kvm_has_pit_state2(void)
{
    return 0;
+0 −2
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ int kvm_has_pit_state2(void);
int kvm_has_many_ioeventfds(void);
int kvm_has_gsi_routing(void);

int kvm_allows_irq0_override(void);

#ifdef NEED_CPU_H
int kvm_init_vcpu(CPUArchState *env);

+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ obj-y += excp_helper.o fpu_helper.o cc_helper.o int_helper.o svm_helper.o
obj-y += smm_helper.o misc_helper.o mem_helper.o seg_helper.o
obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o
obj-$(CONFIG_KVM) += kvm.o hyperv.o
obj-$(CONFIG_NO_KVM) += kvm-stub.o
obj-$(CONFIG_LINUX_USER) += ioport-user.o
obj-$(CONFIG_BSD_USER) += ioport-user.o

Loading