From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH -v2] kvm: Emulate MOVBE Date: Wed, 24 Apr 2013 11:42:08 +0300 Message-ID: <20130424084208.GI12401@redhat.com> References: <20130416174236.GE5807@redhat.com> <20130417110433.GD11807@pd.tnic> <20130417133829.GH1682@redhat.com> <20130417140200.GE11807@pd.tnic> <20130418224848.GA20712@pd.tnic> <20130421094651.GA8997@redhat.com> <20130421113051.GB4594@pd.tnic> <20130421125115.GD8997@redhat.com> <20130423234150.GA31444@pd.tnic> <51771E53.30800@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Borislav Petkov , Andre Przywara , kvm@vger.kernel.org, =?utf-8?B?SsO2cmcgUsO2ZGVs?= , x86-ml To: "H. Peter Anvin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932250Ab3DXJcn (ORCPT ); Wed, 24 Apr 2013 05:32:43 -0400 Content-Disposition: inline In-Reply-To: <51771E53.30800@zytor.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 23, 2013 at 04:50:43PM -0700, H. Peter Anvin wrote: > On 04/23/2013 04:41 PM, Borislav Petkov wrote: > > > > Btw, in thinking about this more, I'm kinda sceptical we want to use the > > CPUID layout for this new KVM_GET_EMULATED_* ioctl. And the reason why > > I'm sceptical is that not every instruction is behind a CPUID capability > > bit and if we want to tell userspace that we do emulate any insn, even > > one for which there's no CPUID bit, we're going to have to either > > simulate a kvm-specific CPUID leaf or, maybe even better, come up with > > our own format for emulated capabilities. Maybe a bit vector with set > > bits for the respective capability, or something more nifty. > > > > In any case, it doesn't really need to be CPUID-like, IMHO. > > > > Using CPUID has the major advantage that it is well-defined. > This. And I really hope vendors will not add instructions without corespondent CPUID bits nowadays. -- Gleb.