From patchwork Wed Jan 24 15:21:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13529318 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 8C84BC47DDC for ; Wed, 24 Jan 2024 15:21:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.671086.1044229 (Exim 4.92) (envelope-from ) id 1rSf4F-00060N-Lo; Wed, 24 Jan 2024 15:21:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 671086.1044229; Wed, 24 Jan 2024 15:21:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rSf4F-00060G-J4; Wed, 24 Jan 2024 15:21:31 +0000 Received: by outflank-mailman (input) for mailman id 671086; Wed, 24 Jan 2024 15:21:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rSf4E-0005y3-R1 for xen-devel@lists.xenproject.org; Wed, 24 Jan 2024 15:21:30 +0000 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [2a00:1450:4864:20::630]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3eb6add8-bacc-11ee-9b0f-b553b5be7939; Wed, 24 Jan 2024 16:21:28 +0100 (CET) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a2e0be86878so1248754366b.1 for ; Wed, 24 Jan 2024 07:21:28 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id g14-20020a056638060e00b0046e80c50d73sm4012598jar.22.2024.01.24.07.21.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jan 2024 07:21:27 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3eb6add8-bacc-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1706109688; x=1706714488; darn=lists.xenproject.org; h=content-transfer-encoding:autocrypt:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=NHbry3mGxalDD+ohiGv55543evF0oBb72dJrX/9cbxU=; b=g0eQMNi3nwJak5DAYfp3KYdYGMj/TDMcShmuUo6tVFcp5+x+6flM41sYK6QX1Zr0V1 vszjOQXt7YxOHh6uD7TKZ2LGeIJZRzx8hdzslB+NQ8TyXO1fcIQfjtaaxxaGbmYN3wOW mmHEiqOJNvWVBMHU4/nmjrc/bO/Px99Je8wugYyRgV6NhNQbVI/xKeX7ZNoL8d7sOwOx /S5Wnl+BS0is995wZ9TNv2S90K0cCl1D2NyGJa773SJM82vwjnKeYxL5j7PLhQZvM4Yw 2G07mZhFEvUzPJ0ns0GV/PI6QivjLaxrm4zf77zsCtKTcWcQUVFJrQJpxiJYDAeI/xnH laSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706109688; x=1706714488; h=content-transfer-encoding:autocrypt:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NHbry3mGxalDD+ohiGv55543evF0oBb72dJrX/9cbxU=; b=RCfAECMgoyYD5XhH/1sdNA28oO9uvfGtdmmLEm3bOzUct1RfZFW6NgjjDjPEkxxzIu kKMM7mybEzDP4gWJqewW4k+sv13aws7kxqTIWANe2WJoV4efq7VYrJ/2cBqoSRvHeY2n qWpQVeIz9WdG5XgCdnKnXGkBqPrNwswoF7uK/3GYF8oix/c0/ahYNTz2jLAkP3O3gnmq gg5oYhgLmoWzRknqbBM0peWkKIGh88m0hTpbT8xBR+eCUfHaNaffGAdJn1nSb931ktIU 2KYhxDQUykB3bZe9dBJgiXNH6PP0ZptnlzCpKiavTAJykZ0b6YKLSdvglgTaSX04QWww PhOg== X-Gm-Message-State: AOJu0YzMRd47w9sAjgzrUQEJXvhLXWjnnDrbl63e46xBT7LDgXdWS59z kumecMocX/6e1IwZdmrlx0K+F4mE3zdJ9tnw5BY3OFMzk4A+xaRcUOU5dvrKxxh2fyAOirIvN6o = X-Google-Smtp-Source: AGHT+IGFAWesxPFXDEhnQFwicGj5Lqr8yL+IrGWtPHfdfw/eLrxDtZeWMLnBeixehsMhO4ra2PppNA== X-Received: by 2002:a17:906:51a:b0:a26:f7ea:7cb6 with SMTP id j26-20020a170906051a00b00a26f7ea7cb6mr1539539eja.16.1706109687954; Wed, 24 Jan 2024 07:21:27 -0800 (PST) Message-ID: <87108f1d-4b13-4c1e-9432-4f14d4f5c12d@suse.com> Date: Wed, 24 Jan 2024 16:21:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= From: Jan Beulich Subject: [PATCH] x86/NMI: refine "watchdog stuck" log message Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj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L9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL Observing "Testing NMI watchdog on all CPUs: 0 stuck" it felt like it's not quite right, but I still read it as "no CPU stuck; all good", when really the system suffered from what 6bdb965178bb ("x86/intel: ensure Global Performance Counter Control is setup correctly") works around. Convert this to "Testing NMI watchdog on all CPUs: {0} stuck" or, with multiple CPUs having an issue, e.g. "Testing NMI watchdog on all CPUs: {0,40} stuck" to make more obvious that a lone number is not a count of CPUs. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Acked-by: Andrew Cooper , but if you felt --- In principle "sep" could also fulfill the job of "ok"; it felt to me as if this may not be liked very much, though. --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -167,13 +167,14 @@ static void __init cf_check wait_for_nmi void __init check_nmi_watchdog(void) { static unsigned int __initdata prev_nmi_count[NR_CPUS]; - int cpu; + unsigned int cpu; + char sep = '{'; bool ok = true; if ( nmi_watchdog == NMI_NONE ) return; - printk("Testing NMI watchdog on all CPUs:"); + printk("Testing NMI watchdog on all CPUs: "); for_each_online_cpu ( cpu ) prev_nmi_count[cpu] = per_cpu(nmi_count, cpu); @@ -189,12 +190,13 @@ void __init check_nmi_watchdog(void) { if ( per_cpu(nmi_count, cpu) - prev_nmi_count[cpu] < 2 ) { - printk(" %d", cpu); + printk("%c%u", sep, cpu); + sep = ','; ok = false; } } - printk(" %s\n", ok ? "ok" : "stuck"); + printk("%s\n", ok ? "ok" : "} stuck"); /* * Now that we know it works we can reduce NMI frequency to