From patchwork Wed Jan 31 09:34:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10193693 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 41038603EE for ; Wed, 31 Jan 2018 09:40:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21CF3201BC for ; Wed, 31 Jan 2018 09:40:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16642285FC; Wed, 31 Jan 2018 09:40:40 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 91793201BC for ; Wed, 31 Jan 2018 09:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7KCKg2t/ob5GgMWORG7/cuRQXVYf3bN0G46zqTo1bgk=; b=Tg4gb7Ywb3CFJ1vvpuDkKA/qFl vUp8KhSEAa491jJwH+l6vGoMLK3iQjoPDv76mQPDOqFkScv7M1JCYDUKs/ACo1r88Qwm+w1Dw9Chs SghlQET0/QbV9sZpHHQg3hbnzYPdBlmKX+dC34c52qr16rGhbY0UqbumG7ECEPqqBNIp+kKfDFLLG 4JXIGWXb256cUT0cQ3bT/WKfRRUB6Vr1FoEeH14EiIzM0rgh1VsFeUfdISFKIl61RdcexRux31kLJ CBCwo5Ai8F5E1aH4AQXJq26weV4znoxZHBJRolzOtSqWwfL98hvNcRcXdZ+Ixv4a8YT47PthlV15t VKfX7igQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egose-0003BS-C5; Wed, 31 Jan 2018 09:40:36 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egony-0005j3-B4 for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2018 09:35:52 +0000 Received: by mail-wm0-x244.google.com with SMTP id j21so7526890wmh.1 for ; Wed, 31 Jan 2018 01:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gF7JX4QMX0ef9TEFnZ1Alfax9qJhtFZ/pzLtnoMqkP8=; b=icIngM+poSjiz+P++cAO998ykdSbnEWqI7rag2sQn2TIZWASSQiVjo4S4pr74LErNs xQbWt5rYjKJ0rqnS/K77smd4EUeS03g6WnvdjDCfyvccpGeDUta1XkEG82cV0i/uL7Dg QX5l7Lhg8tkatQR3pg9soTuMpAuTtJyDoxSBc= 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:in-reply-to :references; bh=gF7JX4QMX0ef9TEFnZ1Alfax9qJhtFZ/pzLtnoMqkP8=; b=jAv9Jo73vlrQ+GaAcwOOZ2iQDg2N4uqpPCTjdqtd7MPlwWicIBI6VXc7C4tlXh8mki a016OF+cEeuqnJXk5mwAcWb1cHYj0ExLUB2NFMHU+OXIBnp1s6UmO1eWgS6vUuKt1KpX VqNLd37NXVzkogJW1QKTVYz732DPxlk9U8w2TTPnVvITe74tDz3R9obpHr3V/6gyPyP9 xD4/LUrU2Iuze1YTinzvlF6kTMRiHEAqHkneI8FMWbBVZLsKrQ1f2zihzGietSVoz7dI LESIqQMcfcF3s5gS2o+z+v2/o9b67Uu5SOUioSpvBrPfB2Y9cRNGnDrVqor8dbsc3/Uk pxLg== X-Gm-Message-State: AKwxyteOZ5YJA6ZllisboLFK0e69gQLhmbvMjLBj+ilf+WYMIgY5wRXw wjyUQ0Ghas2g8r9EN8x0+SMgEQ== X-Google-Smtp-Source: AH8x226quVqs2iwZhMo8ENLi5RqX7w12jQP+D20D5n2MdDt5GfZRScp9EoGvdudkVA+f9XusuN6BhQ== X-Received: by 10.80.166.65 with SMTP id d59mr56819014edc.207.1517391337585; Wed, 31 Jan 2018 01:35:37 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id z2sm10247837edc.50.2018.01.31.01.35.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jan 2018 01:35:36 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 17/28] arm64: KVM: PTE/PMD S2 XN bit definition Date: Wed, 31 Jan 2018 10:34:56 +0100 Message-Id: <20180131093507.22219-18-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180131093507.22219-1-christoffer.dall@linaro.org> References: <20180131093507.22219-1-christoffer.dall@linaro.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier As we're about to make S2 page-tables eXecute Never by default, add the required bits for both PMDs and PTEs. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm64/include/asm/pgtable-hwdef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index eb0c2bd90de9..af035331fb09 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -177,9 +177,11 @@ */ #define PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[2:1] */ #define PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */ +#define PTE_S2_XN (_AT(pteval_t, 2) << 53) /* XN[1:0] */ #define PMD_S2_RDONLY (_AT(pmdval_t, 1) << 6) /* HAP[2:1] */ #define PMD_S2_RDWR (_AT(pmdval_t, 3) << 6) /* HAP[2:1] */ +#define PMD_S2_XN (_AT(pmdval_t, 2) << 53) /* XN[1:0] */ /* * Memory Attribute override for Stage-2 (MemAttr[3:0])