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 1ZvlUh-0004qP-Ft for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:24:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvlUd-0004om-Gy for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:24:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvlUd-0004oB-BP for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:24:15 -0500 References: <1447070134-4324-1-git-send-email-huaitong.han@intel.com> <1447070134-4324-2-git-send-email-huaitong.han@intel.com> From: Paolo Bonzini Message-ID: <56409064.6040609@redhat.com> Date: Mon, 9 Nov 2015 13:24:04 +0100 MIME-Version: 1.0 In-Reply-To: <1447070134-4324-2-git-send-email-huaitong.han@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qemu, pkeys: add pkeys support for qemu cpuid handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Huaitong Han , rth@twiddle.net, afaerber@suse.de, ehabkost@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 09/11/2015 12:55, Huaitong Han wrote: > @@ -351,6 +362,7 @@ static const char *cpuid_6_feature_name[] = { > CPUID_7_0_EBX_FSGSBASE, CPUID_7_0_EBX_HLE, CPUID_7_0_EBX_AVX2, > CPUID_7_0_EBX_ERMS, CPUID_7_0_EBX_INVPCID, CPUID_7_0_EBX_RTM, > CPUID_7_0_EBX_RDSEED */ > +#define TCG_7_0_ECX_FEATURES (CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE) This should be zero. Apart from this detail, the QEMU parts look good. Paolo > #define TCG_APM_FEATURES 0 > #define TCG_6_EAX_FEATURES CPUID_6_EAX_ARAT > > @@ -408,6 +420,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { > .cpuid_reg = R_EBX, > .tcg_features = TCG_7_0_EBX_FEATURES, > }, > + [FEAT_7_0_ECX] = { > + .feat_names = cpuid_7_0_ecx_feature_name, > + .cpuid_eax = 7, > + .cpuid_needs_ecx = true, .cpuid_ecx = 0, > + .cpuid_reg = R_ECX, > + .tcg_features = TCG_7_0_ECX_FEATURES, > + },