From patchwork Tue Feb 26 17:40:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15098 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 CFA8F23DFE for ; Tue, 26 Feb 2013 17:42:26 +0000 (UTC) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by fiordland.canonical.com (Postfix) with ESMTP id 86DDBA197DA for ; Tue, 26 Feb 2013 17:42:26 +0000 (UTC) Received: by mail-ve0-f171.google.com with SMTP id b10so3991073vea.30 for ; Tue, 26 Feb 2013 09:42:26 -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=exKP7AWxTVBNF0zYxVQ9oNu6/7CUsBD/mPz+ahHZek6ZdppOeOZAA6blTP5TKCIyzY HrxNwSBI0EQlRFI536Vx9NVXCHFX+1EfxEPlgpBMoOFUYOKx28F9KxfzuUY2W4Kh45K4 BO1aEjasvZgGAv+7zVMD8DtxraHaXhg6JCNnXYAoRjP5Pr3eEgkVsP0Do0K10BScmbgH 7SxB3rJpHHSZYKOXQilDf3tOQnHFr4yk5DSVF4Ps5OGizelun1J7uJSbzJHEowZByzkE 6H5l1glngoxopAIj70YDUBorOU+0t0vu4iogZYk33q34+WEz+NCEG1egQXc0ovD+G4dI 6SJg== X-Received: by 10.58.221.228 with SMTP id qh4mr12140982vec.49.1361900546031; Tue, 26 Feb 2013 09:42:26 -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 st5csp125991veb; Tue, 26 Feb 2013 09:42:24 -0800 (PST) X-Received: by 10.194.119.200 with SMTP id kw8mr28091953wjb.31.1361900544120; Tue, 26 Feb 2013 09:42:24 -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 az10si766136wjb.111.2013.02.26.09.42.23 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 26 Feb 2013 09:42:24 -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 1UAOVp-0007Nn-HM; Tue, 26 Feb 2013 17:40:21 +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 , Paolo Bonzini Subject: [PATCH v7 01/11] oslib-posix: Align to permit transparent hugepages on ARM Linux Date: Tue, 26 Feb 2013 17:40:11 +0000 Message-Id: <1361900421-28354-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1361900421-28354-1-git-send-email-peter.maydell@linaro.org> References: <1361900421-28354-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkRdkU48Jy5edJ9u1nOyaklq8szXhIoKg0kMnVbe3VZ67F7pw3hjh5uizVFzaSJMwxFi0f0 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. */