From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: e500mc: Relax tlb invalidation condition on vcpu schedule
Date: Tue, 17 Jun 2014 10:33:06 -0500 [thread overview]
Message-ID: <1403019186.6603.722.camel@snotra.buserror.net> (raw)
In-Reply-To: <5399DDA8.5060404@suse.de>
On Thu, 2014-06-12 at 19:04 +0200, Alexander Graf wrote:
> On 06/12/2014 04:00 PM, Mihai Caraman wrote:
> > @@ -140,12 +142,24 @@ static void kvmppc_core_vcpu_load_e500mc(struct kvm_vcpu *vcpu, int cpu)
> > mtspr(SPRN_GDEAR, vcpu->arch.shared->dar);
> > mtspr(SPRN_GESR, vcpu->arch.shared->esr);
> >
> > - if (vcpu->arch.oldpir != mfspr(SPRN_PIR) ||
> > - __get_cpu_var(last_vcpu_on_cpu) != vcpu) {
> > - kvmppc_e500_tlbil_all(vcpu_e500);
> > + if (vcpu->arch.oldpir != mfspr(SPRN_PIR)) {
> > + /* tlb entries deprecated */
> > + inval_tlb = update_last = true;
> > + } else if (__get_cpu_var(last_vcpu_on_cpu) != vcpu) {
> > + update_last = true;
> > + /* tlb entries polluted */
> > + inval_tlb = __get_cpu_var(last_lpid_on_cpu) ==
> > + vcpu->kvm->arch.lpid;
> > + }
What about the following sequence on one CPU:
LPID 1, vcpu A
LPID 2, vcpu C
LPID 1, vcpu B
LPID 2, vcpu C doesn't invalidate
LPID 1, vcpu A doesn't invalidate
In the last line, vcpu A last ran on this cpu (oldpir matches), but LPID
2 last ran on this cpu (last_lpid_on_cpu does not match) -- but an
invalidation has never happened since vcpu B from LPID 1 ran on this
cpu.
-Scott
prev parent reply other threads:[~2014-06-17 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 14:00 [PATCH] KVM: PPC: e500mc: Relax tlb invalidation condition on vcpu schedule Mihai Caraman
2014-06-12 17:04 ` Alexander Graf
2014-06-13 14:43 ` mihai.caraman
2014-06-13 14:55 ` Alexander Graf
2014-06-13 19:42 ` Scott Wood
2014-06-17 9:08 ` Alexander Graf
2014-06-17 12:00 ` mihai.caraman
2014-06-17 15:33 ` Scott Wood [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=1403019186.6603.722.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mihai.caraman@freescale.com \
/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;
as well as URLs for NNTP newsgroup(s).