From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>,
qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Cc: alex.bennee@linaro.org, qemu-devel@nongnu.org, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v3 0/3] ppc: Broadcast tlb flush should have global effect
Date: Mon, 12 Sep 2016 16:05:43 +1000 [thread overview]
Message-ID: <1473660343.8689.239.camel@kernel.crashing.org> (raw)
In-Reply-To: <1473659314-11813-1-git-send-email-nikunj@linux.vnet.ibm.com>
On Mon, 2016-09-12 at 11:18 +0530, Nikunj A Dadhania wrote:
> PowerPC targets should do tlb invalidation on other cpus on
> instructions that expect a global effect.
>
> * ptesync for BookS
> * tlbsync primarily for BookE
> (for BookS make it a nop, as it always come along with ptesync)
> * tlbivax for other ppc tragets
> * H_REMOVE, H_BULK_REMOVE and H_PROTECT hcalls in case of pseries
The above is confusing.
The instructions that have global effects are tlbie (BookS) and tlbivax
(BookE) plus the H_CALLs since they contain a tlbie on a real
hypervisor.
The ptesync and tlbsync instructions are barriers use to synchronize
with the global invalidations. That means that we don't need to ensure
the global invalidations have completed until we hit those barriers.
We typically use them as a way to "batch" the invalidations in TCG.
> The implementation provides a single point that can be used in MTTCG
> for
> doing async-flushes.
>
> The patchset introduces bit-flags in CPUPPCState::tlb_need_flush:
>
> TLB_NEED_LOCAL_FLUSH (0x1) - Flush local tlb
> TLB_NEED_GLOBAL_FLUSH (0x2) - Flush tlb on other cpus.
>
> Nikunj A Dadhania (3):
> target-ppc: add TLB_NEED_LOCAL_FLUSH flag
> target-ppc: add flag in chech_tlb_flush()
> target-ppc: tlbie should have global effect
>
> hw/ppc/spapr_hcall.c | 6 ++++--
> target-ppc/cpu.h | 2 ++
> target-ppc/excp_helper.c | 4 ++--
> target-ppc/helper.h | 2 +-
> target-ppc/helper_regs.h | 25 +++++++++++++++++++++----
> target-ppc/mmu-hash64.c | 6 +++---
> target-ppc/mmu_helper.c | 20 ++++++++++++--------
> target-ppc/translate.c | 26 ++++++++++++++++----------
> 8 files changed, 61 insertions(+), 30 deletions(-)
>
next prev parent reply other threads:[~2016-09-12 6:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 5:48 [Qemu-devel] [PATCH v3 0/3] ppc: Broadcast tlb flush should have global effect Nikunj A Dadhania
2016-09-12 5:48 ` [Qemu-devel] [PATCH v3 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag Nikunj A Dadhania
2016-09-12 5:48 ` [Qemu-devel] [PATCH v3 2/3] target-ppc: add flag in chech_tlb_flush() Nikunj A Dadhania
2016-09-14 3:09 ` David Gibson
2016-09-14 3:49 ` Benjamin Herrenschmidt
2016-09-14 3:53 ` Nikunj A Dadhania
2016-09-14 4:37 ` Benjamin Herrenschmidt
2016-09-14 5:09 ` Nikunj A Dadhania
2016-09-14 5:18 ` David Gibson
2016-09-12 5:48 ` [Qemu-devel] [PATCH v3 3/3] target-ppc: tlbie should have global effect Nikunj A Dadhania
2016-09-12 6:08 ` Benjamin Herrenschmidt
2016-09-12 6:15 ` Nikunj A Dadhania
2016-09-12 6:21 ` Nikunj A Dadhania
2016-09-12 6:05 ` Benjamin Herrenschmidt [this message]
2016-09-12 6:16 ` [Qemu-devel] [PATCH v3 0/3] ppc: Broadcast tlb flush " Nikunj A Dadhania
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=1473660343.8689.239.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=alex.bennee@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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.