From patchwork Fri Oct 27 18:36:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 738722 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 671D73D3A0 for ; Fri, 27 Oct 2023 18:37:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="A+K0J8f5" Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FBED7A; Fri, 27 Oct 2023 11:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Type:Date:Cc:To: From:Subject:Message-ID:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=Vsp70uUjmZBYC/PeJqsr4c3tnhKpPArVAhfeb/JBx+4=; b=A+K0J8f5m4iW6/xEVFkF4+DfCi V9cXPdogqZrwnZutMQIItIsvL/d3R8H+2vyvRMei1SZuOHxhpny5bMDtN1T8Q/6ziIvJJ9V5hPSnX 5n6ohNV4mE8zkEC4BcJXuX84C7myQCpEplK0b6FROpc5aNmLN/N/zk8ThUkVZ0+B3dFg9BdUiJsWH KMxzKy+PGNs3LwVX+FyH8X2zlhrtHp5hjPhxzfPGJcMlM7/t9xau91SMFB9C2CxbsOVz8dap2vqw+ KEelc7Xm7oRK6iqapER+yAYGnNtszeXUjlU7brEgjTc5BhF+UoCUqMr6iCTLdrIJwxxk6QobZuJwL RPFoBhUg==; Received: from [2001:8b0:10b:5:8f9a:f53a:1a74:1a12] (helo=u3832b3a9db3152.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qwRhU-004wDA-1R; Fri, 27 Oct 2023 18:36:52 +0000 Message-ID: Subject: [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead() From: David Woodhouse To: linux-acpi , linux-kernel Cc: "Rafael J. Wysocki" , Len Brown , Juergen Gross , xen-devel , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Date: Fri, 27 Oct 2023 19:36:51 +0100 User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html From: David Woodhouse Xen HVM guests were observed taking triple-faults when attempting to online a previously offlined vCPU. Investigation showed that the fault was coming from a failing call to lockdep_assert_irqs_disabled(), in load_current_idt() which was too early in the CPU bringup to actually catch the exception and report the failure cleanly. This was a false positive, caused by acpi_idle_play_dead() setting the per-cpu hardirqs_enabled flag by calling safe_halt(). Switch it to use raw_safe_halt() instead, which doesn't do so. Signed-off-by: David Woodhouse Acked-by: Peter Zijlstra (Intel) --- We might {also,instead} explicitly set the hardirqs_enabled flag to zero when bringing up an AP? drivers/acpi/processor_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 3a34a8c425fe..55437f5e0c3a 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -592,7 +592,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) while (1) { if (cx->entry_method == ACPI_CSTATE_HALT) - safe_halt(); + raw_safe_halt(); else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) { io_idle(cx->address); } else