From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 7/9] KVM: VMX: Refactor vmx_complete_atomic_exit() Date: Mon, 21 Mar 2011 10:55:08 +0200 Message-ID: <4D87126C.6090301@redhat.com> References: <1299592665-12325-1-git-send-email-avi@redhat.com> <1299592665-12325-8-git-send-email-avi@redhat.com> <20110315214000.GA31424@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Gleb Natapov , Jan Kiszka To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11757 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985Ab1CUIzP (ORCPT ); Mon, 21 Mar 2011 04:55:15 -0400 In-Reply-To: <20110315214000.GA31424@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 03/15/2011 11:40 PM, Marcelo Tosatti wrote: > On Tue, Mar 08, 2011 at 03:57:43PM +0200, Avi Kivity wrote: > > Move the exit reason checks to the front of the function, for early > > exit in the common case. > > > > > > > static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx) > > { > > - u32 exit_intr_info = vmx->exit_intr_info; > > + u32 exit_intr_info; > > + > > + if (!(vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY > > + || vmx->exit_reason == EXIT_REASON_EXCEPTION_NMI)) > > + return; > > + > > + exit_intr_info = vmx->exit_intr_info; > > So you're saving a vmread on exception and mce_during_vmentry exits? Well, the real goal is patch 8, which removes the unconditional read of VM_EXIT_INTR_INFO. Right now we have 2 reads on exceptions and one on other exits, we drop both by 1. > Managing nmi_known_unmasked appears tricky... perhaps worthwhile to > have it in a helper that sets the bit in interruptibility info + > nmi_known_unmasked. I'll look into it, likely as an add-on patch. -- error compiling committee.c: too many arguments to function