From patchwork Thu Jan 24 15:43:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14272 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 7F2AD23F91 for ; Thu, 24 Jan 2013 16:12:36 +0000 (UTC) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by fiordland.canonical.com (Postfix) with ESMTP id D74ACA190D4 for ; Thu, 24 Jan 2013 16:12:35 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id p1so5482921vbi.32 for ; Thu, 24 Jan 2013 08:12:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=jaiUNXxXWxv93DZzBFtRctf2GH2iDezQ+ZiKeBkZhio=; b=XP7Y2zAdum8fY+C/E+5sr/ulZxb1TQSPEdLauHf0QpZc6jQyl9Ohq3JKTO7CGBMFp/ NB61Pzz4x0yJ/y5QBmLwNAaljnpfcE17J12W+SINg5beLrBPceAZAVj/U+tdWvU2bdSe shmqId8JYxI/FqZhi8ZylZA4MSndwCGBNh4zqr6H/YkROXu73JlkFDAnVQDwEooP3ZlW ylLhrOO75AgI6ZAHtIy9CwnbK+ChXF8CrFAJSn6i8LUSe7Lno/FhxrclcoNjbEvIJW2D iFkq6i8LAEGeLgYhi4L18DSKS4a7m98BIHY//j5NF0hx5RKaSS8uBmtcq/OAY0650ETy XGJw== X-Received: by 10.220.154.199 with SMTP id p7mr2422927vcw.48.1359043955275; Thu, 24 Jan 2013 08:12:35 -0800 (PST) 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.58.145.101 with SMTP id st5csp72634veb; Thu, 24 Jan 2013 08:12:34 -0800 (PST) X-Received: by 10.194.76.204 with SMTP id m12mr3979239wjw.21.1359043954057; Thu, 24 Jan 2013 08:12:34 -0800 (PST) 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 cz5si738627wib.59.2013.01.24.08.12.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 24 Jan 2013 08:12:34 -0800 (PST) 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 1TyOy8-0002zf-Q9; Thu, 24 Jan 2013 15:44:00 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, kvm@vger.kernel.org, Marcelo Tosatti , kvmarm@lists.cs.columbia.edu, Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gleb Natapov Subject: [RFC v5 1/8] oslib-posix: Align to permit transparent hugepages on ARM Linux Date: Thu, 24 Jan 2013 15:43:53 +0000 Message-Id: <1359042240-11482-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1359042240-11482-1-git-send-email-peter.maydell@linaro.org> References: <1359042240-11482-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQmjqTBa14dawR5JV5WOO9k87vP2zP2t9/kvAz9H+ccYUJzs29ngYq/wPH8O9iKYvbmRk2j4 ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN accordingly. Signed-off-by: Peter Maydell --- util/oslib-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 4f5ec67..4ad9940 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -35,7 +35,7 @@ extern int daemon(int, int); #endif -#if defined(__linux__) && defined(__x86_64__) +#if defined(__linux__) && (defined(__x86_64__) || defined(__arm__)) /* Use 2 MiB alignment so transparent hugepages can be used by KVM. Valgrind does not support alignments larger than 1 MiB, therefore we need special code which handles running on Valgrind. */