From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()
Date: Mon, 13 Jul 2009 21:29:16 +0800 [thread overview]
Message-ID: <200907132129.16579.sheng@linux.intel.com> (raw)
In-Reply-To: <4A5B275E.5070009@redhat.com>
On Monday 13 July 2009 20:23:58 Avi Kivity wrote:
> On 07/09/2009 12:00 PM, Sheng Yang wrote:
> > set_cr3() should already cover the TLB flushing.
> >
> > Signed-off-by: Sheng Yang<sheng@linux.intel.com>
> > ---
> > arch/x86/kvm/mmu.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> > index 231d880..501c11e 100644
> > --- a/arch/x86/kvm/mmu.c
> > +++ b/arch/x86/kvm/mmu.c
> > @@ -2349,8 +2349,8 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu)
> > spin_unlock(&vcpu->kvm->mmu_lock);
> > if (r)
> > goto out;
> > + /* set_cr3() should ensure TLB has been flushed */
> > kvm_x86_ops->set_cr3(vcpu, vcpu->arch.mmu.root_hpa);
> > - kvm_mmu_flush_tlb(vcpu);
> > out:
> > return r;
> > }
>
> Maybe we should drop the flushes in vmx/svm instead?
That's what I unsure about... mmu_load() with flushes sounds reasonable,
set_cr3() with flushes sounds a little more reasonable to me because I think
set_cr3() may shouldn't depends on caller to flush, which seems more direct.
--
regards
Yang, Sheng
next prev parent reply other threads:[~2009-07-13 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 9:00 [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load() Sheng Yang
2009-07-13 11:42 ` Sheng Yang
2009-07-13 13:51 ` Marcelo Tosatti
2009-07-13 12:23 ` Avi Kivity
2009-07-13 13:29 ` Sheng Yang [this message]
2009-07-15 19:04 ` Marcelo Tosatti
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=200907132129.16579.sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=avi@redhat.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 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.