From patchwork Wed Jul 18 09:41:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10531873 Return-Path: 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 E72FA602CA for ; Wed, 18 Jul 2018 09:42:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E6528FBC for ; Wed, 18 Jul 2018 09:42:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C87D928FCD; Wed, 18 Jul 2018 09:42:43 +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 6ABA128FBC for ; Wed, 18 Jul 2018 09:42:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E356F6B0284; Wed, 18 Jul 2018 05:41:36 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CFDCE6B0287; Wed, 18 Jul 2018 05:41:36 -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 AACFA6B0288; Wed, 18 Jul 2018 05:41:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 430686B0284 for ; Wed, 18 Jul 2018 05:41:36 -0400 (EDT) Received: by mail-ed1-f70.google.com with SMTP id b25-v6so1680853eds.17 for ; Wed, 18 Jul 2018 02:41:36 -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=sBmnEAPtOXXVsp27L6zoCbiR5jvnoXrdbebyRH4BDuY=; b=nn/dFBDdrDcKEPzUF3gv7XF71A567C9nY0YsYx0qagIag35qGI/c9Yk7fOzRV0o2Ro 0o+bso2r59zL94guSSzYpOqwiB+im9ZRW9ck0qwAhmhNoZfKR1H8CmmcxFUu/vvwK1e4 Lvomeb60Kao1Vozb4+UmnOLl0petm9ZKVEKng3E39G5HKQqgDKzAWMcnL68CpKBHl9CF dwb0CKdqlNRX5+vja8v64TRnc8ncKT0uLCItTs97VLwIHv2dCHghwk2UUD6aV510gg3j Nj3h3qVSrAxl+4ZfWgWJJ6vfdI6+R7YzghC6zaBxMStt4+/kd1EKe5BjE/HmjNzggu4g O+1A== X-Gm-Message-State: AOUpUlE5cvqppyP5fqveBWQ2UgmWYDH+pgwu1U7SAHAo7Z/utTW6uPLb GdA95xjIV/Z+lxz5nDp4gKLrwmCf+Cv+6tUIaNAw1DrQ1aI54Rf1ENT1WcsYcu+9/+RSNEur9y4 U9OLx+pdy0x6yl8TVfnZ71FvOOctvKh5qlnQKEwdI9iwRd3XucwUhip24AJXEi/2ZVQ== X-Received: by 2002:a50:dccf:: with SMTP id v15-v6mr6274600edk.196.1531906895846; Wed, 18 Jul 2018 02:41:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddwxrSFXTkdFKhXrF9SlX3MGheUSAP6wzkq914pGkExkUHBbTRjtMPn3AuVQP4huS2nXYh X-Received: by 2002:a50:dccf:: with SMTP id v15-v6mr6274568edk.196.1531906895180; Wed, 18 Jul 2018 02:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531906895; cv=none; d=google.com; s=arc-20160816; b=LRpbudLfDOTjpuBIRAO3S2A9HVvvOVhC5CUfCeir+gX6yRlsanPMTCkPdkQsf6zsjO 5fuViH6tA+DYO15bcsv158rA/DiX2KRvNM96HnfD0lRqmTcEDeUHDpLHAAcYVElk9cQn deodbZ5oqowHkPbePsG8qV/dbwh+Ra7pgSFmLntSlUApn0XiMmfBXTLDLprcplJE7h7H XKhshftIHYrV8HRFzHVe2eQpSNj6iN9LlHMsN3vKOuKd1QH4yCAZHAe7Hly+bwMmuPm2 M6u9oaYPy5OiZdZEw8ju+qSnkq5x6yvvNnpRtGC4kgcd3r72G57R4mC9dUmIkeloFpYV ykkg== 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=sBmnEAPtOXXVsp27L6zoCbiR5jvnoXrdbebyRH4BDuY=; b=HbuExrgse9GRHuHwiSnx2RDecI3qtPpzTO/aegMFI66aBWQRFGJiG9WEkZWl/+8LNR i4mdpJ87rLCjepzsZ92O5m04hcQbgN4FzZRZe9aS34uV/pciA0n8zXUcUxtYBWfd+txY On6Mei3TYpzSiJ2k/eN76+3Ue6rxzAvC3ZzvRoa+qj8Oui+eLzp+H2uaQAianSHZMCrF wn6iuv1N6Wc70D7RgSuuV4uxE8awHFSo2YOi61Wr64yg7Trf0mqv6VfA4GBaIKG5iimq zCxPcGrBVc61OLTMwF6TQBVAlKPYXVWGYsv4cVgFj1VuM+SepdzprllOQ7Qa1nek19Tq ty/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=iofPAXrp; 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 o16-v6si659662edo.118.2018.07.18.02.41.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 02:41:35 -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=iofPAXrp; 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 7F37CA58; Wed, 18 Jul 2018 11:41:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1531906883; bh=/Ih1ouATHKIWwXvRWuZbzp4GcZEjnBzBwjH19GfP9H8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iofPAXrphrKsFvlQOfwmUK8tNTPw9GSJHCwLAoxi6nR60sAlNV6aGO1SZOjO7po6a xF2jdFtTLz9Zj0lN8YECRQQ06Rs42MaKLOLjxgfYoFdsC6XlJvDaNnR32ZskANX8k0 7GLb599fQSa3aWnnXvEj1DgU+o4l0Mr+Rz9gNk79su2fiu0pwYlMnFI2aIujezEJVv YIFXeYplulZ3RhcmlF1LKYTIG2QEDxu+b+N4q15j8EnFu9gpY3nfqROGFJpW7qLn8U M0DiDjj3Q95S3sMJv3PlUnlsFrsyJe39CyR11GBLLIk09xxDT6GkbBfBC0InrGEhNE 3Njr/vzX6ng7A== From: Joerg Roedel To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 25/39] x86/mm/pti: Define X86_CR3_PTI_PCID_USER_BIT on x86_32 Date: Wed, 18 Jul 2018 11:41:02 +0200 Message-Id: <1531906876-13451-26-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: X-Virus-Scanned: ClamAV using ClamSMTP From: Joerg Roedel Move it out of the X86_64 specific processor defines so that its visible for 32bit too. Reviewed-by: Andy Lutomirski Signed-off-by: Joerg Roedel --- arch/x86/include/asm/processor-flags.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/processor-flags.h b/arch/x86/include/asm/processor-flags.h index 625a52a..02c2cbd 100644 --- a/arch/x86/include/asm/processor-flags.h +++ b/arch/x86/include/asm/processor-flags.h @@ -39,10 +39,6 @@ #define CR3_PCID_MASK 0xFFFull #define CR3_NOFLUSH BIT_ULL(63) -#ifdef CONFIG_PAGE_TABLE_ISOLATION -# define X86_CR3_PTI_PCID_USER_BIT 11 -#endif - #else /* * CR3_ADDR_MASK needs at least bits 31:5 set on PAE systems, and we save @@ -53,4 +49,8 @@ #define CR3_NOFLUSH 0 #endif +#ifdef CONFIG_PAGE_TABLE_ISOLATION +# define X86_CR3_PTI_PCID_USER_BIT 11 +#endif + #endif /* _ASM_X86_PROCESSOR_FLAGS_H */