From patchwork Sun May 6 07:29:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 909248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FsPJeO1u"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40dy7v1FrZz9s34 for ; Sun, 6 May 2018 17:30:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750872AbeEFHaB (ORCPT ); Sun, 6 May 2018 03:30:01 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39264 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbeEFHaA (ORCPT ); Sun, 6 May 2018 03:30:00 -0400 Received: by mail-pf0-f194.google.com with SMTP id a22so6373149pfn.6 for ; Sun, 06 May 2018 00:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UwDa/0xQo6BpEra8SD4QlTy55YpoXj1putfvPDjW/vo=; b=FsPJeO1uGzs2jwG2QS3ZM1QypYa+bd6CrXxZjp7oAS0RGEVcfGJhyIJQ+Mzq6iaX5V NQm08qzqRVD5ZE7A/Yt9BoBlBl10uMJwhcwpP/7QgORM95NIFxHLrhSgRNaEipVQV3MI s0/3lNIIDKqbPTPuuJ+nX4L49eK6jZItHKGHdlFaVIS9Yg+2AZD08CoIsR0w197lg2zz ug2wqdp+QMOjmJCARgv4rWaQaBIvFdYn0L7UJ7NX5cHF7vE2Qi/Ud9a55NGaCspxu2uo Zh59a+bg/AeMD7YPbBv1hTPWKDykNJ70/2Tyn5E+2/2NRYnWBCxkZUiXy2uWO03C7nkR qh6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UwDa/0xQo6BpEra8SD4QlTy55YpoXj1putfvPDjW/vo=; b=ivdHSNGCbV43Q1qnL5gr75GyyuqYfcb3umFSh95MB8+c/4KPt/9+PWZ214/4OUNkkh R0Kmd/od8x7JrXsXwH2kwOTtAqSoVubkgTAIWDGLlvoryzn/S1hWq1FOcPlMeD+63UAw o6vXwA/vUjbO+SqX26KPknUs1nbAWEzV37ZkPx1RS2dbs9ovdPP0WGzYsDVSDSSZ3BSJ sKu1VEapkc10SS1GhRnmj7PwXltuueoQeLpnKVI14KohVSSDgXRiA791jO/u2g963KNQ gcvR83CxYmGn6QPXnC8CzVQgWGozmNB29cWhpwxf1fFyh2j3CZw+05LTudyYSZCTfva9 IOMw== X-Gm-Message-State: ALQs6tCRAIzoZrYDxRD12LNCdquyS/N29Nihqvu/NV5k2vW/d9BBg859 YUQVdFGYAAJskRzxrurd1m0= X-Google-Smtp-Source: AB8JxZqYqzKPxTrzRlXWAn0q7MPDBf3swfLuhZxFxmMXvbIyZGpjOW4+wdyClG8KDxaXKtzcjUCGeA== X-Received: by 2002:a17:902:6b09:: with SMTP id o9-v6mr34661597plk.256.1525591799826; Sun, 06 May 2018 00:29:59 -0700 (PDT) Received: from roar.au.ibm.com (59-102-70-78.tpgi.com.au. [59.102.70.78]) by smtp.gmail.com with ESMTPSA id j10sm49790743pfj.1.2018.05.06.00.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 00:29:58 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , David Gibson , Alexander Graf , kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH QEMU] osdep: powerpc64 align memory to allow 2MB radix THP page tables Date: Sun, 6 May 2018 17:29:49 +1000 Message-Id: <20180506072949.12783-1-npiggin@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org This allows KVM with the Book3S radix MMU mode to take advantage of THP and install larger pages in the partition scope page tables (the host translation). Signed-off-by: Nicholas Piggin --- include/qemu/osdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 41658060a7..5910682221 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -357,7 +357,8 @@ void qemu_anon_ram_free(void *ptr, size_t size); #endif #if defined(__linux__) && \ - (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)) + (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) \ + || defined(__powerpc64__)) /* 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. */