Patchwork [3/3] linux-user: Clarify "Unable to reserve guest address space" error

login
register
mail settings
Submitter riku.voipio@linaro.org
Date Aug. 27, 2012, 6:22 p.m.
Message ID <097b8cb840a31ec526cc58778bd8cbab0d2beaaa.1346088997.git.riku.voipio@linaro.org>
Download mbox | patch
Permalink /patch/180263/
State New
Headers show

Comments

riku.voipio@linaro.org - Aug. 27, 2012, 6:22 p.m.
From: Peter Maydell <peter.maydell@linaro.org>

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>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 linux-user/main.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index b1c228a..1a1c661 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);
         }