From patchwork Mon Aug 20 10:36:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10796 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A9AF823F46 for ; Mon, 20 Aug 2012 10:36:49 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id D3CD4A1813B for ; Mon, 20 Aug 2012 10:36:43 +0000 (UTC) Received: by yenl8 with SMTP id l8so5179339yen.11 for ; Mon, 20 Aug 2012 03:36:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=XymEwZS1AF4+9xELlCydVUmguqdzEkR0yXBAlATB4R4=; b=gd0U+O7XeYDnGDhkGcsYIFujF1YrH0RV8nQJ84dTu323JmNCAL6AT+KXxdQh7NgNqE HIQu/TcjxbWa0nSoaLvzgYZ1T3ACgH/XaXoqr+c72XLRICpAuVz6EPkeJsxw0ZR7KGaD AGG36Jy60YnXPQkEWMcyre0s8XFOu1KMS/ID+dVXyyCdKg9TUCFEz3QcZKxOHXIq+MhN PJdt3wuUxtc7hofvec791QHJxQPkpahBnYSRddTwu1ByS+bm+0B1krwXtSZvoFDd0NPz 134H/1cKwD0juJoBD0uFA1/2vgx8HAgXMUNHZtbPuvKmHiF22zLalQHjN1Wx62w2cpgm CE/g== Received: by 10.50.182.161 with SMTP id ef1mr9425394igc.0.1345459008199; Mon, 20 Aug 2012 03:36:48 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp76567igc; Mon, 20 Aug 2012 03:36:47 -0700 (PDT) Received: by 10.14.202.131 with SMTP id d3mr8234666eeo.32.1345459006691; Mon, 20 Aug 2012 03:36:46 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id 1si10614436eee.85.2012.08.20.03.36.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 03:36:46 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1T3PLU-0002oC-Br; Mon, 20 Aug 2012 11:36:32 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Riku Voipio , Anthony Liguori , patches@linaro.org Subject: [PATCH for-1.2] linux-user: Clarify "Unable to reserve guest address space" error Date: Mon, 20 Aug 2012 11:36:32 +0100 Message-Id: <1345458992-10773-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQloRieMaEB1bV5A9aT/b1wfIOpn+/TgMju/4avbNYFZRkxEJN97P3HQEoLwxE9/UOXBdZrf 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 --- 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); }