From patchwork Wed May 29 10:46:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13678673 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 EC2F2C27C43 for ; Wed, 29 May 2024 10:46:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.731788.1137487 (Exim 4.92) (envelope-from ) id 1sCGp4-00010h-E8; Wed, 29 May 2024 10:46:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 731788.1137487; Wed, 29 May 2024 10:46:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCGp4-00010a-AI; Wed, 29 May 2024 10:46:22 +0000 Received: by outflank-mailman (input) for mailman id 731788; Wed, 29 May 2024 10:46:21 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCGp3-00010Q-5o for xen-devel@lists.xenproject.org; Wed, 29 May 2024 10:46:21 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id af13c275-1da8-11ef-90a1-e314d9c70b13; Wed, 29 May 2024 12:46:20 +0200 (CEST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-57a033c2ec2so709417a12.2 for ; Wed, 29 May 2024 03:46:20 -0700 (PDT) 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 4fb4d7f45d1cf-579bfc697c6sm5605444a12.70.2024.05.29.03.46.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 May 2024 03:46:19 -0700 (PDT) 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: af13c275-1da8-11ef-90a1-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1716979580; x=1717584380; 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=OrABS7SjAcs27w1VQMkqKccqeT9vVGVOfZ3FokQbsNI=; b=b3BBoHnSFDmD6T57/18dC8whkkFnLgxRtgAlMwk3NUj8ic+KNN/LacptkGaRNlFgN0 H5JmQpLsM9OCORCJhRAPM5JkopUT+OqL9xnrUmbrSc12T3YshteY4m0aIcXT8eCmJs6I Xsu1bAwsDK++TVEIX9wKu6v8Zks1gLDip+bJjlP5LWhF/F/XdrcQIrJfRqQBPZQTwUlx 5K8Fki6X/aG45qNlXdaQBgbzcPLgAmcIs6x6vZRovw1UM73qPW8RQC8gGxHCnbgHbJ+1 wOP2jHiMgqStyfLyLryK2yISGLz38IGIwKEb7A1Z+yHjx9pkSGeWehNrMb2jHqzd6vvU 6eUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716979580; x=1717584380; 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=OrABS7SjAcs27w1VQMkqKccqeT9vVGVOfZ3FokQbsNI=; b=cNJe4OcUfO/gcDgcjLuN0BCb9H8t2zRK8hJpiHBUpbwEIxoZ4FdY/a/83thtlh2mxZ pjIAJg2Zg6eT6nxK/zC8QCot6gRO0OaslGd51jw24PmwsnIcsSZ4YofpHh7wQuhXEzTG QwopfeCvgVT8jf73zvJ593ex70YuU53Vp1KUewa0wDxkvy0iGO9eLdEDukipqpd2AmwL u6baNwySpw8qZywb0WUBYNMmIjjBVYpUws9FCyjJmoP60oiMzo7+0TJRsBrMXuF70Su8 Zz1akX0JGuU5z98KO57xQfIbt715eqqAmhhxElU6932ztqofo98kVYUclUsip+OE5au4 GPfg== X-Gm-Message-State: AOJu0Yz2YbjMt4AMJr1cnZ9QZrxM1F1yPwB/+XA7OdZ4w5ItpbblnyhD eKmnhs82Y1jx2Q0K7ZuPox7QVNJs0HdwdTqZVbDGdC9n+VXzzZ5rvLEUyb16DDw4fGpUbiHbVlc = X-Google-Smtp-Source: AGHT+IEmHKE6bnkaXLkG2f7doWQitoSbKyfK4Ff031bt/HTsQgez4z0TLxTgfC7BQFCcXfvXo7vlnw== X-Received: by 2002:a50:cc9b:0:b0:572:d1e1:b4bf with SMTP id 4fb4d7f45d1cf-57851970370mr9171889a12.9.1716979579664; Wed, 29 May 2024 03:46:19 -0700 (PDT) Message-ID: <740c940c-f651-4d7d-954f-78b7d9a31a90@suse.com> Date: Wed, 29 May 2024 12:46:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= From: Jan Beulich Subject: [PATCH] x86/MCE: don't treat S3 resume the same as boot Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9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s7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL Checks for running on CPU0 are bogus; they identify S3 resume the same as being the BSP while booting. Replace with the same check we use elsewhere to properly limit things to just the BSP. Link: https://gitlab.com/xen-project/xen/-/jobs/6966698361 Fixes: 19b6e9f9149f ("x86/MCE: optional build of AMD/Intel MCE code") Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -767,7 +767,7 @@ static void intel_init_mca(struct cpuinf lmce = intel_enable_lmce(); #define CAP(enabled, name) ((enabled) ? ", " name : "") - if ( smp_processor_id() == 0 ) + if ( c == &boot_cpu_data ) { dprintk(XENLOG_INFO, "MCA Capability: firstbank %d, extended MCE MSR %d%s%s%s%s\n",