mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead()
@ 2023-10-27 18:36 David Woodhouse
  2023-10-27 19:14 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2023-10-27 18:36 UTC (permalink / raw)
  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

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

From: David Woodhouse <dwmw@amazon.co.uk>

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 <dwmw@amazon.co.uk>
---
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
-- 
2.41.0



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-20 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27 18:36 [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead() David Woodhouse
2023-10-27 19:14 ` Peter Zijlstra
2023-11-20 12:19   ` David Woodhouse
2023-11-20 12:57     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®