From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH -v2] kvm: Emulate MOVBE Date: Thu, 11 Apr 2013 17:37:33 +0200 Message-ID: <20130411153733.GE27062@pd.tnic> References: <20130409234602.GI5077@pd.tnic> <20130410112942.07dfc167@slackpad> <20130410100845.GB17919@redhat.com> <20130410123901.46b65169@slackpad> <20130410121639.GE17919@redhat.com> <20130411001815.GA17544@pd.tnic> <20130411142818.GA17919@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]:34879 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964790Ab3DKPhj (ORCPT ); Thu, 11 Apr 2013 11:37:39 -0400 Content-Disposition: inline In-Reply-To: <20130411142818.GA17919@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Apr 11, 2013 at 05:28:18PM +0300, Gleb Natapov wrote: > On Thu, Apr 11, 2013 at 02:18:15AM +0200, Borislav Petkov wrote: > > On Wed, Apr 10, 2013 at 03:16:39PM +0300, Gleb Natapov wrote: > > > Right, the question is how kernel can tell QEMU that the cpuid bit is > > > supported but should not be set unless explicitly asked by an user. > > > > Actually, this seems to work with the patch below based on whether you > > have "+movbe" in the -cpu option or not. > > > The problem is that -cpu host will have it unconditionally and this is > definitely not what we want. Hmm, ok, I see what you mean. -cpu host boots the atom kernel just fine. Well, with my limited qemu exposure, I'd guess cpu_x86_parse_featurestr() would need to somehow say to x86_cpu_realizefn that it has parsed a "+movbe" on the command line and the latter has to keep that bit enabled when doing the checks against kvm in kvm_check_features_against_host and filter_features_for_kvm(). Unless you have a better idea, that is. Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --