diff options
Diffstat (limited to 'hw/i386')
| -rw-r--r-- | hw/i386/kvmvapic.c | 5 | ||||
| -rw-r--r-- | hw/i386/pc_q35.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 82a49556af..0d9ef77580 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -410,7 +410,8 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) handlers = &s->rom_state.mp; } - if (!kvm_enabled()) { + if (tcg_enabled()) { + cpu_restore_state(cs, cs->mem_io_pc); cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base, ¤t_flags); /* Account this instruction, because we will exit the tb. @@ -456,7 +457,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) resume_all_vcpus(); - if (!kvm_enabled()) { + if (tcg_enabled()) { /* Both tb_lock and iothread_mutex will be reset when * longjmps back into the cpu_exec loop. */ tb_lock(); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1523ef39e1..8f696b7cb6 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -36,6 +36,7 @@ #include "hw/timer/mc146818rtc.h" #include "hw/xen/xen.h" #include "sysemu/kvm.h" +#include "kvm_i386.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "exec/address-spaces.h" |