Received: by 10.223.176.5 with SMTP id f5csp376825wra; Wed, 7 Feb 2018 00:30:42 -0800 (PST) X-Google-Smtp-Source: AH8x227i1mZ7DzFZsddE3fEZs2PVMP7JkNR/moP3eM1UiLhqjNqSP7HlQw0WyT4aCMdvNJ1U0wP7 X-Received: by 2002:a17:902:46:: with SMTP id 64-v6mr5273328pla.341.1517992242713; Wed, 07 Feb 2018 00:30:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517992242; cv=none; d=google.com; s=arc-20160816; b=MXWmJkcTcBY5B1iWr7M2tj9qyDMUfMmNApv4ebHCU0qO3mBkoR37WBxKWWteS8Z0wX +f60igwxHsjHzXWvCNigpyoTS40jk1QHRq6SXKpFeyc6sRX5K/rd/YdmYxwGU+YZttJD 9gaUjHnySGXVcNpNNHpqnHbZJlEy7FOaRX8ULWt4NsS9Ul6OtZPOTTUa/wbmfX2Veu55 3KpESeRCttK867LzRkSvdCk2q2tLofLA9wuwN+BK8xkJIOA9I0Saqdayp4VlUkpfia5A 6sZz66JWxHHye9FopigWa+jbHLEhZA+uqSofS5omPt4sEqLnUGHNEgTBO6U9YBxMvfMF uXoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0V0kOVVqLSepH5rzj6kU5YwC+K+Jxh0cfPcw0B/8+ws=; b=xnXrHHW9rl756XwzM+wpbY5P1l1eG94wG9VTBC5tRn0Jz0PqIoE1AHXrBPh+WUsLTn 2tV//+QrlzjGs+7tzUgKcA0XaCdkNR0n0Btrit0BRLBpYdDnAdoaXZ7BkUs1Uk7iuMOz y5F2vvMwfEEcAilE87+g6RgNZAeMtzy2xiDN/KcroKxoYey15OcqObFQ3Y/rdwbpwkQG PT/C6TKdsYmtDE6sTAsCfstAom7tLPeugMlCuLFE91C2v0JV2BU0FfXN9TZYJlKwDgaV 9lq0lzytFYU7vLSq9b/RZKD0ZnSOx6z75Nrf6T0xE4ZsGv3j/QoDt0A4PkvgvkIQH9Hy FbpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=auNKptgH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5-v6si726188plz.513.2018.02.07.00.30.28; Wed, 07 Feb 2018 00:30:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=auNKptgH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456AbeBGI3r (ORCPT + 99 others); Wed, 7 Feb 2018 03:29:47 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35941 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753291AbeBGI3p (ORCPT ); Wed, 7 Feb 2018 03:29:45 -0500 Received: by mail-wm0-f45.google.com with SMTP id f3so1590161wmc.1 for ; Wed, 07 Feb 2018 00:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0V0kOVVqLSepH5rzj6kU5YwC+K+Jxh0cfPcw0B/8+ws=; b=auNKptgHAnqSJ66+QirS5CFyxJlw7wgcScYEsGNstRPQ3qExoOwAyKLdWLUsUUrxOD K3C5zspT7Gyj5VOvPjZubVZY2EsPeknov0fTvMepptLd2UJ21ydiwel2pJcdYt6LhudH C8Z91cvsXRXM74HWps9qJTfLeFDHZP/qsyftY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0V0kOVVqLSepH5rzj6kU5YwC+K+Jxh0cfPcw0B/8+ws=; b=VD1ggTviFBcTroyhXzI/1MkyD/CDyBWzmTXS+4ERyHq+S9l2kPgcjK+3ynepJSk77W jRjb4vdzDW91pz8uF11ggJ7hF+JyNU/QaIEbJuSIr63TTeX2J3trRSHb5rZhxXHkyO9H N6obJ0jxnij6963QwGrXY698syRwkYho+8wegh/S9MgcSan27FEsXZddQGKQGjuc/aCZ Kshg2no3DC96fMjChrfTQmaGAzoCs66FHvSlHcCxPl7+ueuey+mTk9nyzj5UkMiSysID n/5vY03IzxmQLUPByKEWtwAy/kEQ3fOvJUiO2iJeyx6HwrfLmuot6FGvTYpKiG7I0Inx ldWQ== X-Gm-Message-State: APf1xPA3/rzeHO4cWI3VPuyJOX9vXfVnBw1+ICIyP2uJjqCRNfjSTMSp z74NvXiK+nEa7gQCRMBz9ySwTg== X-Received: by 10.80.181.197 with SMTP id a63mr7437226ede.138.1517992184421; Wed, 07 Feb 2018 00:29:44 -0800 (PST) Received: from localhost (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id i32sm813252eda.89.2018.02.07.00.29.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 00:29:43 -0800 (PST) Date: Wed, 7 Feb 2018 09:29:42 +0100 From: Christoffer Dall To: Stephen Rothwell Cc: Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , KVM , Catalin Marinas , Linux-Next Mailing List , Linux Kernel Mailing List , Marc Zyngier , Will Deacon Subject: Re: linux-next: manual merge of the kvm tree with the arm64 tree Message-ID: <20180207082942.GA29286@cbox> References: <20180207122753.6e228f27@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207122753.6e228f27@canb.auug.org.au> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 07, 2018 at 12:27:53PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the kvm tree got a conflict in: > > arch/arm64/include/asm/pgtable-prot.h > > between commit: > > 41acec624087 ("arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()") > > from the arm64 tree and commit: > > d0e22b4ac3ba ("KVM: arm/arm64: Limit icache invalidation to prefetch aborts") > > from the kvm tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc arch/arm64/include/asm/pgtable-prot.h > index 2db84df5eb42,4e12dabd342b..000000000000 > --- a/arch/arm64/include/asm/pgtable-prot.h > +++ b/arch/arm64/include/asm/pgtable-prot.h > @@@ -53,24 -47,23 +53,24 @@@ > #define PROT_SECT_NORMAL (PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL)) > #define PROT_SECT_NORMAL_EXEC (PROT_SECT_DEFAULT | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL)) > > -#define _PAGE_DEFAULT (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL)) > +#define _PAGE_DEFAULT (_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL)) > +#define _HYP_PAGE_DEFAULT _PAGE_DEFAULT > > -#define PAGE_KERNEL __pgprot(_PAGE_DEFAULT | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE) > -#define PAGE_KERNEL_RO __pgprot(_PAGE_DEFAULT | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_RDONLY) > -#define PAGE_KERNEL_ROX __pgprot(_PAGE_DEFAULT | PTE_UXN | PTE_DIRTY | PTE_RDONLY) > -#define PAGE_KERNEL_EXEC __pgprot(_PAGE_DEFAULT | PTE_UXN | PTE_DIRTY | PTE_WRITE) > -#define PAGE_KERNEL_EXEC_CONT __pgprot(_PAGE_DEFAULT | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_CONT) > +#define PAGE_KERNEL __pgprot(PROT_NORMAL) > +#define PAGE_KERNEL_RO __pgprot((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY) > +#define PAGE_KERNEL_ROX __pgprot((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY) > +#define PAGE_KERNEL_EXEC __pgprot(PROT_NORMAL & ~PTE_PXN) > +#define PAGE_KERNEL_EXEC_CONT __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_CONT) > > -#define PAGE_HYP __pgprot(_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN) > -#define PAGE_HYP_EXEC __pgprot(_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY) > -#define PAGE_HYP_RO __pgprot(_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN) > +#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN) > +#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY) > +#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN) > #define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP) > > - #define PAGE_S2 __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY) > - #define PAGE_S2_DEVICE __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_UXN) > -#define PAGE_S2 __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY | PTE_S2_XN) > -#define PAGE_S2_DEVICE __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_S2_XN) > ++#define PAGE_S2 __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY | PTE_S2_XN) > ++#define PAGE_S2_DEVICE __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_S2_XN) > > -#define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | PTE_PROT_NONE | PTE_RDONLY | PTE_PXN | PTE_UXN) > +#define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | PTE_PROT_NONE | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN) > #define PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_WRITE) > #define PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_WRITE) > #define PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN) This looks correct to me. Thanks, -Christoffer