aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorClaudio Fontana <cfontana@suse.de>2020-08-11 15:16:33 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-05 16:41:22 +0200
commitbb4776be7733659bdbce4548e2c042107bad76f4 (patch)
tree7e02c1ea2062cea1e312f85c93f9a1b60414319c /target/i386
parent994aa172006a545e0e854ebbdb2edef6030f3ad3 (diff)
downloadqemu-bb4776be7733659bdbce4548e2c042107bad76f4.zip
qemu-bb4776be7733659bdbce4548e2c042107bad76f4.tar.gz
qemu-bb4776be7733659bdbce4548e2c042107bad76f4.tar.bz2
cpus: add handle_interrupt to the CpusAccel interface
kvm: uses the generic handler qtest: uses the generic handler whpx: changed to use the generic handler (identical implementation) hax: changed to use the generic handler (identical implementation) hvf: changed to use the generic handler (identical implementation) tcg: adapt tcg-cpus to point to the tcg-specific handler Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/hax-all.c10
-rw-r--r--target/i386/hvf/hvf.c9
-rw-r--r--target/i386/whpx-all.c10
3 files changed, 0 insertions, 29 deletions
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index b66ddeb..fd1ab67 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -297,15 +297,6 @@ int hax_vm_destroy(struct hax_vm *vm)
return 0;
}
-static void hax_handle_interrupt(CPUState *cpu, int mask)
-{
- cpu->interrupt_request |= mask;
-
- if (!qemu_cpu_is_self(cpu)) {
- qemu_cpu_kick(cpu);
- }
-}
-
static int hax_init(ram_addr_t ram_size, int max_cpus)
{
struct hax_state *hax = NULL;
@@ -350,7 +341,6 @@ static int hax_init(ram_addr_t ram_size, int max_cpus)
qversion.cur_version = hax_cur_version;
qversion.min_version = hax_min_version;
hax_notify_qemu_version(hax->vm->fd, &qversion);
- cpu_interrupt_handler = hax_handle_interrupt;
return ret;
error:
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 7ac6987..ed93565 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -262,14 +262,6 @@ static void update_apic_tpr(CPUState *cpu)
#define VECTORING_INFO_VECTOR_MASK 0xff
-static void hvf_handle_interrupt(CPUState * cpu, int mask)
-{
- cpu->interrupt_request |= mask;
- if (!qemu_cpu_is_self(cpu)) {
- qemu_cpu_kick(cpu);
- }
-}
-
void hvf_handle_io(CPUArchState *env, uint16_t port, void *buffer,
int direction, int size, int count)
{
@@ -894,7 +886,6 @@ static int hvf_accel_init(MachineState *ms)
}
hvf_state = s;
- cpu_interrupt_handler = hvf_handle_interrupt;
memory_listener_register(&hvf_memory_listener, &address_space_memory);
cpus_register_accel(&hvf_cpus);
return 0;
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 91ee2e5..f4f3e33 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -1488,15 +1488,6 @@ static void whpx_memory_init(void)
memory_listener_register(&whpx_memory_listener, &address_space_memory);
}
-static void whpx_handle_interrupt(CPUState *cpu, int mask)
-{
- cpu->interrupt_request |= mask;
-
- if (!qemu_cpu_is_self(cpu)) {
- qemu_cpu_kick(cpu);
- }
-}
-
/*
* Load the functions from the given library, using the given handle. If a
* handle is provided, it is used, otherwise the library is opened. The
@@ -1651,7 +1642,6 @@ static int whpx_accel_init(MachineState *ms)
whpx_memory_init();
- cpu_interrupt_handler = whpx_handle_interrupt;
cpus_register_accel(&whpx_cpus);
printf("Windows Hypervisor Platform accelerator is operational\n");