diff mbox

[for-1.2] linux-user: Clarify "Unable to reserve guest address space" error

Message ID 1345458992-10773-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Aug. 20, 2012, 10:36 a.m. UTC
Now that we default to reserving nearly 4GB of RAM for the guest
address space when running a 32 bit linux-user guest on 64 bit
hosts, users are much more likely to run into it. Reword the
message to be more informative about what failed and provide
suggestions for how to fix things.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I've had several people run into this and have no idea what the
problem was (generally they were running with a ulimit -v setting),
so I think it is worth putting this into 1.2.

 linux-user/main.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Peter Maydell Aug. 23, 2012, 4:15 p.m. UTC | #1
Ping! This didn't get into rc1.

thanks
-- PMM

On 20 August 2012 11:36, Peter Maydell <peter.maydell@linaro.org> wrote:
> Now that we default to reserving nearly 4GB of RAM for the guest
> address space when running a 32 bit linux-user guest on 64 bit
> hosts, users are much more likely to run into it. Reword the
> message to be more informative about what failed and provide
> suggestions for how to fix things.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I've had several people run into this and have no idea what the
> problem was (generally they were running with a ulimit -v setting),
> so I think it is worth putting this into 1.2.
>
>  linux-user/main.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 7dea084..d4dc015 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -3519,7 +3519,10 @@ int main(int argc, char **argv, char **envp)
>          guest_base = init_guest_space(guest_base, reserved_va, 0,
>                                        have_guest_base);
>          if (guest_base == (unsigned long)-1) {
> -            fprintf(stderr, "Unable to reserve guest address space\n");
> +            fprintf(stderr, "Unable to reserve 0x%lx bytes of virtual address "
> +                    "space for use as guest address space (check your virtual "
> +                    "memory ulimit setting or reserve less using -R option)\n",
> +                    reserved_va);
>              exit(1);
>          }
>
> --
> 1.7.9.5
>
Peter Maydell Aug. 27, 2012, 3:40 p.m. UTC | #2
Ping^2 since rc2 is just around the corner.

thanks
-- PMM

On 23 August 2012 17:15, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping! This didn't get into rc1.
>
> thanks
> -- PMM
>
> On 20 August 2012 11:36, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Now that we default to reserving nearly 4GB of RAM for the guest
>> address space when running a 32 bit linux-user guest on 64 bit
>> hosts, users are much more likely to run into it. Reword the
>> message to be more informative about what failed and provide
>> suggestions for how to fix things.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> I've had several people run into this and have no idea what the
>> problem was (generally they were running with a ulimit -v setting),
>> so I think it is worth putting this into 1.2.
>>
>>  linux-user/main.c |    5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/linux-user/main.c b/linux-user/main.c
>> index 7dea084..d4dc015 100644
>> --- a/linux-user/main.c
>> +++ b/linux-user/main.c
>> @@ -3519,7 +3519,10 @@ int main(int argc, char **argv, char **envp)
>>          guest_base = init_guest_space(guest_base, reserved_va, 0,
>>                                        have_guest_base);
>>          if (guest_base == (unsigned long)-1) {
>> -            fprintf(stderr, "Unable to reserve guest address space\n");
>> +            fprintf(stderr, "Unable to reserve 0x%lx bytes of virtual address "
>> +                    "space for use as guest address space (check your virtual "
>> +                    "memory ulimit setting or reserve less using -R option)\n",
>> +                    reserved_va);
>>              exit(1);
>>          }
>>
>> --
>> 1.7.9.5
>>
diff mbox

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index 7dea084..d4dc015 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3519,7 +3519,10 @@  int main(int argc, char **argv, char **envp)
         guest_base = init_guest_space(guest_base, reserved_va, 0,
                                       have_guest_base);
         if (guest_base == (unsigned long)-1) {
-            fprintf(stderr, "Unable to reserve guest address space\n");
+            fprintf(stderr, "Unable to reserve 0x%lx bytes of virtual address "
+                    "space for use as guest address space (check your virtual "
+                    "memory ulimit setting or reserve less using -R option)\n",
+                    reserved_va);
             exit(1);
         }