From patchwork Tue May 14 08:26:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergiy Kibrik X-Patchwork-Id: 13663858 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 635A5C04FFE for ; Tue, 14 May 2024 08:26:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.721244.1124511 (Exim 4.92) (envelope-from ) id 1s6nUh-0001HF-6k; Tue, 14 May 2024 08:26:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 721244.1124511; Tue, 14 May 2024 08:26:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s6nUh-0001H8-45; Tue, 14 May 2024 08:26:43 +0000 Received: by outflank-mailman (input) for mailman id 721244; Tue, 14 May 2024 08:26: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 1s6nUg-0001Fw-IG for xen-devel@lists.xenproject.org; Tue, 14 May 2024 08:26:42 +0000 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id aed7ce1c-11cb-11ef-b4bb-af5377834399; Tue, 14 May 2024 10:26:39 +0200 (CEST) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 9A8773A519; Tue, 14 May 2024 04:26:39 -0400 (EDT) (envelope-from sakib@darkstar.site) Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 925253A518; Tue, 14 May 2024 04:26:39 -0400 (EDT) (envelope-from sakib@darkstar.site) Received: from localhost (unknown [185.130.54.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id AC8CB3A517; Tue, 14 May 2024 04:26:38 -0400 (EDT) (envelope-from sakib@darkstar.site) 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: aed7ce1c-11cb-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=GoMafCLne/uUKmiYB7IOb56hQ 84XAcKbV1FNoVwd924=; b=kWgqULECWj7S5aPYR9geqJ712VegbpJ30HHUx9wt0 CudWqLcV13ohBJ8nf8myrELsuzJDcLaLwMd8kN53D7FIThuh/BWW+tP7UWs0SjaA P2EoIsSnWQvlh3FNtmCk0feTjhVEhgMYPvPrAg7/6f1n/kctj7+O3c8HhxA9GYuw UU= From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Jan Beulich , Stefano Stabellini Subject: [XEN PATCH v3 5/6] x86/MCE: add default switch case in init_nonfatal_mce_checker() Date: Tue, 14 May 2024 11:26:36 +0300 Message-Id: <01aad263ad60f37ed74138b5abf2733361bb7d25.1715673586.git.Sergiy_Kibrik@epam.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Pobox-Relay-ID: AF33E1E0-11CB-11EF-B499-78DCEB2EC81B-90055647!pb-smtp1.pobox.com The default switch case block is likely wanted here, to handle situation e.g. of unexpected c->x86_vendor value -- then no mcheck init is done, but misleading message still gets logged anyway. Signed-off-by: Sergiy Kibrik CC: Jan Beulich --- xen/arch/x86/cpu/mcheck/non-fatal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/cpu/mcheck/non-fatal.c b/xen/arch/x86/cpu/mcheck/non-fatal.c index 33cacd15c2..c5d8e3aea9 100644 --- a/xen/arch/x86/cpu/mcheck/non-fatal.c +++ b/xen/arch/x86/cpu/mcheck/non-fatal.c @@ -29,9 +29,13 @@ static int __init cf_check init_nonfatal_mce_checker(void) /* Assume we are on K8 or newer AMD or Hygon CPU here */ amd_nonfatal_mcheck_init(c); break; + case X86_VENDOR_INTEL: intel_nonfatal_mcheck_init(c); break; + + default: + return -ENODEV; } printk(KERN_INFO "mcheck_poll: Machine check polling timer started.\n"); return 0;