From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: [PATCH] Update registers after INIT/SIPI Date: Wed, 1 Jul 2009 18:48:09 +0300 Message-ID: <20090701154809.GA881@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: avi@redhat.com Return-path: Received: from mx2.redhat.com ([66.187.237.31]:49647 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbZGAPsI (ORCPT ); Wed, 1 Jul 2009 11:48:08 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n61FmCm5015658 for ; Wed, 1 Jul 2009 11:48:12 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Load updated register into kernel after INIT/SIPI. Otherwise vcpu starts at the wrong address after SIPI. Signed-off-by: Gleb Natapov diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 1eb147e..5d3025a 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1578,8 +1578,10 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, void kvm_arch_process_irqchip_events(CPUState *env) { + kvm_arch_save_regs(env); if (env->interrupt_request & CPU_INTERRUPT_INIT) do_cpu_init(env); if (env->interrupt_request & CPU_INTERRUPT_SIPI) do_cpu_sipi(env); + kvm_arch_load_regs(env); } -- Gleb.