From: David Hildenbrand Subject: Re: [PATCH v2] kvm: nVMX: Remove superfluous VMX instruction fault checks Date: Tue, 25 Apr 2017 18:30:26 +0200 Message-ID: <348c0276-ace5-5188-8814-95c8bdb6168f@redhat.com> References: <20170421165340.92716-1-jmattson@google.com> <20170424152851.17976-1-jmattson@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm list To: Jim Mattson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:15306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424490AbdDYQa2 (ORCPT ); Tue, 25 Apr 2017 12:30:28 -0400 In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: >>> - >>> if (vmx->nested.vmxon) { >>> nested_vmx_failValid(vcpu, VMXERR_VMXON_IN_VMX_ROOT_OPERATION); >>> return kvm_skip_emulated_instruction(vcpu); >>> @@ -7161,30 +7151,18 @@ static int handle_vmon(struct kvm_vcpu *vcpu) >>> * Intel's VMX Instruction Reference specifies a common set of prerequisites >>> * for running VMX instructions (except VMXON, whose prerequisites are >>> * slightly different). It also specifies what exception to inject otherwise. >>> + * Note that many of these exceptions have priority over VM exits, so they >>> + * don't have to be checked again here. >>> */ >>> -static int nested_vmx_check_permission(struct kvm_vcpu *vcpu) >>> +static bool nested_vmx_check_permission(struct kvm_vcpu *vcpu) >> >> I'm a fan of splitting such changes out. (less noise for reviewing the >> actual magic). > > Do you mean you'd like to see separate patches for handle_vmon() and > nested_vmx_check_permission()? I was talking of the int->bool. But that is just my preference for reviewing. And by far not worth a resend :) > >> >> -- >> >> Thanks, >> >> David -- Thanks, David