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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 44917C83F1A for ; Mon, 21 Jul 2025 15:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5QwU0NGWMyeilcmDXePBgzPmpc6ax9AtTlEZ92oaUVU=; b=eGUeWbFXRZZdWmrz8uD1xB4aFL fe3IEpBWJYzkZeRGQfJNwd5Cteo5qB1Nv+Vr83x7nbk0LwsE24zSDrSjknUQSooSggY3iEZ3Y42rZ KGoAcVkKVcSMj8YHpuqoJleOyzFvqBRKcef5wgu96921Az+mppCoFtaOyFCKiVCG+cpwwLBgjC5JY AM0V6tYTm1MocJzMqZB8zFVLXfW79q+x5U4XE4HuW7ctO/3EucCt4ymBaqDG+E+ha3AIHyab7nfwu mXwzTOiYJpvvrm/vBwTERnd1poQwIUlUxmc1KeX9AWlp8Lw5e+rzg3d644gru+aRSPmp/Gg8XJtnM t+ujjjfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1udsW7-000000005Q5-0lQB; Mon, 21 Jul 2025 15:33:27 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1udqe1-0000000HOth-06eF for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2025 13:33:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id AE74F452B0; Mon, 21 Jul 2025 13:33:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82283C4CEED; Mon, 21 Jul 2025 13:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753104808; bh=xqTXA9MKZdUrT8GbMGDNoSR1qCHbkSRrB2BdWos/uaw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aechEvHiZ9bmBFJLAHXPkKIgMqAhJ/+ST+KXWiY7sMskalQGQRb0BNmaLRwzl6re3 a4b2ot2kCWHlwJ8Pojj2a1tObrkyfwhwuCTwXL5cH0KanOF9ogwsSUbHTUDXG31Sf6 IyAWxltULsFH+pX9wHmOmOQH9amLDhc+J032kDg8+lxeJkEdrr1ezhTDqmNpo06Cf1 hiAk/rPQb8kv2EKlXl3qn5XAbuxZE/vjIW8RfcirmOIXoPGnU00j9F8257a0UThRsU cQ7eigJl3Yx4PSViCI012Uh9a4bPITQrJVac/IV0xGQ2t6HcnuioTIi2G4rsOKS55L Marj8sBpXUjbQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1udqdy-0001hv-81; Mon, 21 Jul 2025 14:33:26 +0100 Date: Mon, 21 Jul 2025 14:33:24 +0100 Message-ID: <86ldoh8y8r.wl-maz@kernel.org> From: Marc Zyngier To: Cornelia Huck Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Joey Gouly , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Will Deacon , Catalin Marinas Subject: Re: [PATCH 6/7] KVM: arm64: Expose FEAT_RASv1p1 in a canonical manner In-Reply-To: <87pldt6630.fsf@redhat.com> References: <20250721101955.535159-1-maz@kernel.org> <20250721101955.535159-7-maz@kernel.org> <87seip67xz.fsf@redhat.com> <86o6td8zzq.wl-maz@kernel.org> <87pldt6630.fsf@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: cohuck@redhat.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, will@kernel.org, catalin.marinas@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250721_063329_101371_8D8A948D X-CRM114-Status: GOOD ( 22.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 21 Jul 2025 14:12:19 +0100, Cornelia Huck wrote: > > On Mon, Jul 21 2025, Marc Zyngier wrote: > > > On Mon, 21 Jul 2025 13:32:08 +0100, > > Cornelia Huck wrote: > >> > >> On Mon, Jul 21 2025, Marc Zyngier wrote: > >> > >> > If we have RASv1p1 on the host, advertise it to the guest in the > >> > "canonical way", by setting ID_AA64PFR0_EL1 to V1P1, rather than > >> > the convoluted RAS+RAS_frac method. > >> > >> Don't the two methods have slightly different semantics with RAS == V1P1 > >> possibly implying FEAT_DoubleFault, and RAS+RAS_frac not? > > > > Ah, that's an interesting point -- I definitely had glanced over that. > > > > But I'm not sure a guest can actually distinguish between these two > > configurations, given that FEAT_DoubleFault is essentially an EL3 > > feature (as indicated in the RAS == V1P1 section, and further > > confirmed in R_GRJVN), making it invisible to the guest. > > > > FEAT_DoubleFault2 is, on the contrary, totally visible from the guest, > > and independent of EL3. > > > > Does this make sense to you? > > It does; but it might make sense to add a comment explaining that. Sure thing. I'll add a sentence or three on the subject. > Userspace should hopefully be able to just map everything to RAS == V1P1 > and be done with it. Indeed, that's the intention. RAS_frac is zeroed and made non-writable. This is also consistent with RASv2, for which RAS_frac is not relevant (not that there is a plan to support RASv2 in the foreseeable future!). Thanks, M. -- Without deviation from the norm, progress is not possible.