From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJZlL-0001OZ-1w for qemu-devel@nongnu.org; Wed, 24 Jun 2009 17:12:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJZlG-0001GM-78 for qemu-devel@nongnu.org; Wed, 24 Jun 2009 17:12:10 -0400 Received: from [199.232.76.173] (port=49223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJZlG-0001Fz-1o for qemu-devel@nongnu.org; Wed, 24 Jun 2009 17:12:06 -0400 Received: from mx2.redhat.com ([66.187.237.31]:33691) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJZlF-00027S-Hw for qemu-devel@nongnu.org; Wed, 24 Jun 2009 17:12:05 -0400 Date: Wed, 24 Jun 2009 23:12:00 +0200 From: Andrea Arcangeli Subject: Re: [Qemu-devel] allow sysenter on 32bit guests running on vmx host Message-ID: <20090624211200.GD15263@random.random> References: <20090623162140.GB4379@random.random> <20090624172934.GG14121@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090624172934.GG14121@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org Hi Jamie, thanks for review! On Wed, Jun 24, 2009 at 06:29:34PM +0100, Jamie Lokier wrote: > So your patch should make no difference to Linux guests. Did you > check Linux behaviour? Does Windows ignore the vendor id? Maybe I wasn't clear enough, this patch only makes a difference for KVM. KVM switches the vendor id to Intel when run on vmx host. It definitely makes a difference to linux guest, without this patch 32bit linux run as guest on top of KVM has sep disabled in /proc/cpuinfo and isn't using sysenter (just like windows, hence the skype crash). I verified 32bit linux guest has sep enabled with this patch applied when run on KVM on top of intel. For AMD the change is a noop because it changes the model from Athlon to Duron. > Only on 64-bit host, of course. > > I see the "qemu32" version has model=3, stepping =3 already :-) Yes, problem only happens on 64bit intel host running a 32bit guest (windows skype crash or linux slowdown) on KVM. > It makes sense to change the model number for AMD anyway, as AMD > Athlons don't have the sep feature, even though this isn't a real CPU id. No I don't think Duron has sep either... this should be noop for qemu and a noop for KVM run on AMD. > /* Intel sep feature is broken before family/model/stepping 6/3/3, > and Windows guests wrongly ignore AMD vendor id when checking. */ I think we should specify this makes the cpu a duron on AMD and a PII on intel and your comment removed that info but sure you're welcome to change it ;). Another approach is to switch model to 3 along with vendor_id in KVM but because qemu is already using 6/3/3 when emulating a 32bit x86 hardware, I don't think this is simpler and more consistent.