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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2458BEB64DD for ; Wed, 5 Jul 2023 09:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbjGEJgQ (ORCPT ); Wed, 5 Jul 2023 05:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbjGEJgN (ORCPT ); Wed, 5 Jul 2023 05:36:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F29171D for ; Wed, 5 Jul 2023 02:36:12 -0700 (PDT) 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) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AF6F161416 for ; Wed, 5 Jul 2023 09:36:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ABEEC433C7; Wed, 5 Jul 2023 09:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688549771; bh=HW4PYL1xwTFLEDocxjO9TnNFeMcHk5uV7dwotEeV4pc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B9PxiDSosa671CR9CbQn8jZZ3/it0Cq2lcAobcgSvD9Zzhndh+eaNzHXMcsnuQnHY Duk4+8mmRLv5Zavh1hFwlZDd2o1uy53eCcyDjQVl2xfwhKbLfOZYtZp4OBbJbILWti tpfwU5lPfO3TFl10MTZ0aer2orUKTELi4CuCyMboGGQU9woPcynvWbHDSE84Ei+9sy YYrlMrwNBaKawf8Ze9CtJSVf+4CZ8v6TcdDI/xjOfMV1VkkxrN92tTXa1X49+NVF5y LWDi2ENeDx8iS0NjHjrsQo7lQvx07ifcm65aI4NFB51O/ChZx31STtZPRUjmv3UHC3 U71bKZfVquoQQ== 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 1qGyvg-00AdFi-PS; Wed, 05 Jul 2023 10:36:08 +0100 Date: Wed, 05 Jul 2023 10:36:08 +0100 Message-ID: <86o7kqwvhz.wl-maz@kernel.org> From: Marc Zyngier To: Kristina Martsenko Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , isaku.yamahata@intel.com, seanjc@google.com, pbonzini@redhat.com, stable@vger.kernek.org Subject: Re: [PATCH] KVM: arm64: Disable preemption in kvm_arch_hardware_enable() In-Reply-To: <4c92ceb6-34a2-3128-9b26-dd58e4d7612a@arm.com> References: <20230703163548.1498943-1-maz@kernel.org> <4c92ceb6-34a2-3128-9b26-dd58e4d7612a@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/28.2 (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: kristina.martsenko@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, isaku.yamahata@intel.com, seanjc@google.com, pbonzini@redhat.com, stable@vger.kernek.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, 04 Jul 2023 19:32:09 +0100, Kristina Martsenko wrote: > > On 03/07/2023 17:35, Marc Zyngier wrote: > > Since 0bf50497f03b ("KVM: Drop kvm_count_lock and instead protect > > kvm_usage_count with kvm_lock"), hotplugging back a CPU whilst > > a guest is running results in a number of ugly splats as most > > of this code expects to run with preemption disabled, which isn't > > the case anymore. > > > > While the context is preemptable, it isn't migratable, which should > > be enough. But we have plenty of preemptible() checks all over > > the place, and our per-CPU accessors also disable preemption. > > > > Since this affects released versions, let's do the easy fix first, > > disabling preemption in kvm_arch_hardware_enable(). We can always > > revisit this with a more invasive fix in the future. > > > > Fixes: 0bf50497f03b ("KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock") > > Reported-by: Kristina Martsenko > > Tested-by: Kristina Martsenko > > Signed-off-by: Marc Zyngier > > Link: https://lore.kernel.org/r/aeab7562-2d39-e78e-93b1-4711f8cc3fa5@arm.com > > Cc: stable@vger.kernek.org # v6.3, v6.4 > > Typo here, didn't make it to the stable list (kernek.org -> kernel.org) Yeah, I had a bad day (I also typoed Catalin's address in a separate email...). M. -- Without deviation from the norm, progress is not possible.