From patchwork Fri Feb 22 19:04:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15043 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 D69C623F71 for ; Fri, 22 Feb 2013 19:13:17 +0000 (UTC) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by fiordland.canonical.com (Postfix) with ESMTP id 8CF4EA189C7 for ; Fri, 22 Feb 2013 19:13:17 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id cz11so853566veb.17 for ; Fri, 22 Feb 2013 11:13:17 -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=TBp647KvbkMsqMF/DixAGz11+PrPGAk6VVsfcGnfceQ=; b=eU88mJg+M2qeyKLlVB9cmJk5mjUr5fothuOdm1V3k7hr0fNt/gZ4LzXM5ZqDUy+8xJ mwqUAXCT5mqtl4TekX3q3v/Wt0uZtNyXBvIghDrRdbGvvrKFhjEfODw1aWG2y1wBizPj 3UojSA7guz8zbbW4vQs6SDHaxKy3skCpivEi9GlsRmmHOTCLTLvbKqJ+E1bwZRF90Ne3 hBaE39aUu21zrLcDS/TBkp2TcwPLEIHvz83n9ArCAenkkuxBr1k4nsUcTlojuHJ7+Cjn 0ORtJH60HRKz7O6FNVlVmmqWKctf6jVL/Tf1+SRlfYwuGSCyhe0yjrMJpTUwpn/966Ii CzdA== X-Received: by 10.58.205.179 with SMTP id lh19mr4288645vec.7.1361560396897; Fri, 22 Feb 2013 11:13:16 -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 st5csp104182veb; Fri, 22 Feb 2013 11:13:16 -0800 (PST) X-Received: by 10.180.83.227 with SMTP id t3mr104467wiy.2.1361560395523; Fri, 22 Feb 2013 11:13:15 -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 em10si17994wid.106.2013.02.22.11.13.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 22 Feb 2013 11:13:15 -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 1U8xuz-0005m1-36; Fri, 22 Feb 2013 19:04:25 +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 , Christoffer Dall , Paolo Bonzini Subject: [PATCH v6 1/9] oslib-posix: Align to permit transparent hugepages on ARM Linux Date: Fri, 22 Feb 2013 19:04:17 +0000 Message-Id: <1361559865-22168-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1361559865-22168-1-git-send-email-peter.maydell@linaro.org> References: <1361559865-22168-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQlgd5FhairreJnEckLZMyzriLCBOQCrNAT8s5N28FOTKUyHTJbkAk3812QJZ1a5EbT/HERE 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 Reviewed-by: Paolo Bonzini --- 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 b4152fb..433dd68 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. */