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 2A02EC55164 for ; Thu, 30 Jul 2026 14:32:42 +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=t+KqEaNzWqHCuOVTuY3+paIJQew4PZqcIQjocemxxEY=; b=s+ElN/BUR3hBYUZ6TQjAv29ZTk Mp5ecf27l6j59RHU2Y3xSAJJFKrTTBnrMhHO5wCWGhEQlkiPDgBcbxxxuFFmwKNaUtt2dYRjbwZXq zM/jF4XlIGc8VMu1H+phGMwxJ4R1YYQIBH/VvbeDfvsmNq/XHPjBfR0kpnNqM7zHMv28Al1QX5sJi x7FmraBbcW+ecO0bJWGufWzg9bvFcP9O+4LgV/7XjpkM9nti7cew4T4IlSFZ60tfJ5HwOXsNokhzp 80o23kW5T6B60uDilyWK0h+3odERzi2IevmYCKvukyc5rQCLTjOQ2AHowXKuWcek61jonqrXUL2NY sdDg6kYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wpRoJ-0000000Aku3-1f4a; Thu, 30 Jul 2026 14:32:35 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wpRoH-0000000Aktt-3ZGy for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2026 14:32:33 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 5705340B90; Thu, 30 Jul 2026 14:32:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 371001F000E9; Thu, 30 Jul 2026 14:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785421953; bh=t+KqEaNzWqHCuOVTuY3+paIJQew4PZqcIQjocemxxEY=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=oLd2ar1YcANx/v39ZEOsHMAKeGJB37F1/02y/fKFmJ6XQYsWJdJh9tl/mGC9hGmBG SWrgSy5TXEs4Kgok3N+WgWUcN1eI6dSkX1bWjltlH2r66ZZD/e6aBUr6uNRyQqY/oQ Np0BqiQci2IABAX0leuggEDVcqujNtD1S52Dl3YpcMF2rORw8V34saJNQMBHbg8eDI 5S7wLwE+uoiuXmFFhLltufzbWe7imIaCSITX88M9JEeaVCKjOei+3DOop4FBgvKMsv /PwOMP5isyDWvXb0etseoPc9Pqd7GHCvDbj/4uWJwwvwNkyPM4+GFckF4IujuAkYJO +glDaZ48d75DQ== 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.98.2) (envelope-from ) id 1wpRoE-0000000AZFl-2oEA; Thu, 30 Jul 2026 14:32:30 +0000 Date: Thu, 30 Jul 2026 15:32:30 +0100 Message-ID: <86ecgkczup.wl-maz@kernel.org> From: Marc Zyngier To: "Peng Fan (OSS)" Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Oliver Upton , Fuad Tabba , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Mark Rutland , "Ivan T. Ivanov" , Francesco Dolcini , Frank Li , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, imx@lists.linux.dev, Peng Fan Subject: Re: [PATCH v2] arm64: errata: Add NXP iMX8QM workaround for A53 cache coherency issue In-Reply-To: <20260730-imx8qm-cache-coherency-v2-1-5651aeb1af16@nxp.com> References: <20260730-imx8qm-cache-coherency-v2-1-5651aeb1af16@nxp.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: peng.fan@oss.nxp.com, catalin.marinas@arm.com, will@kernel.org, corbet@lwn.net, oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, iivanov@suse.de, francesco@dolcini.it, frank.li@nxp.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, imx@lists.linux.dev, peng.fan@nxp.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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, 30 Jul 2026 14:53:02 +0100, "Peng Fan (OSS)" wrote: > > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c > index 9a6c72a18672..734ccd7ec056 100644 > --- a/arch/arm64/kvm/arm.c > +++ b/arch/arm64/kvm/arm.c > @@ -3032,6 +3032,11 @@ static __init int kvm_arm_init(void) > > in_hyp_mode = is_kernel_in_hyp_mode(); > > + if (cpus_have_final_cap(ARM64_WORKAROUND_NXP_ERR050104)) { > + kvm_info("KVM not supported on NXP iMX8QM (ERR050104)\n"); > + return -ENODEV; > + } > + > if (cpus_have_final_cap(ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE) || > cpus_have_final_cap(ARM64_WORKAROUND_1508412)) > kvm_info("Guests without required CPU erratum workarounds can deadlock system!\n" \ I really dislike this sort of hacks in the KVM code. Instead, please find a way to set 'kvm_mode' to KVM_MODE_NONE from your erratum handler, and KVM will gracefully disable itself, as if that was passed on the command line. It shouldn't be too hard to do. Thanks, M. -- Without deviation from the norm, progress is not possible.