From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: enable sysenter on 32bit guests Date: Sun, 21 Jun 2009 13:04:36 +0300 Message-ID: <4A3E05B4.6010701@redhat.com> References: <20090618173852.GT12816@random.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Andrea Arcangeli Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53614 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbZFUKDw (ORCPT ); Sun, 21 Jun 2009 06:03:52 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5LA3t9q030745 for ; Sun, 21 Jun 2009 06:03:55 -0400 In-Reply-To: <20090618173852.GT12816@random.random> Sender: kvm-owner@vger.kernel.org List-ID: On 06/18/2009 08:38 PM, Andrea Arcangeli wrote: > From: Andrea Arcangeli > > model=2 is not existent when vendor is intel and an errata of P6 says > that any model<= 2 when family is 6 lack sap feature, so windows and > linux 32bit guests disable sap in software and slowdown for no good > reason when running inside kvm on intel CPU. > > Fix is to set model = 3 so it'll be the duron cpu when kvm runs on amd bare > metal (not anymore athlon but userland doesn't see the difference) and it'll be > PII that has sysenter functional like all cpus that run KVM have too when on > intel bare metal. > > Patch will follow, workaround without this fix is -cpu qemu64,model=3. > > There is a bug in skype that it checks if the sep feature is set to > run sysenter on intel chip inside its binary without passing through > ntdll, without verifying the model was<= 2 like windows does, so > windows forbids sysenter but skype calls it anyway. This is skype bug > and it would trigger on real P6 hardware too (but nobody tests skype > on P6). qemu64,-sep fixed skype. But because every time we have an > intel cpu running kvm, we also have sysenter functioning, we boots the > model to 3 so windows 32bit (and linux32bit) gets a boost with > sysenter too. > > Please post to qemu-devel since it affects upstream too. > - .model = 2, > + /* AMD Duron || PII Intel with sep capbility - P6 has no sep */ > + .model = 3, > But detab it first... -- error compiling committee.c: too many arguments to function