From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37ABEC433DF for ; Mon, 15 Jun 2020 08:58:19 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id ABEEB2065F for ; Mon, 15 Jun 2020 08:58:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="HbVh+hzk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABEEB2065F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2A82B4B0F5; Mon, 15 Jun 2020 04:58:18 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id weMFlIahdATu; Mon, 15 Jun 2020 04:58:16 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D48FF4B0F1; Mon, 15 Jun 2020 04:58:16 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AAB194B0B4 for ; Mon, 15 Jun 2020 04:58:15 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JkKL-NzT8VzH for ; Mon, 15 Jun 2020 04:58:13 -0400 (EDT) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id ED2144B0EB for ; Mon, 15 Jun 2020 04:58:12 -0400 (EDT) Received: by mail-wm1-f66.google.com with SMTP id u26so13599345wmn.1 for ; Mon, 15 Jun 2020 01:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=HbVh+hzk5EMCxM8HGK4hG1KrtSz8Nm/Y6fwcA3KHzRcyUFMqNhJy20y/BVVd2vSQvW AErfOfpMe734o02wktzcMFgR2BX2dgnZYwJBZBldKTZIq5SUyVfg6nNP/80txEzIAfmr +gb9uCi7jZtYrv0+/5lGpjxNz/DoagX/I2qFwY72TakjZb6Sh35Zd0czsvw7EDfJ5z3k EN/5hItz0s1wsQl+L0hGFE+IoKsaUbQoG012t9KJh2NbSfJwm8+qau8Y2Q6Scr/2YEur DwiK8g9gUopMHDDNckOxXOcZH1JVHtGStDfFIanwt5BVtw+qlwkJWamTCGWX3ZrDsgTi aTmA== 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; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=fKg8u5RkWaZE4//GE7WMo9bHPp/1Qr8KLv4ZDsa9wCGv+X32e9WWISek8pG89JbotT NFE3emhTh0sKWMsawcf5ki2jowMpyFU4BajHjRW6TezfeThCmi1zWlsHb9PySSTUHp4w CamtkG9mpMUADAt0NbmlaZ7z587/KlCaIqhlxWC+MZVL50V5NJxEv4F4YNI1BcVKEPys REzsLdLu58g9bFEPU2FAf2g/uNkE8wHDBkMSMT48rwbjwvblWU+hZo0XnPmu7rv0d6KC ZoaMl46rbD5YJ/QAGxjg7j42uXjUEJ/jhTNm9LVgirRhRkNDKATwDLpnvPH4sHYHFFJT REOw== X-Gm-Message-State: AOAM532os8PV40F7AXPpirRhmaDtWSB3AuyVM9BI/Q4ouwZk/4eBYldl Q78uYekpor/zhJlc5zymBJpF5w== X-Google-Smtp-Source: ABdhPJwLOxCm//URtwLoljmFofuNMfLd0PKuFSaN0kqqtlnaKFsHDaMnEqPiaGR8skUD0V+QZBoTjA== X-Received: by 2002:a1c:7d4c:: with SMTP id y73mr11858831wmc.188.1592211491868; Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Received: from google.com ([2a00:79e0:d:109:355c:447d:ad3d:ac5c]) by smtp.gmail.com with ESMTPSA id y80sm21776273wmc.34.2020.06.15.01.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Date: Mon, 15 Jun 2020 09:58:06 +0100 From: Andrew Scull To: Marc Zyngier Subject: Re: [PATCH 2/4] KVM: arm64: Allow ARM64_PTR_AUTH when ARM64_VHE=n Message-ID: <20200615085806.GE177680@google.com> References: <20200615081954.6233-1-maz@kernel.org> <20200615081954.6233-3-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200615081954.6233-3-maz@kernel.org> Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, Jun 15, 2020 at 09:19:52AM +0100, Marc Zyngier wrote: > We currently prevent PtrAuth from even being built if KVM is selected, > but VHE isn't. It is a bit of a pointless restriction, since we also > check this at run time (rejecting the enabling of PtrAuth for the > vcpu if we're not running with VHE). > > Just drop this apparently useless restriction. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/Kconfig | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 31380da53689..d719ea9c596d 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1516,7 +1516,6 @@ menu "ARMv8.3 architectural features" > config ARM64_PTR_AUTH > bool "Enable support for pointer authentication" > default y > - depends on !KVM || ARM64_VHE > depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC > # GCC 9.1 and later inserts a .note.gnu.property section note for PAC > # which is only understood by binutils starting with version 2.33.1. > @@ -1543,8 +1542,7 @@ config ARM64_PTR_AUTH > > The feature is detected at runtime. If the feature is not present in > hardware it will not be advertised to userspace/KVM guest nor will it > - be enabled. However, KVM guest also require VHE mode and hence > - CONFIG_ARM64_VHE=y option to use this feature. > + be enabled. > > If the feature is present on the boot CPU but not on a late CPU, then > the late CPU will be parked. Also, if the boot CPU does not have ...and we just got the patch to let EL2 use the ptrauth instructions for the save restore in hyp/entry.S! Acked-by: Andrew Scull _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A17EC433E0 for ; Mon, 15 Jun 2020 08:58:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FDC120757 for ; Mon, 15 Jun 2020 08:58:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tYwgYHrj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="HbVh+hzk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FDC120757 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AQOGPMDTBVuVfZkZxBqptpjdWrIhpZtFr+n6vW5FBOg=; b=tYwgYHrjgF/mCz 4ZCjfs3jzC1Gudc0CZUXsu0rsbmA+CnkECK0uGDu21766gXRWvw6FRcxEeOEZPdOqZbk3EkXHpFMf /6BEq5FiAeQ/Ve62g9liNT+mcnDTijTtAiF2cJqY7EARp+RgltWcYtRkMtHKgkJFKetGCkhzgs8M8 g5TSqxEi1vg9JPJcRCyM6un3M2NXmRlVFVLMbSCHSx3TjJ2S0QHtS31HYT6H94r3ZeKn8QdB9fyWP VNulkiW+wVLB11OujAazsmVTJtWzs3laE/eSZ+s2YqvYh90R49yvx4OkXzFn83b87WxthY9xwFZjo VUrwOCzufAfIZronkJIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkkwa-0002O8-N0; Mon, 15 Jun 2020 08:58:16 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkkwX-0002Ng-Dv for linux-arm-kernel@lists.infradead.org; Mon, 15 Jun 2020 08:58:14 +0000 Received: by mail-wm1-x343.google.com with SMTP id q25so13983948wmj.0 for ; Mon, 15 Jun 2020 01:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=HbVh+hzk5EMCxM8HGK4hG1KrtSz8Nm/Y6fwcA3KHzRcyUFMqNhJy20y/BVVd2vSQvW AErfOfpMe734o02wktzcMFgR2BX2dgnZYwJBZBldKTZIq5SUyVfg6nNP/80txEzIAfmr +gb9uCi7jZtYrv0+/5lGpjxNz/DoagX/I2qFwY72TakjZb6Sh35Zd0czsvw7EDfJ5z3k EN/5hItz0s1wsQl+L0hGFE+IoKsaUbQoG012t9KJh2NbSfJwm8+qau8Y2Q6Scr/2YEur DwiK8g9gUopMHDDNckOxXOcZH1JVHtGStDfFIanwt5BVtw+qlwkJWamTCGWX3ZrDsgTi aTmA== 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; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=mYU2jGcscNxg2tdUtwzEBdSiF5TONuQRONXL1wXs1FmO5q88+JfYkXvi62VVznmwsD Pxb/afF3RfWarsDcMSaXCGHP62Akix3QGp5x9+nDJ8vaCVwML2wdA46e5xj61Nm3Ky65 5vIJhUNTWkPllAgKNMch39g21KoyczOiUZx08zWz29nPTOrx9p+/j9LDaHDQcgXqd/d1 fpvMIS7MOwjWN0zHIBxbe0l9eDNWQ0ooY8+lm2t9Tz7lkJEw147feb9DL93vkbcS5H3z bHFTuCZNVJNgE9wvhLt8sxdkxZsUqebWwpiNLwRJWlGDIOkD+39W/b8AzRL6qM2xda+r KaiQ== X-Gm-Message-State: AOAM530YTUehwgtXEVHMtltXwmCW+HaLepqDTDrBVU8DpKbJ4+b5Op4w g4GvTptGpYcHrwgdK3LT/CJsnw== X-Google-Smtp-Source: ABdhPJwLOxCm//URtwLoljmFofuNMfLd0PKuFSaN0kqqtlnaKFsHDaMnEqPiaGR8skUD0V+QZBoTjA== X-Received: by 2002:a1c:7d4c:: with SMTP id y73mr11858831wmc.188.1592211491868; Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Received: from google.com ([2a00:79e0:d:109:355c:447d:ad3d:ac5c]) by smtp.gmail.com with ESMTPSA id y80sm21776273wmc.34.2020.06.15.01.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Date: Mon, 15 Jun 2020 09:58:06 +0100 From: Andrew Scull To: Marc Zyngier Subject: Re: [PATCH 2/4] KVM: arm64: Allow ARM64_PTR_AUTH when ARM64_VHE=n Message-ID: <20200615085806.GE177680@google.com> References: <20200615081954.6233-1-maz@kernel.org> <20200615081954.6233-3-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200615081954.6233-3-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200615_015813_489832_EFFF31E1 X-CRM114-Status: GOOD ( 21.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Suzuki K Poulose , James Morse , linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 15, 2020 at 09:19:52AM +0100, Marc Zyngier wrote: > We currently prevent PtrAuth from even being built if KVM is selected, > but VHE isn't. It is a bit of a pointless restriction, since we also > check this at run time (rejecting the enabling of PtrAuth for the > vcpu if we're not running with VHE). > > Just drop this apparently useless restriction. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/Kconfig | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 31380da53689..d719ea9c596d 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1516,7 +1516,6 @@ menu "ARMv8.3 architectural features" > config ARM64_PTR_AUTH > bool "Enable support for pointer authentication" > default y > - depends on !KVM || ARM64_VHE > depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC > # GCC 9.1 and later inserts a .note.gnu.property section note for PAC > # which is only understood by binutils starting with version 2.33.1. > @@ -1543,8 +1542,7 @@ config ARM64_PTR_AUTH > > The feature is detected at runtime. If the feature is not present in > hardware it will not be advertised to userspace/KVM guest nor will it > - be enabled. However, KVM guest also require VHE mode and hence > - CONFIG_ARM64_VHE=y option to use this feature. > + be enabled. > > If the feature is present on the boot CPU but not on a late CPU, then > the late CPU will be parked. Also, if the boot CPU does not have ...and we just got the patch to let EL2 use the ptrauth instructions for the save restore in hyp/entry.S! Acked-by: Andrew Scull _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A57BCC433DF for ; Mon, 15 Jun 2020 08:58:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81EA320738 for ; Mon, 15 Jun 2020 08:58:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HbVh+hzk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729093AbgFOI6O (ORCPT ); Mon, 15 Jun 2020 04:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728496AbgFOI6O (ORCPT ); Mon, 15 Jun 2020 04:58:14 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2E3C061A0E for ; Mon, 15 Jun 2020 01:58:13 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id f185so13966440wmf.3 for ; Mon, 15 Jun 2020 01:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=HbVh+hzk5EMCxM8HGK4hG1KrtSz8Nm/Y6fwcA3KHzRcyUFMqNhJy20y/BVVd2vSQvW AErfOfpMe734o02wktzcMFgR2BX2dgnZYwJBZBldKTZIq5SUyVfg6nNP/80txEzIAfmr +gb9uCi7jZtYrv0+/5lGpjxNz/DoagX/I2qFwY72TakjZb6Sh35Zd0czsvw7EDfJ5z3k EN/5hItz0s1wsQl+L0hGFE+IoKsaUbQoG012t9KJh2NbSfJwm8+qau8Y2Q6Scr/2YEur DwiK8g9gUopMHDDNckOxXOcZH1JVHtGStDfFIanwt5BVtw+qlwkJWamTCGWX3ZrDsgTi aTmA== 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; bh=5ShxQ/p8QgWJk316YAyJ/2tQifOc4oxip3xhjWlqJEQ=; b=WG2qwwu7AyHvXR3mpihmvHB8dthSNj0x8x2Lyz31vIGdGpYz1bHwMRAVaUhd64HAQ3 cfuwNqEYSxjfszoE0GwmhxxWkRGo69xBAz1lawpvmM5cfxaDsHSzfXZDCLiZia8TnBsN d9sWdxB5zsDtN54NTDk0629C/ONn0PIxZ40MOs9aQBeArnu5WxR9QLEDH1+1cG2CmJmp QRml/dMmfv9Wfgo+IDJM6+bisH9TI64zdbKPs9bxW91kTEwNHR+h+CYHSvryjwvFX1EU n2y9PtZrAXt3ecpcLYTBcLcIm4OGJAd9Mdl9HLH/12RK0njbxrtjzDyV6sXqJ9mTmoAm +QnQ== X-Gm-Message-State: AOAM5327f9a1rzzg3/Cp9ARt9EUV8zI3gDFqNUluD0SCtb72DSuFo9sA ETqvOk88tXDpqSPaWxZl9FQwo0Nback= X-Google-Smtp-Source: ABdhPJwLOxCm//URtwLoljmFofuNMfLd0PKuFSaN0kqqtlnaKFsHDaMnEqPiaGR8skUD0V+QZBoTjA== X-Received: by 2002:a1c:7d4c:: with SMTP id y73mr11858831wmc.188.1592211491868; Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Received: from google.com ([2a00:79e0:d:109:355c:447d:ad3d:ac5c]) by smtp.gmail.com with ESMTPSA id y80sm21776273wmc.34.2020.06.15.01.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 01:58:11 -0700 (PDT) Date: Mon, 15 Jun 2020 09:58:06 +0100 From: Andrew Scull To: Marc Zyngier Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, James Morse , Julien Thierry , Suzuki K Poulose , kernel-team@android.com Subject: Re: [PATCH 2/4] KVM: arm64: Allow ARM64_PTR_AUTH when ARM64_VHE=n Message-ID: <20200615085806.GE177680@google.com> References: <20200615081954.6233-1-maz@kernel.org> <20200615081954.6233-3-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200615081954.6233-3-maz@kernel.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jun 15, 2020 at 09:19:52AM +0100, Marc Zyngier wrote: > We currently prevent PtrAuth from even being built if KVM is selected, > but VHE isn't. It is a bit of a pointless restriction, since we also > check this at run time (rejecting the enabling of PtrAuth for the > vcpu if we're not running with VHE). > > Just drop this apparently useless restriction. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/Kconfig | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 31380da53689..d719ea9c596d 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1516,7 +1516,6 @@ menu "ARMv8.3 architectural features" > config ARM64_PTR_AUTH > bool "Enable support for pointer authentication" > default y > - depends on !KVM || ARM64_VHE > depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC > # GCC 9.1 and later inserts a .note.gnu.property section note for PAC > # which is only understood by binutils starting with version 2.33.1. > @@ -1543,8 +1542,7 @@ config ARM64_PTR_AUTH > > The feature is detected at runtime. If the feature is not present in > hardware it will not be advertised to userspace/KVM guest nor will it > - be enabled. However, KVM guest also require VHE mode and hence > - CONFIG_ARM64_VHE=y option to use this feature. > + be enabled. > > If the feature is present on the boot CPU but not on a late CPU, then > the late CPU will be parked. Also, if the boot CPU does not have ...and we just got the patch to let EL2 use the ptrauth instructions for the save restore in hyp/entry.S! Acked-by: Andrew Scull