[PATCH for 6.2 45/49] bsd-user: Make guest_base an unsigned long

Warner Losh posted 49 patches 4 years, 4 months ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>
There is a newer version of this series
[PATCH for 6.2 45/49] bsd-user: Make guest_base an unsigned long
Posted by Warner Losh 4 years, 4 months ago
From: Warner Losh <imp@FreeBSD.org>

Make the guest_base a plan, uneigned long rather than a uintptr_t. It
isn't really a pointer.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 08f88d9668..c8fafa78d0 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -49,9 +49,9 @@
 #include "target_arch_cpu.h"
 
 int singlestep;
-uintptr_t guest_base;
 static const char *cpu_model;
 static const char *cpu_type;
+unsigned long guest_base;
 bool have_guest_base;
 #if (TARGET_LONG_BITS == 32) && (HOST_LONG_BITS == 64)
 /*
@@ -440,7 +440,7 @@ int main(int argc, char **argv)
     g_free(target_environ);
 
     if (qemu_loglevel_mask(CPU_LOG_PAGE)) {
-        qemu_log("guest_base  %p\n", (void *)guest_base);
+        qemu_log("guest_base  0x%lx\n", guest_base);
         log_page_dump("binary load");
 
         qemu_log("start_brk   0x" TARGET_ABI_FMT_lx "\n", info->start_brk);
-- 
2.32.0


Re: [PATCH for 6.2 45/49] bsd-user: Make guest_base an unsigned long
Posted by Richard Henderson 4 years, 4 months ago
On 8/7/21 11:42 AM, Warner Losh wrote:
> From: Warner Losh <imp@FreeBSD.org>
> 
> Make the guest_base a plan, uneigned long rather than a uintptr_t. It
> isn't really a pointer.

NACK: 5ca870b9f6c.  It most certainly is a host pointer.


r~

Re: [PATCH for 6.2 45/49] bsd-user: Make guest_base an unsigned long
Posted by Warner Losh 4 years, 4 months ago
On Tue, Aug 10, 2021 at 11:58 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 8/7/21 11:42 AM, Warner Losh wrote:
> > From: Warner Losh <imp@FreeBSD.org>
> >
> > Make the guest_base a plan, uneigned long rather than a uintptr_t. It
> > isn't really a pointer.
>
> NACK: 5ca870b9f6c.  It most certainly is a host pointer.
>

OK. I'll drop this one and redo in our other branch. Shouldn't be hard.