From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH V5 7/9] KVM, pkeys: expose CPUID/CR4 to guest Date: Mon, 21 Mar 2016 13:08:21 +0100 Message-ID: <56EFE435.6030000@redhat.com> References: <1458554760-4374-1-git-send-email-huaitong.han@intel.com> <1458554760-4374-8-git-send-email-huaitong.han@intel.com> <56EFDCC0.1080307@redhat.com> <1458561378.3453.2.camel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "gleb@kernel.org" , "kvm@vger.kernel.org" , "guangrong.xiao@linux.intel.com" To: "Han, Huaitong" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43450 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754416AbcCUMIZ (ORCPT ); Mon, 21 Mar 2016 08:08:25 -0400 In-Reply-To: <1458561378.3453.2.camel@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 21/03/2016 12:56, Han, Huaitong wrote: >> > + entry->ecx &= kvm_supported_word16_x86_features; >> > + cpuid_mask(&entry->ecx, 16); > cpuid_mask(&entry->ecx, CPUID_7_ECX), CPUID_7_ECX is better than 16? If the name of the variable is kvm_supported_word16_x86_features, it is not necessarily better. If we rename the variables with names like kvm_supported_cpuid_7_ecx_x86_features, then of course we use CPUID_7_ECX as well. Paolo