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: Clear segment cache after switching between L1 and L2
Date: Wed, 27 Feb 2013 15:41:23 +0200 [thread overview]
Message-ID: <20130227134123.GK23616@redhat.com> (raw)
In-Reply-To: <51293629.7050605@web.de>
On Sat, Feb 23, 2013 at 10:35:37PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Switching the VMCS obviously invalidates what may have been cached about
> the guest segments.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied, thanks.
> ---
>
> Probably, the missing invalidations are harmless ATM, but you never
> know.
>
> arch/x86/kvm/vmx.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 94f3b66..d45f0e0 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -7236,6 +7236,8 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
> vcpu->cpu = cpu;
> put_cpu();
>
> + vmx_segment_cache_clear(vmx);
> +
> vmcs12->launch_state = 1;
>
> prepare_vmcs02(vcpu, vmcs12);
> @@ -7504,6 +7506,8 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu)
> vcpu->cpu = cpu;
> put_cpu();
>
> + vmx_segment_cache_clear(vmx);
> +
> /* if no vmcs02 cache requested, remove the one we used */
> if (VMCS02_POOL_SIZE == 0)
> nested_free_vmcs02(vmx, vmx->nested.current_vmptr);
> --
> 1.7.3.4
--
Gleb.
prev parent reply other threads:[~2013-02-27 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 21:35 [PATCH] KVM: nVMX: Clear segment cache after switching between L1 and L2 Jan Kiszka
2013-02-27 13:41 ` 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=20130227134123.GK23616@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.