qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Bibo Mao <maobibo@loongson.cn>, Song Gao <gaosong@loongson.cn>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 4/5] target/loongarch: Set function loongarch_map_address() with common code
Date: Mon, 14 Apr 2025 12:51:08 +0200	[thread overview]
Message-ID: <24b30fec-026c-452d-9d2b-bf8fd5f4c944@linaro.org> (raw)
In-Reply-To: <20250414012528.4075447-5-maobibo@loongson.cn>

On 14/4/25 03:25, Bibo Mao wrote:
> Function loongarch_map_address is to get physical address from virtual
> address, it is used by qmp commands to dump memeory from virtual

Typo "memory",

> address.
> 
> It is used by kvm mode also, here move function loongarch_map_address()
> out of macro CONFIG_TCG. And it is common code, the similiar with

"similar".

> function loongarch_page_table_walker().
> 
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
>   target/loongarch/cpu_helper.c | 17 ++++++++---------
>   1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c
> index 6736a9a330..7a56482282 100644
> --- a/target/loongarch/cpu_helper.c
> +++ b/target/loongarch/cpu_helper.c
> @@ -155,6 +155,14 @@ static int loongarch_get_addr_from_tlb(CPULoongArchState *env, hwaddr *physical,
>   
>       return TLBRET_NOMATCH;
>   }
> +#else
> +static int loongarch_get_addr_from_tlb(CPULoongArchState *env, hwaddr *physical,
> +                                       int *prot, target_ulong address,
> +                                       MMUAccessType access_type, int mmu_idx)
> +{
> +    return TLBRET_NOMATCH;
> +}
> +#endif
>   
>   void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
>                           uint64_t *dir_width, target_ulong level)
> @@ -283,15 +291,6 @@ static int loongarch_map_address(CPULoongArchState *env, hwaddr *physical,
>   
>       return TLBRET_NOMATCH;
>   }
> -#else
> -static int loongarch_map_address(CPULoongArchState *env, hwaddr *physical,
> -                                 int *prot, target_ulong address,
> -                                 MMUAccessType access_type, int mmu_idx,
> -                                 int is_debug)
> -{
> -    return TLBRET_NOMATCH;
> -}
> -#endif

The change seems incomplete but fixed in the next patch. Maybe rebase issue?


  reply	other threads:[~2025-04-14 10:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14  1:25 [PATCH 0/5] target/loongarch: Code cleanup with function loongarch_map_address Bibo Mao
2025-04-14  1:25 ` [PATCH 1/5] target/loongarch: Move header file helper.h to directory tcg Bibo Mao
2025-04-15  3:22   ` Richard Henderson
2025-04-15  6:07     ` bibo mao
2025-04-14  1:25 ` [PATCH 2/5] target/loongarch: Add function loongarch_get_addr_from_tlb Bibo Mao
2025-04-14  1:25 ` [PATCH 3/5] target/loongarch: Move function get_dir_base_width to common directory Bibo Mao
2025-04-14  1:25 ` [PATCH 4/5] target/loongarch: Set function loongarch_map_address() with common code Bibo Mao
2025-04-14 10:51   ` Philippe Mathieu-Daudé [this message]
2025-04-15  1:46     ` bibo mao
2025-04-14  1:25 ` [PATCH 5/5] target/loongarch: Move function loongarch_tlb_search to directory tcg Bibo Mao
2025-04-14 10:52 ` [PATCH 0/5] target/loongarch: Code cleanup with function loongarch_map_address Philippe Mathieu-Daudé

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=24b30fec-026c-452d-9d2b-bf8fd5f4c944@linaro.org \
    --to=philmd@linaro.org \
    --cc=gaosong@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).