qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/12] target/loongarch: Small enhancement about TLB flush
@ 2025-09-03  8:48 Bibo Mao
  2025-09-03  8:48 ` [PATCH v3 01/12] target/loongarch: Use mmu idx bitmap method when flush TLB Bibo Mao
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: Bibo Mao @ 2025-09-03  8:48 UTC (permalink / raw)
  To: Song Gao, Richard Henderson, Philippe Mathieu-Daudé
  Cc: Jiaxun Yang, qemu-devel

This patch set is continuous MMU enhancement, it is focused on TLB
search, especially on function helper_invtlb_page_asid() and function
helper_invtlb_page_asid_or_g(). The code is similiar with function
loongarch_tlb_search(), one common API loongarch_tlb_search_cb() is
added for these functions.

Also there is optimization with qemu TLB flush, invalidate_tlb_entry()
is used to flush one TLB entry rather than flush all TLB entries.
---
v2 ... v3:
  1. Remove optimization to flush QEMU TLB with MMU_USER_IDX, now both
     MMU_KERNEL_IDX and MMU_USER_IDX bitmap is added.
  2. Add field RESERVE with register CSR_STLBPS, field RESERVE keeps
     zero when change register CSR_STLBPS.

v1 ... v2:
  1. Add bugfix patch with CSR_STLBPS page size set issue.
  2. Add tlb entry invalidation in function invalidate_tlb(), it can be
     used in both helper_invtlb_page_asid() and function
     helper_invtlb_page_asid_or_g().
---
Bibo Mao (12):
  target/loongarch: Use mmu idx bitmap method when flush TLB
  target/loongarch: Add parameter tlb pointer with fill_tlb_entry
  target/loongarch: Reduce TLB flush with helper_tlbwr
  target/loongarch: Update TLB index selection method
  target/loongarch: Fix page size set issue with CSR_STLBPS
  target/loongarch: Add tlb search callback in loongarch_tlb_search()
  target/loongarch: Add common API loongarch_tlb_search_cb()
  target/loongarch: Use loongarch_tlb_search_cb in
    helper_invtlb_page_asid_or_g
  target/loongarch: Use loongarch_tlb_search_cb in
    helper_invtlb_page_asid
  target/loongarch: Invalid tlb entry in invalidate_tlb()
  target/loongarch: Only flush one TLB entry in
    helper_invtlb_page_asid_or_g()
  target/loongarch: Only flush one TLB entry in
    helper_invtlb_page_asid()

 target/loongarch/cpu-csr.h        |   1 +
 target/loongarch/tcg/csr_helper.c |   5 +-
 target/loongarch/tcg/tlb_helper.c | 197 +++++++++++++++++++-----------
 3 files changed, 132 insertions(+), 71 deletions(-)


base-commit: 8415b0619f65bff12f10c774659df92d3f61daca
-- 
2.39.3



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

end of thread, other threads:[~2025-09-04 10:08 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03  8:48 [PATCH v3 00/12] target/loongarch: Small enhancement about TLB flush Bibo Mao
2025-09-03  8:48 ` [PATCH v3 01/12] target/loongarch: Use mmu idx bitmap method when flush TLB Bibo Mao
2025-09-03 13:02   ` Richard Henderson
2025-09-04  7:23     ` Bibo Mao
2025-09-03  8:48 ` [PATCH v3 02/12] target/loongarch: Add parameter tlb pointer with fill_tlb_entry Bibo Mao
2025-09-03  8:48 ` [PATCH v3 03/12] target/loongarch: Reduce TLB flush with helper_tlbwr Bibo Mao
2025-09-03 13:07   ` Richard Henderson
2025-09-04  7:28     ` Bibo Mao
2025-09-03  8:48 ` [PATCH v3 04/12] target/loongarch: Update TLB index selection method Bibo Mao
2025-09-03 13:09   ` Richard Henderson
2025-09-03  8:48 ` [PATCH v3 05/12] target/loongarch: Fix page size set issue with CSR_STLBPS Bibo Mao
2025-09-03  8:48 ` [PATCH v3 06/12] target/loongarch: Add tlb search callback in loongarch_tlb_search() Bibo Mao
2025-09-03 13:14   ` Richard Henderson
2025-09-04  7:46     ` Bibo Mao
2025-09-03  8:48 ` [PATCH v3 07/12] target/loongarch: Add common API loongarch_tlb_search_cb() Bibo Mao
2025-09-03 13:16   ` Richard Henderson
2025-09-03  8:48 ` [PATCH v3 08/12] target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid_or_g Bibo Mao
2025-09-03 13:20   ` Richard Henderson
2025-09-04  9:17     ` Bibo Mao
2025-09-03  8:48 ` [PATCH v3 09/12] target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid Bibo Mao
2025-09-03 13:21   ` Richard Henderson
2025-09-04  9:52     ` Bibo Mao
2025-09-03  8:48 ` [PATCH v3 10/12] target/loongarch: Invalid tlb entry in invalidate_tlb() Bibo Mao
2025-09-03 13:00   ` Richard Henderson
2025-09-04 10:04     ` Bibo Mao
2025-09-03  8:53 ` [PATCH v3 11/12] target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid_or_g() Bibo Mao
2025-09-03 12:56   ` Richard Henderson
2025-09-03  8:54 ` [PATCH v3 12/12] target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid() Bibo Mao
2025-09-03 12:56   ` Richard Henderson

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