qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/arm: Fix physical address resolution for Stage2
@ 2023-01-26 23:31 Richard Henderson
  2023-01-27  0:28 ` Philippe Mathieu-Daudé
  2023-02-02 11:46 ` Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2023-01-26 23:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, qemu-stable, Sid Manning

Conversion to probe_access_full missed applying the page offset.

Cc: qemu-stable@nongnu.org
Reported-by: Sid Manning <sidneym@quicinc.com>
Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/ptw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 57f3615a66..2b125fff44 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
         if (unlikely(flags & TLB_INVALID_MASK)) {
             goto fail;
         }
-        ptw->out_phys = full->phys_addr;
+        ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK);
         ptw->out_rw = full->prot & PAGE_WRITE;
         pte_attrs = full->pte_attrs;
         pte_secure = full->attrs.secure;
-- 
2.34.1



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

* Re: [PATCH] target/arm: Fix physical address resolution for Stage2
  2023-01-26 23:31 [PATCH] target/arm: Fix physical address resolution for Stage2 Richard Henderson
@ 2023-01-27  0:28 ` Philippe Mathieu-Daudé
  2023-02-02 11:46 ` Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-27  0:28 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-arm, qemu-stable, Sid Manning

On 27/1/23 00:31, Richard Henderson wrote:
> Conversion to probe_access_full missed applying the page offset.
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Sid Manning <sidneym@quicinc.com>
> Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/ptw.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/ptw.c b/target/arm/ptw.c
> index 57f3615a66..2b125fff44 100644
> --- a/target/arm/ptw.c
> +++ b/target/arm/ptw.c
> @@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
>           if (unlikely(flags & TLB_INVALID_MASK)) {
>               goto fail;
>           }
> -        ptw->out_phys = full->phys_addr;
> +        ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK);
>           ptw->out_rw = full->prot & PAGE_WRITE;
>           pte_attrs = full->pte_attrs;
>           pte_secure = full->attrs.secure;

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* [PATCH] target/arm: Fix physical address resolution for Stage2
  2023-01-30 20:59 [PATCH 00/27] tcg: Simplify temporary usage Richard Henderson
@ 2023-01-30 20:59 ` Richard Henderson
  2023-01-30 21:00   ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2023-01-30 20:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, cota, qemu-stable, Sid Manning

Conversion to probe_access_full missed applying the page offset.

Cc: qemu-stable@nongnu.org
Reported-by: Sid Manning <sidneym@quicinc.com>
Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/ptw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 57f3615a66..2b125fff44 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
         if (unlikely(flags & TLB_INVALID_MASK)) {
             goto fail;
         }
-        ptw->out_phys = full->phys_addr;
+        ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK);
         ptw->out_rw = full->prot & PAGE_WRITE;
         pte_attrs = full->pte_attrs;
         pte_secure = full->attrs.secure;
-- 
2.34.1



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

* Re: [PATCH] target/arm: Fix physical address resolution for Stage2
  2023-01-30 20:59 ` [PATCH] target/arm: Fix physical address resolution for Stage2 Richard Henderson
@ 2023-01-30 21:00   ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2023-01-30 21:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, cota, qemu-stable, Sid Manning

On 1/30/23 10:59, Richard Henderson wrote:
> Conversion to probe_access_full missed applying the page offset.
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Sid Manning <sidneym@quicinc.com>
> Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/ptw.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/ptw.c b/target/arm/ptw.c
> index 57f3615a66..2b125fff44 100644
> --- a/target/arm/ptw.c
> +++ b/target/arm/ptw.c
> @@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
>           if (unlikely(flags & TLB_INVALID_MASK)) {
>               goto fail;
>           }
> -        ptw->out_phys = full->phys_addr;
> +        ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK);
>           ptw->out_rw = full->prot & PAGE_WRITE;
>           pte_attrs = full->pte_attrs;
>           pte_secure = full->attrs.secure;

Bah.  Of course this shouldn't have been resent as part of another patch set.


r~


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

* Re: [PATCH] target/arm: Fix physical address resolution for Stage2
  2023-01-26 23:31 [PATCH] target/arm: Fix physical address resolution for Stage2 Richard Henderson
  2023-01-27  0:28 ` Philippe Mathieu-Daudé
@ 2023-02-02 11:46 ` Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2023-02-02 11:46 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, qemu-arm, qemu-stable, Sid Manning

On Thu, 26 Jan 2023 at 23:32, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Conversion to probe_access_full missed applying the page offset.
>
> Cc: qemu-stable@nongnu.org
> Reported-by: Sid Manning <sidneym@quicinc.com>
> Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/ptw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



Applied to target-arm.next, thanks.

-- PMM


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

end of thread, other threads:[~2023-02-02 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 23:31 [PATCH] target/arm: Fix physical address resolution for Stage2 Richard Henderson
2023-01-27  0:28 ` Philippe Mathieu-Daudé
2023-02-02 11:46 ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2023-01-30 20:59 [PATCH 00/27] tcg: Simplify temporary usage Richard Henderson
2023-01-30 20:59 ` [PATCH] target/arm: Fix physical address resolution for Stage2 Richard Henderson
2023-01-30 21:00   ` 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).