From: Eduardo Habkost Subject: Re: [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode Date: Thu, 28 Apr 2016 14:34:43 -0300 Message-ID: <20160428173443.GA24153@thinpad.lan.raisama.net> References: <1461744786-47643-1-git-send-email-guangrong.xiao@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pbonzini@redhat.com, imammedo@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, dan.j.williams@intel.com, rth@twiddle.net, Dave Hansen , Eduardo Habkost , "Yu, Yu-cheng" , "Wang, Yong Y" , "virt-intel-list@redhat.com" , "Kasten, Robert A" , "Lai, Paul C" , "Xiao, Guangrong" , "ruwang@redhat.com" , "Shankar, Ravi V" , "Yu, Fenghua" To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41168 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753354AbcD1Req (ORCPT ); Thu, 28 Apr 2016 13:34:46 -0400 Content-Disposition: inline In-Reply-To: <1461744786-47643-1-git-send-email-guangrong.xiao@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: (CCing some additional Intel people) On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: > From: Eduardo Habkost > > Introduce Skylake-Client cpu mode which inherits the features from > Broadwell and supports some additional features that are: MPX, > XSAVEC, XSAVES and XGETBV1 > > Note: > 1. As XSAVES is disabled in upstream linux kernel by commit e88221c50 > (x86/fpu: Disable XSAVES* support for now), QEMU will complain about > "warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaves [bit 3]" I have been looking at the GET_SUPPORTED_CPUID code and I am not sure if commit e88221c50 is supposed to be affecting GET_SUPPORTED_CPUID, or not. It looks like it shouldn't, so I don't know why QEMU is reporting xsaves as unsupported. For reference, GET_SUPPORTED_CPUID code for function == 0xd && idx == 1 will run: unsigned f_xsaves = kvm_x86_ops->xsaves_supported() ? F(XSAVES) : 0; const u32 kvm_cpuid_D_1_eax_x86_features = F(XSAVEOPT) | F(XSAVEC) | F(XGETBV1) | f_xsaves; /* [...] */ do_cpuid_1_ent(&entry[i], function, idx); entry[i].eax &= kvm_cpuid_D_1_eax_x86_features; do_cpuid_1_ent() just executes the CPUID instruction. kvm_x86_ops->xsaves_supported is: static bool vmx_xsaves_supported(void) { return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_XSAVES; } Is GET_SUPPORTED_CPUID returning XSAVES as unsupported in the system where you are running tests? -- Eduardo