Message ID | 1531906876-13451-17-git-send-email-joro@8bytes.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79CFF602CA for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 18 Jul 2018 09:42:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69FA828FBC for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 18 Jul 2018 09:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D23F28FC6; Wed, 18 Jul 2018 09:42:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDF2728FBC for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 18 Jul 2018 09:42:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A8B96B0282; Wed, 18 Jul 2018 05:41:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 29A9C6B0286; Wed, 18 Jul 2018 05:41:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE5756B0282; Wed, 18 Jul 2018 05:41:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by kanga.kvack.org (Postfix) with ESMTP id 6E9D96B0282 for <linux-mm@kvack.org>; Wed, 18 Jul 2018 05:41:34 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id s18-v6so1694970edr.15 for <linux-mm@kvack.org>; Wed, 18 Jul 2018 02:41:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=S4MgOOtbnkkfJuMRU2k7i/vCCmzXOxdDizUjf0gP0lA=; b=NHoSmtdl6rkdZzpKt6KyYJSVdKY+xeyG24/lLfHzv1JVvz7LvoxVI9z02e0cv5D29b SXK1B510ZIf+OiQkcK3cv7D8tw1O4prTEL6YFSweUCl4owYKvwATkIekcVb18zbQISAx eZNH3hYIOXDjcuoeFoRpUVb568Yxaj9rwRjHcKLExKMJSzOdT77i88Qqb+2u6d2vjPJb s++wkj/It0D333+tbB/fmtEz37ktjSf9KOl6XIt+zdZBwtZ1jQ3hVk8z707HgCLdVZ8k /Gv7NcCymI29omJ9T6P/POv4WscOpPfyQE2il6Dw7Aybrpxc0f+DZuhwdU0dQlokAnHG aTLw== X-Gm-Message-State: AOUpUlEcAzacN4ewLjbfc/WXKHsP6Ec2rNnlPVljGQ3pWCNcoMVwIe6J udECpwVIA474AHd1V6sJRZSq+uZplaZwXabqbWdIeOEU0JbeJbTlcYWBgHdONMNPt2exx3g0JAG f7WCDmGXzB4eFinYThizOSK9IrkFYaI28dVWdEcazoYxUDQxah4FeaTvvRUOfXgBUUA== X-Received: by 2002:a50:a105:: with SMTP id 5-v6mr6071185edj.186.1531906894021; Wed, 18 Jul 2018 02:41:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2o7j15dSRW2JZ37NFfIfACHCDslN56DQO7SNbka8mqogLMffA+NQFTiM3VshHAuhkL7s4 X-Received: by 2002:a50:a105:: with SMTP id 5-v6mr6071154edj.186.1531906893445; Wed, 18 Jul 2018 02:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531906893; cv=none; d=google.com; s=arc-20160816; b=KzvcBEEkAJO3SnMPAvGxMTAe8TpmvNhcq9TqwV9oIFIBtq8z9VfLjUmeAJSuh4ypzW IhZmFP72ZuRkVSGSrIeAgwuiJeBPdc/ZWqYtvPXSt4pd4yT38SMH4N6xRol5lENvjpeh +fps2QTMHKXwQ2KkkUnBhMUNYCwVOCPb4cjK///ObFW6gHaFIxs+XcvM8mnVoVl4DKLn JQqutSU/9iNI8C6Ojb/c+VQKB4HxkkOdVIbLEUIhHgOuHBo7nn7D3NRNaT9uAHz3rtLg btQ0KWkxUsi35fb6S2zG8Wdu/aq/J0SVieXen29ule75Xs25uueLe3IQVEcZTLgqrm7V D9NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=S4MgOOtbnkkfJuMRU2k7i/vCCmzXOxdDizUjf0gP0lA=; b=W60r5mm+e1z3GGzoQyqraqqIxsgYWoJy6U1q5hVlb993zzp3ttwJAe1oKBRXPZ9e9T oTi+d9TYyRY7PgZq4iuzBnXz5WZwAp6qbf7XMoHxfzPLK4TZZkhbA2KqY0IW6Fmy34gQ 56Om8WI9Wx4vKA2R0IiK5DE0JKA9REUVJndyKxOWSIxTqoe+CDwkSndjd93A3ebPB+qO QUuOIWnuxVp5E0yOtW3hWzxSjz1/cGhn475nAnDm8voGixpJ9Ceo9f8oIcnmjXQSsNzn 4XtLdW5tbWdxHFXIGnVa6ATN8b4pu6gdq4KRn+V4nn0VJXcVn8Lg2um2q6AomG9UITOg XLHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=cv8kyqbB; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: from theia.8bytes.org (8bytes.org. [81.169.241.247]) by mx.google.com with ESMTPS id k21-v6si160987edq.27.2018.07.18.02.41.33 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 02:41:33 -0700 (PDT) Received-SPF: pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) client-ip=81.169.241.247; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=cv8kyqbB; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: by theia.8bytes.org (Postfix, from userid 1000) id B7A0F96B; Wed, 18 Jul 2018 11:41:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1531906882; bh=qYlJ2zsyHaAhXUQt0Hazi8E1heNgKD3G46Knr4YajHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cv8kyqbBgaDh0zOP4/76qPPyF7Q9QO8igqD+hqdTXc/hD0jD6TXg64cOKDT6coXBs zBj3C9FHKWfOc1MGAUmD8hSW9/LczAMTsjL7LqKx/BJ22ri6ZhrH6pDaQLvAEs2f/G hWdxAL1fo7xdScigkTkquBd4VhsuSebMAvW2/kOtgIJxNdcENmrXLrM8axhiO4PMOO WQxdKTxLAvnK3qHVEmrKYH+DmCiPX6/TpYLdUDjEW6U89nGas5wbdTEoAzTcNnHFt+ b5cx09p+X48syui5OEig59gdPQNzuVMCRJOi59cucT/A0MfjGB5wBI3nlZo7m6Me0h BWuXUWRpu6Fiw== From: Joerg Roedel <joro@8bytes.org> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, "H . Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds <torvalds@linux-foundation.org>, Andy Lutomirski <luto@kernel.org>, Dave Hansen <dave.hansen@intel.com>, Josh Poimboeuf <jpoimboe@redhat.com>, Juergen Gross <jgross@suse.com>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Jiri Kosina <jkosina@suse.cz>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Brian Gerst <brgerst@gmail.com>, David Laight <David.Laight@aculab.com>, Denys Vlasenko <dvlasenk@redhat.com>, Eduardo Valentin <eduval@amazon.com>, Greg KH <gregkh@linuxfoundation.org>, Will Deacon <will.deacon@arm.com>, aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli <aarcange@redhat.com>, Waiman Long <llong@redhat.com>, Pavel Machek <pavel@ucw.cz>, "David H . Gutteridge" <dhgutteridge@sympatico.ca>, jroedel@suse.de, joro@8bytes.org Subject: [PATCH 16/39] x86/pgtable/pae: Unshare kernel PMDs when PTI is enabled Date: Wed, 18 Jul 2018 11:40:53 +0200 Message-Id: <1531906876-13451-17-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531906876-13451-1-git-send-email-joro@8bytes.org> References: <1531906876-13451-1-git-send-email-joro@8bytes.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/x86/include/asm/pgtable-3level_types.h b/arch/x86/include/asm/pgtable-3level_types.h index 6a59a6d..78038e0 100644 --- a/arch/x86/include/asm/pgtable-3level_types.h +++ b/arch/x86/include/asm/pgtable-3level_types.h @@ -21,9 +21,10 @@ typedef union { #endif /* !__ASSEMBLY__ */ #ifdef CONFIG_PARAVIRT -#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) +#define SHARED_KERNEL_PMD ((!static_cpu_has(X86_FEATURE_PTI) && \ + (pv_info.shared_kernel_pmd))) #else -#define SHARED_KERNEL_PMD 1 +#define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI)) #endif /*