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 8F502E77180 for ; Mon, 16 Dec 2024 09:55:04 +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=1RT/J4QxkNp63BhAJeLw2MLO4OgnQFHPXSJu7fjPMzI=; b=GnobapF5xGgl2hDtkGbPsOFW4f 0BdeLO35VuVe/yTPI1gR7Es9+D35YxgA38rjtkmlEQQPg0ue9T2af3Bee1QNbn1z0g5/EX7UuqqU4 kGlTo3VCQ9dHdEK0tSsSwSAQDlJbFzKEAN0ETbQOv/NbUMmFuB4YjMVSanL/rHMms2mTF+ejoHudk DNgdHOdkGi5OzYv/8PH3lASUFS8iApoQVbSz0gskSckPsX9GB+pTNlSE1ROK2/8HCk3vHdxlHQ7Xq iPdkGI+NX2oRn+jwETqWPsk6tRW8af9J8FQ2PJFWVWt5OMqsz9Bj+JOUOA1THjrsigGMnvchRQPPH +tKyVmZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tN7oO-00000009b49-1j2q; Mon, 16 Dec 2024 09:54:48 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tN6pk-00000009SJY-2sjq for linux-arm-kernel@lists.infradead.org; Mon, 16 Dec 2024 08:52:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 24050A40D7B; Mon, 16 Dec 2024 08:50:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C61DC4CED3; Mon, 16 Dec 2024 08:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734339127; bh=gs8goDXstShtLE5/00djVnwCrZT3j32AWHB5T4dafHw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sJvDvFsa933M12L8z+R4lazlDeiMs4UtDXOn0WqNRRBAbC+8GphlQaAoN7xajLvFt t2/m3hUqTR+Mu/Upg/Wnklr7ARLghcz1q/2TDtMFkloRcBnNkuO1HQdVhYri7NhfJT p6uTExjlBm63voZi8dj0FJy5bdczf/xMOZbQ7/FDRRbl+jjSW19xEKnROes8x/+lI6 4kDiW4WXXLM9gPV7K578dXKQzD1rjx0qbD3i8ZQP5gpVnXi32g1HIlP9zONzuDY2qV vnXiE34zKI+Ugkh437jG3ikY1Il8+rFP2kBZzd9iiz+7EdEYKOCald7Xqarly4lHTl /3ch0HGR/P3uQ== 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 1tN6ph-0046M6-Ar; Mon, 16 Dec 2024 08:52:05 +0000 Date: Mon, 16 Dec 2024 08:52:04 +0000 Message-ID: <868qsgrowb.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, gshan@redhat.com, james.morse@arm.com, oliver.upton@linux.dev, shameerali.kolothum.thodi@huawei.com, vt@altlinux.org, Suzuki K Poulose , Zenghui Yu , Jing Zhang , Catalin Marinas , Will Deacon Subject: Re: [PATCH 6.6 v1] KVM: arm64: Disable MPAM visibility by default and ignore VMM writes In-Reply-To: <20241212151406.1436382-1-joey.gouly@arm.com> References: <20241212151406.1436382-1-joey.gouly@arm.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/29.4 (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: joey.gouly@arm.com, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, gshan@redhat.com, james.morse@arm.com, oliver.upton@linux.dev, shameerali.kolothum.thodi@huawei.com, vt@altlinux.org, suzuki.poulose@arm.com, yuzenghui@huawei.com, jingzhangos@google.com, catalin.marinas@arm.com, will@kernel.org 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-20241216_005208_854522_FE4EDE6E X-CRM114-Status: GOOD ( 18.61 ) 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 Thu, 12 Dec 2024 15:14:06 +0000, Joey Gouly wrote: > > From: James Morse > > commit 6685f5d572c22e1003e7c0d089afe1c64340ab1f upstream. > > commit 011e5f5bf529f ("arm64/cpufeature: Add remaining feature bits in > ID_AA64PFR0 register") exposed the MPAM field of AA64PFR0_EL1 to guests, > but didn't add trap handling. A previous patch supplied the missing trap > handling. > > Existing VMs that have the MPAM field of ID_AA64PFR0_EL1 set need to > be migratable, but there is little point enabling the MPAM CPU > interface on new VMs until there is something a guest can do with it. > > Clear the MPAM field from the guest's ID_AA64PFR0_EL1 and on hardware > that supports MPAM, politely ignore the VMMs attempts to set this bit. > > Guests exposed to this bug have the sanitised value of the MPAM field, > so only the correct value needs to be ignored. This means the field > can continue to be used to block migration to incompatible hardware > (between MPAM=1 and MPAM=5), and the VMM can't rely on the field > being ignored. > > Signed-off-by: James Morse > Co-developed-by: Joey Gouly > Signed-off-by: Joey Gouly > Reviewed-by: Gavin Shan > Tested-by: Shameer Kolothum > Reviewed-by: Marc Zyngier > Link: https://lore.kernel.org/r/20241030160317.2528209-7-joey.gouly@arm.com > Signed-off-by: Oliver Upton > [ joey: fixed up merge conflict, no ID_FILTERED macro in 6.6 ] > Signed-off-by: Joey Gouly > Cc: stable@vger.kernel.org # 6.6.x > Cc: Vitaly Chikunov > Link: https://lore.kernel.org/linux-arm-kernel/20241202045830.e4yy3nkvxtzaybxk@altlinux.org/ Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.