From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NElll-0000Tr-8A for qemu-devel@nongnu.org; Sun, 29 Nov 2009 10:33:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEllg-0000Rl-Kn for qemu-devel@nongnu.org; Sun, 29 Nov 2009 10:33:00 -0500 Received: from [199.232.76.173] (port=50918 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEllg-0000Rg-9d for qemu-devel@nongnu.org; Sun, 29 Nov 2009 10:32:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48073) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NEllf-0001YQ-S7 for qemu-devel@nongnu.org; Sun, 29 Nov 2009 10:32:56 -0500 Message-ID: <4B129425.8090006@redhat.com> Date: Sun, 29 Nov 2009 17:32:53 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state References: <1259256300-23937-1-git-send-email-glommer@redhat.com> <1259256300-23937-2-git-send-email-glommer@redhat.com> <1259256300-23937-3-git-send-email-glommer@redhat.com> <1259256300-23937-4-git-send-email-glommer@redhat.com> <1259256300-23937-5-git-send-email-glommer@redhat.com> <1259256300-23937-6-git-send-email-glommer@redhat.com> In-Reply-To: <1259256300-23937-6-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org 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 > --- > 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