From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [PATCH v4 3/3] i386: publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg Date: Mon, 20 Jun 2016 11:09:41 +0800 Message-ID: <20160620030941.2kro4d44b5degiya@hz-desktop> References: <20160616060621.30422-1-haozhong.zhang@intel.com> <20160616060621.30422-4-haozhong.zhang@intel.com> <20160616111951.yvmr6tznzw6tyxlx@hz-desktop> <603c703c-5142-4721-e5a3-2d147c32ccd1@redhat.com> <20160617202118.GA8131@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, Richard Henderson , Eduardo Habkost , "Michael S . Tsirkin" , Marcelo Tosatti , kvm@vger.kernel.org, Boris Petkov , Tony Luck , Andi Kleen To: "Raj, Ashok" , Laszlo Ersek , Paolo Bonzini , rkrcmar@redhat.com Return-path: Received: from mga09.intel.com ([134.134.136.24]:60434 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbcFTDJp (ORCPT ); Sun, 19 Jun 2016 23:09:45 -0400 Content-Disposition: inline In-Reply-To: <20160617202118.GA8131@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/17/16 13:21, Raj, Ashok wrote: > On Fri, Jun 17, 2016 at 07:31:08PM +0200, Laszlo Ersek wrote: > > >> > > >> On 16/06/2016 08:06, Haozhong Zhang wrote: > > >>> It's a prerequisite that certain bits of MSR_IA32_FEATURE_CONTROL should > > >>> be set before some features (e.g. VMX and LMCE) can be used, which is > > >>> usually done by the firmware. This patch adds a fw_cfg file > > >>> "etc/msr_feature_control" which contains the advised value of > > >>> MSR_IA32_FEATURE_CONTROL and can be used by guest firmware (e.g. SeaBIOS). > > >>> > > I'm sorry i'm joining this discussion a bit late returning from vacation. > In a real platform supporting LMCE, BIOS is responsible for setting the bits > for IA32_FEATURE_CONTROL correctly. There are good reasons why we want the > BIOS to play this role. > > in a virtualized environment, do we really have to push the same requirement > or would it suffice to just emulate it as we did in the early patches. > > Not sure what exact problem is created by just simply supporting it within > kvm/qemu and not needing the bios for the guest to also adapt these changes. > In the current nested VMX implementation in QEMU, setup MSR_IA32_FEATURE_CONTROL is left to guest. So I think, for LMCE which is another feature involving MSR_IA32_FEATURE_CONTROL, we may follow the existing code. Paolo and Radim, is there any case that objects to setting MSR_IA32_FEATURE_CONTROL in QEMU? Thanks, Haozhong From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEpaw-0003ei-J1 for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:09:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEpas-0005Sx-98 for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:09:49 -0400 Received: from mga04.intel.com ([192.55.52.120]:24408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEpas-0005So-31 for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:09:46 -0400 Date: Mon, 20 Jun 2016 11:09:41 +0800 From: Haozhong Zhang Message-ID: <20160620030941.2kro4d44b5degiya@hz-desktop> References: <20160616060621.30422-1-haozhong.zhang@intel.com> <20160616060621.30422-4-haozhong.zhang@intel.com> <20160616111951.yvmr6tznzw6tyxlx@hz-desktop> <603c703c-5142-4721-e5a3-2d147c32ccd1@redhat.com> <20160617202118.GA8131@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160617202118.GA8131@linux.intel.com> Subject: Re: [Qemu-devel] [PATCH v4 3/3] i386: publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Raj, Ashok" , Laszlo Ersek , Paolo Bonzini , rkrcmar@redhat.com Cc: qemu-devel@nongnu.org, Richard Henderson , Eduardo Habkost , "Michael S . Tsirkin" , Marcelo Tosatti , kvm@vger.kernel.org, Boris Petkov , Tony Luck , Andi Kleen On 06/17/16 13:21, Raj, Ashok wrote: > On Fri, Jun 17, 2016 at 07:31:08PM +0200, Laszlo Ersek wrote: > > >> > > >> On 16/06/2016 08:06, Haozhong Zhang wrote: > > >>> It's a prerequisite that certain bits of MSR_IA32_FEATURE_CONTROL should > > >>> be set before some features (e.g. VMX and LMCE) can be used, which is > > >>> usually done by the firmware. This patch adds a fw_cfg file > > >>> "etc/msr_feature_control" which contains the advised value of > > >>> MSR_IA32_FEATURE_CONTROL and can be used by guest firmware (e.g. SeaBIOS). > > >>> > > I'm sorry i'm joining this discussion a bit late returning from vacation. > In a real platform supporting LMCE, BIOS is responsible for setting the bits > for IA32_FEATURE_CONTROL correctly. There are good reasons why we want the > BIOS to play this role. > > in a virtualized environment, do we really have to push the same requirement > or would it suffice to just emulate it as we did in the early patches. > > Not sure what exact problem is created by just simply supporting it within > kvm/qemu and not needing the bios for the guest to also adapt these changes. > In the current nested VMX implementation in QEMU, setup MSR_IA32_FEATURE_CONTROL is left to guest. So I think, for LMCE which is another feature involving MSR_IA32_FEATURE_CONTROL, we may follow the existing code. Paolo and Radim, is there any case that objects to setting MSR_IA32_FEATURE_CONTROL in QEMU? Thanks, Haozhong