qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] target/arm: Minimize TLB flushing for ASID changes
@ 2018-10-29 15:53 Richard Henderson
  2018-10-29 15:53 ` [Qemu-devel] [PATCH 1/4] cputlb: Add tlb_set_asid_for_mmuidx Richard Henderson
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Richard Henderson @ 2018-10-29 15:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

In http://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg04181.html
(already upstream) I added a check for ASID changes without realizing
that TTBCR_EL1 has the A1 bit, controlling which register actually
contains the active ASID.

In http://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg04182.html
I suggested a set of mmu_idx to flush when the ASID does change.  In
follow-up, Peter suggested more.

I now choose secure vs non-secure mmu_idx based on which register is being
modified, not the current state of the cpu.  Unless I am mistaken, secure
state can write to the non-secure registers.  Which means that the current
state of the cpu is irrelevant and only the register matters.

Peter suggested flushing S1E3 when changing ttbr0_s.  I can see how this
is overlapped onto the EL3 (Secure Monitor) state, but I cannot see how
the ASID is used from EL3.  The best evidence I can find for this is that
there is no TLBIASID* register that is applicable to flushing EL3; that's
not conclusive proof though.  So while I'm not sure it's necessary, I'm
also not sure it isn't necessary, and so I've included S1E3 in the flush.

I now also use the VMID to conditionally invalidate the stage 2 translation
state.  This shows how I anticipaged @depmap to be used in patch 1.


r~


Richard Henderson (4):
  cputlb: Add tlb_set_asid_for_mmuidx
  target/arm: Install ASIDs for long-form from EL1
  target/arm: Install ASIDs for short-form from EL1
  target/arm: Install ASIDs for EL2

 include/exec/cpu-defs.h |   2 +
 include/exec/exec-all.h |  19 ++++++
 accel/tcg/cputlb.c      |  23 +++++++
 target/arm/helper.c     | 133 ++++++++++++++++++++++++++--------------
 4 files changed, 131 insertions(+), 46 deletions(-)

-- 
2.17.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-11-16 13:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 15:53 [Qemu-devel] [PATCH 0/4] target/arm: Minimize TLB flushing for ASID changes Richard Henderson
2018-10-29 15:53 ` [Qemu-devel] [PATCH 1/4] cputlb: Add tlb_set_asid_for_mmuidx Richard Henderson
2018-11-15 18:36   ` Peter Maydell
2018-11-15 18:51     ` Richard Henderson
2018-11-15 18:56       ` Peter Maydell
2018-10-29 15:53 ` [Qemu-devel] [PATCH 2/4] target/arm: Install ASIDs for long-form from EL1 Richard Henderson
2018-10-29 15:53 ` [Qemu-devel] [PATCH 3/4] target/arm: Install ASIDs for short-form " Richard Henderson
2018-11-15 18:52   ` Peter Maydell
2018-11-16 13:47   ` Peter Maydell
2018-10-29 15:53 ` [Qemu-devel] [PATCH 4/4] target/arm: Install ASIDs for EL2 Richard Henderson
2018-11-15 18:38   ` Peter Maydell
2018-10-30 15:40 ` [Qemu-devel] [PATCH 0/4] target/arm: Minimize TLB flushing for ASID changes Emilio G. Cota
2018-11-05 16:30 ` Peter Maydell
2018-11-05 17:38   ` Richard Henderson
2018-11-15 18:25 ` Peter Maydell

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).