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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html