From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4] KVM: x86: Implement PCID/INVPCID for guests with EPT Date: Mon, 02 Jul 2012 11:59:42 +0300 Message-ID: <4FF162FE.4050200@redhat.com> References: <4FEC7CFB.5010001@redhat.com> <4FEDC104.70004@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "'kvm@vger.kernel.org'" To: "Mao, Junjie" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51054 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932591Ab2GBI7r (ORCPT ); Mon, 2 Jul 2012 04:59:47 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/02/2012 03:32 AM, Mao, Junjie wrote: >> > I think this means I can replace the code here with a check in >> nested_vmx_run. Do I understand correctly? >> >> Correct, but the check already exists: >> if (!vmx_control_verify(vmcs12->cpu_based_vm_exec_control, >> nested_vmx_procbased_ctls_low, >> nested_vmx_procbased_ctls_high) || >> !vmx_control_verify(vmcs12->secondary_vm_exec_control, >> nested_vmx_secondary_ctls_low, >> nested_vmx_secondary_ctls_high) || >> !vmx_control_verify(vmcs12->pin_based_vm_exec_control, >> nested_vmx_pinbased_ctls_low, nested_vmx_pinbased_ctls_high) >> || >> !vmx_control_verify(vmcs12->vm_exit_controls, >> nested_vmx_exit_ctls_low, nested_vmx_exit_ctls_high) || >> !vmx_control_verify(vmcs12->vm_entry_controls, >> nested_vmx_entry_ctls_low, nested_vmx_entry_ctls_high)) >> { >> nested_vmx_failValid(vcpu, >> VMXERR_ENTRY_INVALID_CONTROL_FIELD); >> return 1; >> } >> >> So all that is needed is to initializr nested_vmx_entry_ctls_high properly. > > nested_vmx_entry_ctls_high only contains SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES at present, which means it should be safe to simply remove the code. Yes, I misread the code as initializing it to what the cpu supports, but it is correct as is. So just drop this check. -- error compiling committee.c: too many arguments to function