From abf378e6483195b98a3f32e2c9d017e0eeeb275f Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 21 May 2020 09:19:33 +0100 Subject: [PATCH] xen/trace: Don't dump offline CPUs in debugtrace_dump_worker() The 'T' debugkey reliably wedges on one of my systems, which has a sparse APIC_ID layout due to a non power-of-2 number of cores per socket. The per_cpu(dt_cpu_data, cpu) calcution falls over the deliberately non-canonical poison value. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- xen/common/debugtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c index c21ec99ee0..f3794b9453 100644 --- a/xen/common/debugtrace.c +++ b/xen/common/debugtrace.c @@ -95,7 +95,7 @@ static void debugtrace_dump_worker(void) debugtrace_dump_buffer(dt_data, "global"); - for ( cpu = 0; cpu < nr_cpu_ids; cpu++ ) + for_each_online_cpu ( cpu ) { char buf[16]; -- 2.30.2