From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755411AbbIHOaF (ORCPT ); Tue, 8 Sep 2015 10:30:05 -0400 Received: from mga14.intel.com ([192.55.52.115]:29676 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754783AbbIHO37 (ORCPT ); Tue, 8 Sep 2015 10:29:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,490,1437462000"; d="scan'208";a="800676845" Subject: Re: [PATCH 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() To: Paolo Bonzini References: <1440132611-26052-1-git-send-email-guangrong.xiao@linux.intel.com> <1440132611-26052-9-git-send-email-guangrong.xiao@linux.intel.com> <55ED74B3.3070202@redhat.com> Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Xiao Guangrong Message-ID: <55EEEF81.2000502@linux.intel.com> Date: Tue, 8 Sep 2015 22:24:01 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55ED74B3.3070202@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2015 07:27 PM, Paolo Bonzini wrote: > > > On 21/08/2015 06:50, Xiao Guangrong wrote: >> >> +static void set_clear_2nd_exec_ctrl(u32 ctrls, bool set) >> +{ >> + u32 exec_ctrl = vmcs_read32(SECONDARY_VM_EXEC_CONTROL); >> + >> + if (set) >> + exec_ctrl |= ctrls; >> + else >> + exec_ctrl &= ~ctrls; >> + >> + vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_ctrl); >> +} > > The second argument is always true. No... There are 3 places calling this function with set=false: nested_release_vmcs12(), vmx_disable_pml() and vmx_cpuid_update() > Do you have any plans for it? > > Should we instead add functions like vmcs_or32 and vmcs_clear32? > Sounds good to me, will do it.