All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed
@ 2023-07-18 12:26 Simon Gaiser
  2023-07-18 12:53 ` Roger Pau Monné
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Gaiser @ 2023-07-18 12:26 UTC (permalink / raw)
  To: xen-devel
  Cc: Simon Gaiser, Jan Beulich, Andrew Cooper, Roger Pau Monné,
	Wei Liu, Marek Marczykowski-Górecki

As far as I understand the HPET legacy mode is not required on systems
with ARAT after the timer IRQ test. For previous discussion see [1].
Keeping it enabled prevents reaching S0ix residency.

Link: https://lore.kernel.org/xen-devel/cb408368-077d-edb5-b4ad-f80086db48c1@invisiblethingslab.com/ # [1]
Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
---
 xen/arch/x86/io_apic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 9b8a972cf5..ea98d717d0 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -1966,6 +1966,10 @@ static void __init check_timer(void)
 
             if ( timer_irq_works() )
             {
+                if ( boot_cpu_has(X86_FEATURE_ARAT) ) {
+                    printk(XENLOG_INFO "IRQ test with HPET Legacy Replacement Mode worked. Disabling it again.\n");
+                    hpet_disable_legacy_replacement_mode();
+                }
                 local_irq_restore(flags);
                 return;
             }
-- 
2.40.1



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

end of thread, other threads:[~2023-07-24 10:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 12:26 [XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed Simon Gaiser
2023-07-18 12:53 ` Roger Pau Monné
2023-07-18 21:51   ` Simon Gaiser
2023-07-19 13:32     ` Jan Beulich
2023-07-24  9:48       ` Simon Gaiser
2023-07-24 10:02         ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.