Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755607AbdGKIjY (ORCPT ); Tue, 11 Jul 2017 04:39:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48961 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755274AbdGKIjW (ORCPT ); Tue, 11 Jul 2017 04:39:22 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8A7EC04B92B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D8A7EC04B92B Subject: Re: [PATCH v4 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor To: David Hildenbrand , Bandan Das , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <20170710204936.4001-1-bsd@redhat.com> <20170710204936.4001-4-bsd@redhat.com> <2d50ebc4-9328-ce08-b55b-6a331ee13cc3@redhat.com> From: Paolo Bonzini Message-ID: <1f56ecac-501f-b5fc-e6f2-8dbcac6fb63e@redhat.com> Date: Tue, 11 Jul 2017 10:39:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <2d50ebc4-9328-ce08-b55b-6a331ee13cc3@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 11 Jul 2017 08:39:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 648 Lines: 18 On 11/07/2017 09:51, David Hildenbrand wrote: >> +static inline bool nested_cpu_has_eptp_switching(struct vmcs12 *vmcs12) >> +{ >> + return nested_cpu_has_vmfunc(vmcs12) && >> + (vmcs12->vm_function_control & > > I wonder if it makes sense to rename vm_function_control to > - vmfunc_control > - vmfunc_controls (so it matches nested_vmx_vmfunc_controls) > - vmfunc_ctrl Blame Intel for this. :) They use full English names for VMCS fields (so "VM-function control") and uppercase names for MSRs (so "IA32_VMX_VMFUNC"). "nested_vmx_vmfunc_controls" could be renamed to "nested_vmx_vmfunc" for consistency, but I like the longer name too. Paolo