diff mbox

Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

Message ID CAFEAcA8S4ExmKB7=hVH6p01Sw1s1Lpvu+ntWdibPFjUnFwZ6Hg@mail.gmail.com
State New
Headers show

Commit Message

Peter Maydell April 11, 2012, 8:55 p.m. UTC
On 11 April 2012 20:23, Brad Smith <brad@comstyle.com> wrote:
> The following commit broke the build..
>
> linux-user: take RESERVED_VA into account for g2h_valid()

Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the
following one-line fix? If it works then I'll submit it to the mailing
list as a proper patch.

===endit===

I think we've broken darwin-user as well, but that is even less loved
and there was a discussion on IRC a while back about simply removing it.

-- PMM

Comments

Brad Smith April 11, 2012, 11:14 p.m. UTC | #1
On 11/04/12 4:55 PM, Peter Maydell wrote:
> On 11 April 2012 20:23, Brad Smith<brad@comstyle.com>  wrote:
>> The following commit broke the build..
>>
>> linux-user: take RESERVED_VA into account for g2h_valid()
>
> Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the
> following one-line fix? If it works then I'll submit it to the mailing
> list as a proper patch.

This fixes this particular issue.

> ===begin===
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index 48cb715..0689e38 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -41,6 +41,7 @@ int singlestep;
>   unsigned long mmap_min_addr;
>   unsigned long guest_base;
>   int have_guest_base;
> +unsigned long reserved_va;
>   #endif
>
>   static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
> ===endit===
>
> I think we've broken darwin-user as well, but that is even less loved
> and there was a discussion on IRC a while back about simply removing it.
>
> -- PMM
>
Stefan Weil April 12, 2012, 4:50 a.m. UTC | #2
Am 11.04.2012 22:55, schrieb Peter Maydell:
> On 11 April 2012 20:23, Brad Smith <brad@comstyle.com> wrote:
>> The following commit broke the build..
>>
>> linux-user: take RESERVED_VA into account for g2h_valid()
>
> Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the
> following one-line fix? If it works then I'll submit it to the mailing
> list as a proper patch.
>
> ===begin===
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index 48cb715..0689e38 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -41,6 +41,7 @@ int singlestep;
> unsigned long mmap_min_addr;
> unsigned long guest_base;
> int have_guest_base;
> +unsigned long reserved_va;
> #endif
>
> static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
> ===endit===
>
> I think we've broken darwin-user as well, but that is even less loved
> and there was a discussion on IRC a while back about simply removing it.
>
> -- PMM

Please use 'uintptr_t' instead of 'unsigned long'.

It does not matter in this special case, but guest_base and
reserved_va will be changed by my patches for w64 to use
uintptr_t. The data types 'long' and 'unsigned long' are
should be avoided.

Thanks,

Stefan W.
Peter Maydell April 12, 2012, 7:41 a.m. UTC | #3
On 12 April 2012 05:50, Stefan Weil <sw@weilnetz.de> wrote:
> Please use 'uintptr_t' instead of 'unsigned long'.
>
> It does not matter in this special case, but guest_base and
> reserved_va will be changed by my patches for w64 to use
> uintptr_t. The data types 'long' and 'unsigned long' are
> should be avoided.

Yeah, I was just following the linux-user practice, but if you're
changing those (even though they obviously never get used on w64)
I can make this one uintptr_t too.

-- PMM
Peter Maydell April 12, 2012, 10:18 a.m. UTC | #4
On 12 April 2012 08:41, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 12 April 2012 05:50, Stefan Weil <sw@weilnetz.de> wrote:
>> Please use 'uintptr_t' instead of 'unsigned long'.
>>
>> It does not matter in this special case, but guest_base and
>> reserved_va will be changed by my patches for w64 to use
>> uintptr_t. The data types 'long' and 'unsigned long' are
>> should be avoided.
>
> Yeah, I was just following the linux-user practice, but if you're
> changing those (even though they obviously never get used on w64)
> I can make this one uintptr_t too.

... just realised I can't do this, because it would conflict
with the extern declaration in cpu-all.h. All the *-user need
to change this from unsigned long to uintptr_t at once, so you'll
need to do it in your w64 patches I'm afraid.

-- PMM
diff mbox

Patch

===begin===
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 48cb715..0689e38 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -41,6 +41,7 @@  int singlestep;
 unsigned long mmap_min_addr;
 unsigned long guest_base;
 int have_guest_base;
+unsigned long reserved_va;
 #endif

 static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;