qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] target/loongarch: Code cleanup with function loongarch_map_address
@ 2025-04-22  2:57 Bibo Mao
  2025-04-22  2:57 ` [PATCH v3 1/9] target/loongarch: Move header file helper.h to directory tcg Bibo Mao
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Bibo Mao @ 2025-04-22  2:57 UTC (permalink / raw)
  To: Song Gao, Philippe Mathieu-Daudé, Richard Henderson; +Cc: qemu-devel

Get physical address from virtual address is important for qmp command to
dump memory content. In TCG mode, it searches TLB tables firstly and
then do page table walker. In KVM mode, there are no TLB tables and page
table walker is used directly.

Here TLB tables searching is moved to directory tcg, and code about page
table walker is put in the common part so that it can be used in KVM mode
also.

---
v2 ... v3:
  1. Split patch 6 into two three small patches
  2. Define tcg specified function from header file internals.h to
     tcg/tcg_loongarch.h

v1 ... v2:
  1. Remove CONFIG_TCG macro with file helper.h in patch 1
  2. Refresh spelling issues in patch 5
  3. Split original patch 4 into existing patch 4 and patch 5
  4. Add !kvm_enabled() in function loongarch_map_address(), tlb entries
     will not be searched in kvm mode
---
Bibo Mao (9):
  target/loongarch: Move header file helper.h to directory tcg
  target/loongarch: Add function loongarch_get_addr_from_tlb
  target/loongarch: Move function get_dir_base_width to common directory
  target/loongarch: Add stub function loongarch_get_addr_from_tlb
  target/loongarch: Set function loongarch_map_address() with common
    code
  target/loongarch: Define function loongarch_get_addr_from_tlb()
    non-static
  target/loongarch: Move function loongarch_tlb_search to directory tcg
  target/loongarch: Add static definition with function
    loongarch_tlb_search()
  target/loongarch: Move definition of TCG specified function to tcg
    directory

 target/loongarch/cpu.c               |   1 +
 target/loongarch/cpu_helper.c        | 177 ++-----
 target/loongarch/helper.h            | 720 +-------------------------
 target/loongarch/internals.h         |   7 -
 target/loongarch/tcg/helper.h        | 722 +++++++++++++++++++++++++++
 target/loongarch/tcg/tcg_loongarch.h |  20 +
 target/loongarch/tcg/tlb_helper.c    | 173 +++++--
 7 files changed, 926 insertions(+), 894 deletions(-)
 create mode 100644 target/loongarch/tcg/helper.h


base-commit: a9cd5bc6399a80fcf233ed0fffe6067b731227d8
-- 
2.39.3



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

end of thread, other threads:[~2025-04-22  8:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22  2:57 [PATCH v3 0/9] target/loongarch: Code cleanup with function loongarch_map_address Bibo Mao
2025-04-22  2:57 ` [PATCH v3 1/9] target/loongarch: Move header file helper.h to directory tcg Bibo Mao
2025-04-22  2:57 ` [PATCH v3 2/9] target/loongarch: Add function loongarch_get_addr_from_tlb Bibo Mao
2025-04-22  2:57 ` [PATCH v3 3/9] target/loongarch: Move function get_dir_base_width to common directory Bibo Mao
2025-04-22  2:57 ` [PATCH v3 4/9] target/loongarch: Add stub function loongarch_get_addr_from_tlb Bibo Mao
2025-04-22  2:57 ` [PATCH v3 5/9] target/loongarch: Set function loongarch_map_address() with common code Bibo Mao
2025-04-22  2:57 ` [PATCH v3 6/9] target/loongarch: Define function loongarch_get_addr_from_tlb() non-static Bibo Mao
2025-04-22  7:18   ` Philippe Mathieu-Daudé
2025-04-22  7:39     ` bibo mao
2025-04-22  7:46       ` Philippe Mathieu-Daudé
2025-04-22  7:57         ` bibo mao
2025-04-22  8:45           ` Philippe Mathieu-Daudé
2025-04-22  2:57 ` [PATCH v3 7/9] target/loongarch: Move function loongarch_tlb_search to directory tcg Bibo Mao
2025-04-22  7:14   ` Philippe Mathieu-Daudé
2025-04-22  2:57 ` [PATCH v3 8/9] target/loongarch: Add static definition with function loongarch_tlb_search() Bibo Mao
2025-04-22  7:14   ` Philippe Mathieu-Daudé
2025-04-22  2:57 ` [PATCH v3 9/9] target/loongarch: Move definition of TCG specified function to tcg directory Bibo Mao
2025-04-22  7:16   ` Philippe Mathieu-Daudé

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