From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KyUO6-0002kD-Fs for qemu-devel@nongnu.org; Fri, 07 Nov 2008 11:40:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyUO4-0002jX-N2 for qemu-devel@nongnu.org; Fri, 07 Nov 2008 11:40:45 -0500 Received: from [199.232.76.173] (port=51115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyUO4-0002jE-GW for qemu-devel@nongnu.org; Fri, 07 Nov 2008 11:40:44 -0500 Received: from yw-out-1718.google.com ([74.125.46.158]:39181) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KyUO4-0001Mk-7Z for qemu-devel@nongnu.org; Fri, 07 Nov 2008 11:40:44 -0500 Received: by yw-out-1718.google.com with SMTP id 6so501277ywa.82 for ; Fri, 07 Nov 2008 08:40:42 -0800 (PST) Message-ID: <49146F87.1090909@codemonkey.ws> Date: Fri, 07 Nov 2008 10:40:39 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] kvm: sync registers? References: <491416EA.30706@redhat.com> <49144ABA.1030606@codemonkey.ws> <200811071631.54494.paul@codesourcery.com> In-Reply-To: <200811071631.54494.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > On Friday 07 November 2008, Anthony Liguori wrote: > >> Gerd Hoffmann wrote: >> >>> Hi, >>> >>> How does kvm sync registers between kernel and qemu env? >>> I see there are kvm_arch_{get,put}_registers() functions in >>> target-i386/kvm.c, but grep doesn't find a single call of them? >>> >> Right now, it doesn't. We should probably sync registers in the same >> places that kvm-userspace does (gdbstubs, vmport, etc.). >> >> I tried to always sync registers on every exit but this causes boot to >> fail. The same is true of kvm-userspace though and I've been meaning to >> dig into why this is. >> > > Maybe due to do with inconsistencies between the segment register contents and > the descriptor tables? I know I've written code that relies on this feature. > VT/SVM actually allow you to get at the descriptor tables/cache and we save/restore them in KVM. I only see this issue if I always save/restore registers so it leads me to think it's something more subtle. Regards, Anthony Liguori > Paul >