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 D7C9BEB64DD for ; Thu, 6 Jul 2023 02:35:11 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1a98KF30/4SWguNDZLUbG4A1xaoF0jy99u/EaJY4KRk=; b=qrxqJy5xlQSFlW rlaqtjFfYPw4qzf9WlJf1V1QT56PflFoJztIHcBuGOcegb3C2ilwLUb0TGpu1QynxUB8UnOmShHnA dMe2O9BJmmLhpV3goqNs4TpFneA5t92HXXeYNswv5JzEbpgr8JioKO/r0BRKYnulGbCM7MvqLDv62 EHDOFBxuFJOjtMTlUlReXWDSBDxJPstHCNGxJsqZFYi8uSWw727TDkFh9IVaU5wwg+mix6uzvtW+N q5akEv92Lwcd2hJ2mWLx7VTl6dRTg6+sVFtSpSPZwYyevOpryGi8gjK0XRa6ykQ0mZ0axhbPEi17n 6A00lDEPsN4mUqYR2XgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHEpQ-0008dQ-0H; Thu, 06 Jul 2023 02:34:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHEpL-0008bG-2E for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 02:34:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DD40315BF; Tue, 4 Jul 2023 11:33:00 -0700 (PDT) Received: from [10.1.37.129] (e126864.cambridge.arm.com [10.1.37.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DA2543F663; Tue, 4 Jul 2023 11:32:15 -0700 (PDT) Message-ID: <4c92ceb6-34a2-3128-9b26-dd58e4d7612a@arm.com> Date: Tue, 4 Jul 2023 19:32:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] KVM: arm64: Disable preemption in kvm_arch_hardware_enable() Content-Language: en-US To: Marc Zyngier , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , isaku.yamahata@intel.com, seanjc@google.com, pbonzini@redhat.com, stable@vger.kernek.org References: <20230703163548.1498943-1-maz@kernel.org> From: Kristina Martsenko In-Reply-To: <20230703163548.1498943-1-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_193439_793224_9D14F272 X-CRM114-Status: GOOD ( 12.15 ) 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 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) Kristina _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel