From: Paul Mackerras <paulus@ozlabs.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: surajjs@au1.ibm.com, spopovyc@redhat.com, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: Book3S HV: Always flush TLB in kvmppc_alloc_reset_hpt()
Date: Thu, 11 Jan 2018 20:54:51 +1100 [thread overview]
Message-ID: <20180111095451.GG24294@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <20180110060439.21822-1-david@gibson.dropbear.id.au>
On Wed, Jan 10, 2018 at 05:04:39PM +1100, David Gibson wrote:
> The KVM_PPC_ALLOCATE_HTAB ioctl(), implemented by kvmppc_alloc_reset_hpt()
> is supposed to completely clear and reset a guest's Hashed Page Table (HPT)
> allocating or re-allocating it if necessary.
>
> In the case where an HPT of the right size already exists and it just
> zeroes it, it forces a TLB flush on all guest CPUs, to remove any stale TLB
> entries loaded from the old HPT.
>
> However, that situation can arise when the HPT is resizing as well - or
> even when switching from an RPT to HPT - so those cases need a TLB flush as
> well.
>
> So, move the TLB flush to trigger in all cases except for errors.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Paul, this is based on Paolo's KVM tree, but it should apply without
> modification to pretty much any vaguely current tree. It's a pretty
> nasty bug - the case we've found hitting it in the wild is a bit
> esoteric, but it could in theory affect other situations as well.
>
> Please apply ASAP, and should probably be queued for the stable
> branches as well.
Thanks, applied to my kvm-ppc-fixes branch, and I added
cc: stable@vger.kernel.org.
Paul.
prev parent reply other threads:[~2018-01-11 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 6:04 David Gibson
2018-01-11 9:54 ` Paul Mackerras [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=20180111095451.GG24294@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spopovyc@redhat.com \
--cc=surajjs@au1.ibm.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
all inboxes | Powered by JetHome®