From patchwork Wed Oct 17 10:47:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Daniel Kachhap X-Patchwork-Id: 10645303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4339A109C for ; Wed, 17 Oct 2018 10:52:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 430C22AD58 for ; Wed, 17 Oct 2018 10:52:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 409A12AE00; Wed, 17 Oct 2018 10:52:16 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 D316C2AE07 for ; Wed, 17 Oct 2018 10:52:15 +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=Hpvzm7KOyySPU7HXGhAaILlaXJpkWydYhjWnY0dL94w=; b=JIkAIrH7T0lTxdiCiVrQqr5ZXS H1MJiu0H/alyprccbDL/QlCdYPfnl6CgEBp9f+iJKPvQpOckObgDqn2tyOE2R8xZtP2senYv5LWS5 XaJxTheHqkNt9k0FczbLliSssCPHhguIZph0qSZ651bfHUV55f/fMEAFf/lzHjMPwZLcHvT6mw/Tm 8NUCBizQRNCDA/xjup0VzrulgFzaqDvMTHjEpAiZMqY24NoaXJ3kY3iSTae77ttpDqmDkQv9qwT7Z Cuu2rKH1AnCXY7H8H2HbZ5pKBqSyTCzpJ1KYJw8CCDnCB7KQMSNUEm9qkCBI49/jzeqCuJIk8k9uQ 2ZWJqlAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCjQv-00028T-K3; Wed, 17 Oct 2018 10:52:09 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCjOF-00080j-7J for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2018 10:50:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5D561682; Wed, 17 Oct 2018 03:49:18 -0700 (PDT) Received: from a75553-lin.blr.arm.com (unknown [10.162.0.175]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B50B33F71D; Wed, 17 Oct 2018 03:49:14 -0700 (PDT) From: Amit Daniel Kachhap To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 6/7] arm64: docs: document KVM support of pointer authentication Date: Wed, 17 Oct 2018 16:17:59 +0530 Message-Id: <1539773280-4159-7-git-send-email-amit.kachhap@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539773280-4159-1-git-send-email-amit.kachhap@arm.com> References: <1539773280-4159-1-git-send-email-amit.kachhap@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181017_034923_322480_7D24B0D5 X-CRM114-Status: GOOD ( 12.51 ) 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: Mark Rutland , Andrew Jones , Marc Zyngier , Catalin Marinas , Will Deacon , Christoffer Dall , Kristina Martsenko , kvmarm@lists.cs.columbia.edu, Ramana Radhakrishnan , Amit Daniel Kachhap , Dave Martin , linux-kernel@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 The documentation is updated to help in using pointer authentication for KVM guests. Signed-off-by: Amit Daniel Kachhap Cc: Mark Rutland Cc: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu --- Documentation/arm64/pointer-authentication.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/arm64/pointer-authentication.txt b/Documentation/arm64/pointer-authentication.txt index 8a9cb57..b00d735 100644 --- a/Documentation/arm64/pointer-authentication.txt +++ b/Documentation/arm64/pointer-authentication.txt @@ -78,7 +78,13 @@ to TTBR1 addresses (e.g. kernel pointers). Virtualization -------------- -Pointer authentication is not currently supported in KVM guests. KVM +Pointer authentication is enabled in KVM guest when virtual machine is +created by passing a flag requesting this feature to be enabled. Without +this flag, pointer authentication is not enabled in KVM guests and KVM will mask the feature bits from ID_AA64ISAR1_EL1, and attempted use of the feature will result in an UNDEFINED exception being injected into the guest. + +The flag to enable this feature is KVM_ARM_VCPU_PTRAUTH and should be +used in KVM API KVM_ARM_VCPU_INIT. The pointer authentication key +registers are hidden from userspace if this feature is not enabled.