From patchwork Tue Nov 20 13:31:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12995 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 1DFCC23E01 for ; Tue, 20 Nov 2012 13:31:29 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id B741DA1912C for ; Tue, 20 Nov 2012 13:31:28 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so1694284iag.11 for ; Tue, 20 Nov 2012 05:31:28 -0800 (PST) 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:in-reply-to:references :x-gm-message-state; bh=8sOuvHvuZYiMcj1bDR8xkO5jhLkJs4S41aLPJf90c8w=; b=M+ojAXoIKzZm06w213SKi/mFZcBDRYddLx/AmXG1ZKEG/RXpfPJvNIuvgWjFq0rKuJ sti3HeuC5vZd37+4nd5W9iB0hsP3tXeeMMDjvtqov0AeMBbFJak5ZsbNByzTCC/TuVVH 3nqIAP8KQ3ECTP+EgSkem1ksgxNwY9CHRvoaE2bUVUEdb2L1kDKdka1NxwNQ8JYB+9tQ 6G8d4Xm26EcmkZjvbC3KuTRutR7hDMxLz/IdltK36M2jzGPXNTkBDrNfFABl2CmWvI7e mJbK+DCeIMups/Lb88MGAXqld7bIPcqPYcL2LMQvAdeY82thGLVWq9IW4tsLUtaMkItb eFiA== Received: by 10.50.152.137 with SMTP id uy9mr9788304igb.62.1353418288545; Tue, 20 Nov 2012 05:31:28 -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.50.67.148 with SMTP id n20csp317816igt; Tue, 20 Nov 2012 05:31:27 -0800 (PST) Received: by 10.180.94.161 with SMTP id dd1mr14461775wib.17.1353418287406; Tue, 20 Nov 2012 05:31:27 -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 y61si4053388wey.33.2012.11.20.05.31.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 05:31:27 -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 1Tanux-0006Ds-1d; Tue, 20 Nov 2012 13:31:11 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Avi Kivity , Marcelo Tosatti Subject: [RFC v4 8/8] oslib-posix: Align to permit transparent hugepages on ARM Linux Date: Tue, 20 Nov 2012 13:31:10 +0000 Message-Id: <1353418270-23881-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1353418270-23881-1-git-send-email-peter.maydell@linaro.org> References: <1353418270-23881-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQmGQWOVEwQ4EJCKg7NvEz4pPp7Z/+R/D9j66YUkM/0mTVosSss6eQI29nTc3b2wbol+VZyd 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 --- oslib-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslib-posix.c b/oslib-posix.c index 9db9c3d..d25b52a 100644 --- a/oslib-posix.c +++ b/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. */