From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() Date: Tue, 8 Sep 2015 22:24:01 +0800 Message-ID: <55EEEF81.2000502@linux.intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Paolo Bonzini Return-path: In-Reply-To: <55ED74B3.3070202@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.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 =3D vmcs_read32(SECONDARY_VM_EXEC_CONTROL); >> + >> + if (set) >> + exec_ctrl |=3D ctrls; >> + else >> + exec_ctrl &=3D ~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=3Dfalse=EF=BC=9A 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.