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 0FA83EB64DD for ; Mon, 3 Jul 2023 16:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0uvAb5Hsi9Nxh2MktbOhcHOj0kHXF9oS9n9e9LUr0dg=; b=Ci6SZvtPnD5VYB yt2+rcvForh0WTNB8411lYysbFZd+P4zZ+okapJ0xXa0HubV3oPIipNLt0bfrJu8uHZoyeZQzp59O gqBxO+sEwZ/TlfH3UGLoOw1EpLJMkMwWmRUQ4mjrmY91q2SrQsT90Jp4r50mvPFqlayIRMSKeToHX CyhSPDzRjLOG+x/N+ry50QSsYSZx8Raq7648xWsU22UTEDle2R+VII0PjrviO9tEl985vz3lNSrJD mbrVPHkR1Wz/BMuGyUCrS0Jnm7ZJuphUq+a6d7E8+8sVYbxGdMUaZ/VBV74Z/ur8Yq+FLllkHQ9uz zeBHjxvEI9XDyc6FaF0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGMZB-00B1JK-13; Mon, 03 Jul 2023 16:38:21 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGMZ8-00B1ID-03 for linux-arm-kernel@lists.infradead.org; Mon, 03 Jul 2023 16:38:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 582D660FD8; Mon, 3 Jul 2023 16:38:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E235C433C7; Mon, 3 Jul 2023 16:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688402296; bh=yU0XB29qN64qtUjijennPhY7fPZFsNvNq/Cdci8Ufv0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fiKpo29mQ59sNbw2HoiHnU9ZYerPcx7garu//JDm/0Ek75HY/IZqcTAVf0SUgqHlp b7lc9F7QkigT0bVn/OAgTyLSkMNGJhL9fVmIMBRc+o/ZGLTfIVaiBO1CBStXfrOhXh SOp/n3b2/kT/CVA0+/HnICfWtD7OPNhtJWBiWXDLh7WlS9a9qHFKLugC7CfFPuwBX+ tdO+tBaZgaoSx09mdNHLTr1OtCnapSWeZRSTRYkf7V0IgMbwB6IjYcc2ixWNnfQM64 3nSiUUg4nrk3NVRhqKMm/oeIJVKT4UhkmsyZMbp0ZEAZm/KFFK3BN/JbJcDCuVjp2P knuYma56DW/kw== 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 1qGMZ4-00ADIt-DN; Mon, 03 Jul 2023 17:38:14 +0100 Date: Mon, 03 Jul 2023 17:38:14 +0100 Message-ID: <864jmlx85l.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Kristina Martsenko , isaku.yamahata@intel.com, seanjc@google.com, pbonzini@redhat.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse Subject: Re: KVM CPU hotplug notifier triggers BUG_ON on arm64 In-Reply-To: References: <867crhxr9l.wl-maz@kernel.org> 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/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kristina.martsenko@arm.com, isaku.yamahata@intel.com, seanjc@google.com, pbonzini@redhat.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@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-20230703_093818_141143_0F45DA7B X-CRM114-Status: GOOD ( 25.51 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 03 Jul 2023 17:02:30 +0100, Oliver Upton wrote: > > Hey Marc, > > On Mon, Jul 03, 2023 at 10:45:26AM +0100, Marc Zyngier wrote: > > On Sat, 01 Jul 2023 18:42:28 +0100, Oliver Upton wrote: > > > Well, one way to hack around the problem would be to just cram > > > preempt_{disable,enable}() into kvm_arch_hardware_disable(), but that's > > > kinda gross in the context of cpuhp which isn't migratable in the first > > > place. Let me have a look... > > Heh, I should've mentioned I'm on holiday until Thursday. No problem, happy to keep an eye on stuff in the meantime. > > > An alternative would be to replace the preemptible() checks with a one > > that looks at the migration state, but I'm not sure that's much better > > (it certainly looks more costly). > > > > There is also the fact that most of our per-CPU accessors are already > > using preemption disabling, and this code has a bunch of them. So I'm > > not sure there is a lot to be gained from not disabling preemption > > upfront. > > > > Anyway, as I was able to reproduce the issue under NV, I tested the > > hack below. If anything, I expect it to be a reasonable fix for > > 6.3/6.4, and until we come up with a better approach. > > Yeah, I'm fine with a hack like this. Do you want to send this out as a > patch? Now sent as 20230703163548.1498943-1-maz@kernel.org. Enjoy your time off! M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel