cpus: extract out hvf-specific code to target/i386/hvf/

register a "CpusAccel" interface for HVF as well.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
[added const]
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Claudio Fontana 2020-07-07 11:50:13 +02:00 committed by Paolo Bonzini
parent 8ef39ecfa6
commit b52bcba7bd
5 changed files with 152 additions and 66 deletions

View file

@ -72,6 +72,8 @@
#include "sysemu/accel.h"
#include "target/i386/cpu.h"
#include "hvf-cpus.h"
HVFState *hvf_state;
static void assert_hvf_ok(hv_return_t ret)
@ -894,6 +896,7 @@ 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;
}