diff options
author | Sergio Andres Gomez Del Real <sergio.g.delreal@gmail.com> | 2017-09-13 04:05:21 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-22 15:01:48 +0100 |
commit | b7394c8394d38cb38b6db14eb431cac7a91e7140 (patch) | |
tree | 68ed6476103dfb40f8e214d33f2a2ad362f0434d /target/i386/cpu.c | |
parent | babfa20ca4721e950d8096f32b1dc091763a8837 (diff) | |
download | qemu-b7394c8394d38cb38b6db14eb431cac7a91e7140.zip qemu-b7394c8394d38cb38b6db14eb431cac7a91e7140.tar.gz qemu-b7394c8394d38cb38b6db14eb431cac7a91e7140.tar.bz2 |
i386: hvf: refactor event injection code for hvf
This patch refactors the event-injection code for hvf by using the
appropriate fields already provided by CPUX86State. At vmexit, it fills
these fields so that hvf_inject_interrupts can just retrieve them without
calling into hvf.
Signed-off-by: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com>
Message-Id: <20170913090522.4022-14-Sergio.G.DelReal@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/cpu.c')
-rw-r--r-- | target/i386/cpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index fcda760..3818d72 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3285,6 +3285,9 @@ static void x86_cpu_reset(CPUState *s) memset(env->mtrr_var, 0, sizeof(env->mtrr_var)); memset(env->mtrr_fixed, 0, sizeof(env->mtrr_fixed)); + env->interrupt_injected = -1; + env->exception_injected = -1; + env->nmi_injected = false; #if !defined(CONFIG_USER_ONLY) /* We hard-wire the BSP to the first CPU. */ apic_designate_bsp(cpu->apic_state, s->cpu_index == 0); |