From mboxrd@z Thu Jan 1 00:00:00 1970 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 17CCFC02198 for ; Fri, 14 Feb 2025 08:37:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.888592.1297939 (Exim 4.92) (envelope-from ) id 1tirCi-0000Qa-F7; Fri, 14 Feb 2025 08:37:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 888592.1297939; Fri, 14 Feb 2025 08:37:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tirCi-0000QT-Bf; Fri, 14 Feb 2025 08:37:44 +0000 Received: by outflank-mailman (input) for mailman id 888592; Fri, 14 Feb 2025 08:37:42 +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 1tirCg-0000QN-QL for xen-devel@lists.xenproject.org; Fri, 14 Feb 2025 08:37:42 +0000 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [2607:f8b0:4864:20::632]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f303a371-eaae-11ef-9896-31a8f345e629; Fri, 14 Feb 2025 09:37:40 +0100 (CET) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21f78b1fb7dso30769725ad.3 for ; Fri, 14 Feb 2025 00:37:40 -0800 (PST) Received: from localhost ([84.78.159.3]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e422sm2689698b3a.109.2025.02.14.00.37.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 00:37:38 -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: f303a371-eaae-11ef-9896-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1739522259; x=1740127059; darn=lists.xenproject.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=sRN9mUQ80FrjgTSqWQnbmTICKWlodAFApkavZuOf1Xc=; b=u/HYRxanKyUJO+hWoAh/KGbXq851uk263kdhTqNKmLxOMSZHsjF5dmaSJvp1Pxbqfl nXTgqWr+3ZZ1bA+cJCE9bjakD8T/iRZwh6II3fb0EPgeFmbhrOWasM0nZUN7kgkzQ13Q 6CyGjoj0lVeDHU/rQ4W67zfysYnpINUmqfNJM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739522259; x=1740127059; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sRN9mUQ80FrjgTSqWQnbmTICKWlodAFApkavZuOf1Xc=; b=MUFKsbNqpcO78u7buYMNx5jxBOk7cf5K/FG6npFL1zvzPldzCD1Vt5hyj7B0QcVVCJ gE5rFK0jzys/rcds3U13jGDjfjVas3ypkHLByucaQ9QAByrFm4vBwaK7BqyFUNyCQSNx bEB4Cb2nnvmZvfqSELeBW0V4LlWy6GDDljyR0tpyAJZ7zqnTpySIG6CgqQrxhGTOntZi DHUbP8L3A8VxKwrL4G6j72Hykw29KWx6LTh2+LcUVgHbL6fiNHFm9hjg/1ht/yJcn0qr sj4ySbONeAEEx4qILM2iu/LUn5zWOtRPHgRwN5XIuflGHsnca4I4PJzuysWBS2S4ZVwt 8sWw== X-Gm-Message-State: AOJu0YzioxtxZw+AFbL/Rz+seeiGa5+ZmoHPGyknTY8BJ350JLHoduHj V/1kOiI2PUtGnVcBSNmzp0mvbSLOthIbAQ/3nm7fRV1GfOUloM1T3xyQiKpMms4= X-Gm-Gg: ASbGncuTlV8gyUGS++Yd1QiEtsJkGlR28hia34IJffeFt4kwhMC0puZNaym80ZPlUaQ LFtdzXUrlAQ2erhpgRARW/FiaK6+/+C8GxpqtCqo+6z6u0YMxGafltC8AczmW/ktKWYV5HFwI4c zwW6oJ1dYKnp6RsP8IS3izuR0BeQ2JJohkIXXGxu7563a24bawoIc/cEBvoX+Uv4//YU3mAVukV SEIYz+R44dISVm5uwu7dddn2Mi+cjE94IUPu59lChM4rLUMkOnT7r0k+8EcVVrbAlZZgE0e9G80 HaBs7Tfg6Cjwe1tDPFA9 X-Google-Smtp-Source: AGHT+IHnZoOdAqrM2U7t6eqdKlB4X72rLw4jBCVI/LdqahL8roouvarA91paoODcbxR1Fc7llwkRfg== X-Received: by 2002:a05:6a21:112:b0:1ee:7b6c:e2f4 with SMTP id adf61e73a8af0-1ee7b6ce592mr5877475637.26.1739522258805; Fri, 14 Feb 2025 00:37:38 -0800 (PST) Date: Fri, 14 Feb 2025 09:37:33 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jan Beulich Cc: "xen-devel@lists.xenproject.org" , Andrew Cooper , Teddy Astie Subject: Re: [PATCH] x86/MCE: fail init more gracefully when CPU vendor isn't supported Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Feb 13, 2025 at 02:24:53PM +0100, Jan Beulich wrote: > When mcheck_init() doesn't recognize the CPU vendor, it will undo the > all-banks allocation, and it will in particular not install the CPU > notifier. This way APs will pointlessly try to re-establish an > all-banks allocation, while then falling over NULL pointers due to the > notifier hot having run and hence not having allocated anything for ^ not > them. > > Prevent both from happening, and additionally delay writing MCG_CTL > until no errors can occur anymore in mca_cap_init(). > > Fixes: 741367e77d6c ("mce: Clean-up mcheck_init handler") > Fixes: a5e1b534ac6f ("x86: mce cleanup for both Intel and AMD mce logic") > Fixes: 560cf418c845 ("x86/mcheck: allow varying bank counts per CPU") > Reported-by: Teddy Astie > Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné The relation between the notifier setting up the state and the init path seems quite convoluted, but that would require a major refactor of the logic. Thanks, Roger.