diff mbox

Update registers after INIT/SIPI

Message ID 20090701154809.GA881@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov July 1, 2009, 3:48 p.m. UTC
Load updated register into kernel after INIT/SIPI. Otherwise
vcpu starts at the wrong address after SIPI.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity July 1, 2009, 3:53 p.m. UTC | #1
On 07/01/2009 06:48 PM, Gleb Natapov wrote:
> Load updated register into kernel after INIT/SIPI. Otherwise
> vcpu starts at the wrong address after SIPI.
>    

Applied, thanks.
diff mbox

Patch

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);
 }