From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
"Nadav Har'El" <nyh@math.technion.ac.il>,
"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH] KVM: nVMX: Use cached exit reason
Date: Wed, 27 Feb 2013 15:47:49 +0200 [thread overview]
Message-ID: <20130227134749.GL23616@redhat.com> (raw)
In-Reply-To: <512A1186.3060203@web.de>
On Sun, Feb 24, 2013 at 02:11:34PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> No need to re-read what vmx_vcpu_run already picked up for us.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied, thanks.
> ---
> arch/x86/kvm/vmx.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index d45f0e0..ccb6456 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6082,10 +6082,10 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
> */
> static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
> {
> - u32 exit_reason = vmcs_read32(VM_EXIT_REASON);
> u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
> struct vcpu_vmx *vmx = to_vmx(vcpu);
> struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
> + u32 exit_reason = vmx->exit_reason;
>
> if (vmx->nested.nested_run_pending)
> return 0;
> @@ -7364,7 +7364,7 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
>
> /* update exit information fields: */
>
> - vmcs12->vm_exit_reason = vmcs_read32(VM_EXIT_REASON);
> + vmcs12->vm_exit_reason = to_vmx(vcpu)->exit_reason;
Well, this can be called after migration, so vcpu->exit_reason will be
incorrect, but we all know how well migration works today with nested
guests.
> vmcs12->exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
>
> vmcs12->vm_exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
> --
> 1.7.3.4
--
Gleb.
prev parent reply other threads:[~2013-02-27 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-24 13:11 [PATCH] KVM: nVMX: Use cached exit reason Jan Kiszka
2013-02-27 13:47 ` Gleb Natapov [this message]
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=20130227134749.GL23616@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=jun.nakajima@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=nyh@math.technion.ac.il \
/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