From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH -v2] kvm: Emulate MOVBE Date: Wed, 17 Apr 2013 13:04:34 +0200 Message-ID: <20130417110433.GD11807@pd.tnic> References: <20130410112942.07dfc167@slackpad> <20130410100845.GB17919@redhat.com> <20130410123901.46b65169@slackpad> <20130410121639.GE17919@redhat.com> <20130411001815.GA17544@pd.tnic> <20130411142818.GA17919@redhat.com> <20130411153733.GE27062@pd.tnic> <20130414074107.GD17919@redhat.com> <20130414173215.GD20547@pd.tnic> <20130416174236.GE5807@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Andre Przywara , kvm@vger.kernel.org, =?utf-8?B?SsO2cmcgUsO2ZGVs?= , "H. Peter Anvin" , x86-ml To: Gleb Natapov Return-path: Received: from mail.skyhub.de ([78.46.96.112]:51771 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965813Ab3DQLEk (ORCPT ); Wed, 17 Apr 2013 07:04:40 -0400 Content-Disposition: inline In-Reply-To: <20130416174236.GE5807@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 16, 2013 at 08:42:36PM +0300, Gleb Natapov wrote: > > Right, and this is what we have, AFAICT. And if userspace does that what > > you exemplify above, you get exactly that - a feature bit not set in > > CPUID but KVM reporting it set means, it is emulated. There's no room > > for other interpretations here. Which probably means also not optimal > > because it is not done in hw. > > > This is not true for all emulated CPUID bits. X2APIC is emulated and it > is preferable for a guest to use it for example. Right, and on boxes without X2APIC support you will not find CPUID(1).ECX[21] set. kvm will tell you it is supported, though, which means, kvm emulates it. > > Or, do you want to have a way to say with KVM_GET_SUPPORTED_CPUID that > > "the features I'm reporting to you are those - a subset of them are not > > optimally supported because I'm emulating them." > > > > Am I close? > > > Yes, you are. I am considering such interface. Adding new specialized > interfaces is last resort though. I am open to other ideas. Hmm, ok, so basically we want qemu to query the host CPUID and see which features are *really* supported, then do KVM_GET_SUPPORTED_CPUID and see which are emulated. How's that? Too simple? I probably am missing something as a novice qemu user. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --