From 232fc23bed97f92b939d5b2802a481c1dea5991b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 5 May 2012 01:14:41 +0200 Subject: target-i386: Pass X86CPU to do_cpu_{init,sipi}() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber Reviewed-by: Igor Mammedov --- target-i386/kvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'target-i386/kvm.c') diff --git a/target-i386/kvm.c b/target-i386/kvm.c index e74a9e4..0d0d8f6 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1698,6 +1698,8 @@ void kvm_arch_post_run(CPUX86State *env, struct kvm_run *run) int kvm_arch_process_async_events(CPUX86State *env) { + X86CPU *cpu = x86_env_get_cpu(env); + if (env->interrupt_request & CPU_INTERRUPT_MCE) { /* We must not raise CPU_INTERRUPT_MCE if it's not supported. */ assert(env->mcg_cap); @@ -1732,11 +1734,11 @@ int kvm_arch_process_async_events(CPUX86State *env) } if (env->interrupt_request & CPU_INTERRUPT_INIT) { kvm_cpu_synchronize_state(env); - do_cpu_init(env); + do_cpu_init(cpu); } if (env->interrupt_request & CPU_INTERRUPT_SIPI) { kvm_cpu_synchronize_state(env); - do_cpu_sipi(env); + do_cpu_sipi(cpu); } if (env->interrupt_request & CPU_INTERRUPT_TPR) { env->interrupt_request &= ~CPU_INTERRUPT_TPR; -- cgit v1.1