qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state
Date: Sun, 29 Nov 2009 17:32:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4

On 11/26/2009 07:24 PM, Glauber Costa wrote:
This fix a bug with -smp in kvm. Since we have updated apic_base,
we also have to tell kernel about it. So instead of just updating
mp_state, update every regs.

Signed-off-by: Glauber Costa<address@hidden>
---
  hw/apic-kvm.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/apic-kvm.c b/hw/apic-kvm.c
index e5a0bfc..dc61386 100644
--- a/hw/apic-kvm.c
+++ b/hw/apic-kvm.c
@@ -126,7 +126,10 @@ static void kvm_apic_reset(void *opaque)
      s->cpu_env->mp_state
              = bsp ? KVM_MP_STATE_RUNNABLE : KVM_MP_STATE_UNINITIALIZED;

-    kvm_put_mp_state(s->cpu_env);
+    /* We have to tell the kernel about mp_state, but also save sregs, since
+     * apic base was just updated
+     */
+    kvm_arch_put_registers(s->cpu_env);


Better to use cpu_synchronize_state() instead.

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]