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 EC2E0EB64DC for ; Sat, 1 Jul 2023 17:43:22 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ftrjgQrDu03wn4lQEZ9Ixr4aw9KWwARsSWH6borrB5o=; b=oKvcNDLN+4xP++ 44VDyWUBdjXRlbCrW3HsxrMAmQG9yG9cbXXV/aaXq0OGX7ESULapNs7ewxhMX0UcMz+C3JusneDSo FU/TXKgOy3dN+VFifGukDg0W2QGzll3aP5G/cAvKF/BjdB7Fq+FC/zIeb7CH1FEHkJGFoSZZFQjZ5 CTGagTxZwdxPW7HPfjKRqA3GlhmLzLLakR2950iD+JwD5zuMrXeLwhcEKCuECa/qnzJ9HRcfnV4GB mK3lwwEFGreTuTzHM/gnwYkSkIpSsspZkV8x7hgZpmokIQeMnZeQujed7hcCk6ysqizginmyYI5Lk FBhUUJEA9XWAc5tK18XA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qFecP-006P15-1t; Sat, 01 Jul 2023 17:42:45 +0000 Received: from out-18.mta0.migadu.com ([91.218.175.18]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qFecM-006P0L-2V for linux-arm-kernel@lists.infradead.org; Sat, 01 Jul 2023 17:42:44 +0000 Date: Sat, 1 Jul 2023 10:42:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1688233353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tnh9qdBnPUJuyMP1cG7zLaM8l1NgjvNEN4PkBGU4vkU=; b=tdnWnAZcA7JaHuDZjJECWw7KaOiLwNknOOwUd0rW7qDnCpfJLQm7G9i6My3oi+x8p5zPUq 9aS1FqKNHFDZETcvrHeQ0BvwfUHFIAnGqsJGozHYTR+92Z6BmeEH7ycv3NWgNrn5xHAiiJ V5xSO2UCoDIumuHaArArEfScg+zmgmE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Kristina Martsenko Cc: Marc Zyngier , 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 Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230701_104242_986546_E3F5C72A X-CRM114-Status: GOOD ( 12.48 ) 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 Hi Kristina, Thanks for the bug report. On Sat, Jul 01, 2023 at 01:50:52PM +0100, Kristina Martsenko wrote: > Hi, > > When I try to online a CPU on arm64 while a KVM guest is running, I hit a > BUG_ON(preemptible()) (as well as a WARN_ON). See below for the full log. > > This is on kvmarm/next, but seems to have been broken since 6.3. Bisecting it > points at commit: > > 0bf50497f03b ("KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock") Makes sense. We were using a spinlock before, which implictly disables preemption. 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... -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel