From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCMjr-0004vR-Ka for qemu-devel@nongnu.org; Mon, 13 Jun 2016 03:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCMjo-0004TW-F3 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 03:56:51 -0400 Received: from mga09.intel.com ([134.134.136.24]:12443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCMjo-0004TE-8i for qemu-devel@nongnu.org; Mon, 13 Jun 2016 03:56:48 -0400 Date: Mon, 13 Jun 2016 15:55:50 +0800 From: Haozhong Zhang Message-ID: <20160613075550.4ikqkejen27zlcpr@hz-desktop> References: <20160603060944.17373-1-haozhong.zhang@intel.com> <20160603060944.17373-2-haozhong.zhang@intel.com> <20160603155753.GA15222@potion> <10fb3041-9b08-ea31-a04d-76169313fc21@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <10fb3041-9b08-ea31-a04d-76169313fc21@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , qemu-devel@nongnu.org, Richard Henderson , Eduardo Habkost , Marcelo Tosatti , "Michael S . Tsirkin" , kvm@vger.kernel.org, Boris Petkov , Tony Luck , Andi Kleen , Ashok Raj On 06/08/16 13:32, Paolo Bonzini wrote: > > > On 03/06/2016 17:57, Radim Krčmář wrote: > >> > + cenv->msr_ia32_feature_control |= > >> > + MSR_IA32_FEATURE_CONTROL_LMCE | > >> > + MSR_IA32_FEATURE_CONTROL_LOCKED; > > Locking right from the start breaks nested KVM, because nested relies on > > setting VMXON feature from inside of the guest. > > > > Do we keep it unlocked, or move everything into QEMU? > > > > (The latter seems simpler.) > > I think it should be moved into the firmware, with QEMU publishing the > desired setting via fw_cfg. The same as what is done in real hardware, > that's the KVM mantra. :) > > For v4 it's okay to just remove this. > > Paolo Currently, only VMX bits (bit 1 & 2), LMCE bit (bit 20) as well as lock bit (bit 0) in MSR_IA32_FEATURE_CONTROL are used for guest. The availability of features indicated by those bits (except the lock bit) can be discovered from cpuid and other MSR, so it looks not necessary to publish them via fw_cfg. Or do you have other concerns? Thanks, Haozhong