From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH 7/9] KVM: VMX: Refactor vmx_complete_atomic_exit()
Date: Tue, 15 Mar 2011 18:40:00 -0300 [thread overview]
Message-ID: <20110315214000.GA31424@amt.cnet> (raw)
In-Reply-To: <1299592665-12325-8-git-send-email-avi@redhat.com>
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.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
> arch/x86/kvm/vmx.c | 15 +++++++++------
> 1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 6eadeaf..36fbe11 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -3879,17 +3879,20 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
>
> 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?
Managing nmi_known_unmasked appears tricky... perhaps worthwhile to
have it in a helper that sets the bit in interruptibility info +
nmi_known_unmasked.
next prev parent reply other threads:[~2011-03-15 21:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 13:57 [PATCH 0/9] Some vmx vmexit optimizations Avi Kivity
2011-03-08 13:57 ` [PATCH 1/9] KVM: Use kvm_get_rflags() and kvm_set_rflags() instead of the raw versions Avi Kivity
2011-03-08 13:57 ` [PATCH 2/9] KVM: VMX: Optimize vmx_get_rflags() Avi Kivity
2011-03-08 13:57 ` [PATCH 3/9] KVM: VMX: Optimize vmx_get_cpl() Avi Kivity
2011-03-08 13:57 ` [PATCH 4/9] KVM: VMX: Cache cpl Avi Kivity
2011-03-08 14:20 ` Gleb Natapov
2011-03-08 14:29 ` Avi Kivity
2011-03-08 14:38 ` Gleb Natapov
2011-03-08 13:57 ` [PATCH 5/9] KVM: VMX: Avoid vmx_recover_nmi_blocking() when unneeded Avi Kivity
2011-03-08 13:57 ` [PATCH 6/9] KVM: VMX: Qualify check for host NMI Avi Kivity
2011-03-08 13:57 ` [PATCH 7/9] KVM: VMX: Refactor vmx_complete_atomic_exit() Avi Kivity
2011-03-15 21:40 ` Marcelo Tosatti [this message]
2011-03-21 8:55 ` Avi Kivity
2011-03-08 13:57 ` [PATCH 8/9] KVM: VMX: Don't VMREAD VM_EXIT_INTR_INFO unconditionally Avi Kivity
2011-03-08 13:57 ` [PATCH 9/9] KVM: VMX: Use cached VM_EXIT_INTR_INFO in handle_exception Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110315214000.GA31424@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox