All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] Fix tlb_vaddr_to_host with CONFIG_USER_ONLY
@ 2016-08-03  3:15 Benjamin Herrenschmidt
  2016-08-03 11:19 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2016-08-03  3:15 UTC (permalink / raw)
  To: qemu-devel

We use the wrong argument name for the g2h() macro !

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Not sure who to CC for this...

 include/exec/cpu_ldst.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index b573df5..6eb5fe8 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -401,7 +401,7 @@ static inline void *tlb_vaddr_to_host(CPUArchState *env, target_ulong addr,
                                       int access_type, int mmu_idx)
 {
 #if defined(CONFIG_USER_ONLY)
-    return g2h(vaddr);
+    return g2h(addr);
 #else
     int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
     CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index];

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

* Re: [Qemu-devel] [PATCH 1/2] Fix tlb_vaddr_to_host with CONFIG_USER_ONLY
  2016-08-03  3:15 [Qemu-devel] [PATCH 1/2] Fix tlb_vaddr_to_host with CONFIG_USER_ONLY Benjamin Herrenschmidt
@ 2016-08-03 11:19 ` Peter Maydell
  2016-08-03 11:33   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2016-08-03 11:19 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: QEMU Developers

On 3 August 2016 at 04:15, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> We use the wrong argument name for the g2h() macro !
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> Not sure who to CC for this...
>
>  include/exec/cpu_ldst.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
> index b573df5..6eb5fe8 100644
> --- a/include/exec/cpu_ldst.h
> +++ b/include/exec/cpu_ldst.h
> @@ -401,7 +401,7 @@ static inline void *tlb_vaddr_to_host(CPUArchState *env, target_ulong addr,
>                                        int access_type, int mmu_idx)
>  {
>  #if defined(CONFIG_USER_ONLY)
> -    return g2h(vaddr);
> +    return g2h(addr);
>  #else
>      int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
>      CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index];

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I don't understand why this didn't cause compile failures...

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH 1/2] Fix tlb_vaddr_to_host with CONFIG_USER_ONLY
  2016-08-03 11:19 ` Peter Maydell
@ 2016-08-03 11:33   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2016-08-03 11:33 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

On Wed, 2016-08-03 at 12:19 +0100, Peter Maydell wrote:
> 
> I don't understand why this didn't cause compile failures...

I didn't either. I found:

include/qom/cpu.h:typedef uint64_t vaddr;

So g2h becomes something like (target_ulong)(uint64) + guest_base

Which does build ;-)

Cheers,
Ben.

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

end of thread, other threads:[~2016-08-03 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03  3:15 [Qemu-devel] [PATCH 1/2] Fix tlb_vaddr_to_host with CONFIG_USER_ONLY Benjamin Herrenschmidt
2016-08-03 11:19 ` Peter Maydell
2016-08-03 11:33   ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.