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

login
register
mail settings
Submitter Peter Maydell
Date April 11, 2012, 8:55 p.m.
Message ID <CAFEAcA8S4ExmKB7=hVH6p01Sw1s1Lpvu+ntWdibPFjUnFwZ6Hg@mail.gmail.com>
Download mbox | patch
Permalink /patch/151880/
State New
Headers show

Comments

Peter Maydell - April 11, 2012, 8:55 p.m.
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
Brad - April 11, 2012, 11:14 p.m.
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.
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.
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.
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

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;