From nobody Sat Nov 30 16:47:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1601028739; cv=none; d=zohomail.com; s=zohoarc; b=FpzuPLNS1lR6IlWboWrVnBkmqGRGpg3TjJSXyxgXggkB/4Bfdk6mGMLJ6ipWAfZUGn6+PUk0lPS7SsNgvA4LlFERwpJLFDUYb1u/1PnSMC0ChTJDkhZmsDCjkmCXnXSTYWNSMVkHCaaoh92cP5R+K6YKWMIoaBYLE8ZUniFjjlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601028739; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NG0OrJgM5uOXfafgj6N9/hIxz/Mxn1NzqyKKMmujJRs=; b=UhJmjiw1wERJs+xXK+ALwUS/FTylldZkwTsjOu8xSrljcw0MqZVbGprOkrOwXjj+EWI5UmAxhxaeBEXRHBxFBMu2hvbp2fjtJeiezP6q79WFJcHUhT6MCIevQxH1XIGAZIGRgWZb8T0lV7sj0kMlLZVq7piePT7xoNuk9g55D34= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1601028739826284.7319299978451; Fri, 25 Sep 2020 03:12:19 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLkhm-0002xu-JN; Fri, 25 Sep 2020 10:11:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLkhl-0002xp-QS for xen-devel@lists.xenproject.org; Fri, 25 Sep 2020 10:11:53 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 56cf123d-6c3e-431c-8234-6cdd97da9110; Fri, 25 Sep 2020 10:11:52 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C0B23ACBA; Fri, 25 Sep 2020 10:11:51 +0000 (UTC) X-Inumbo-ID: 56cf123d-6c3e-431c-8234-6cdd97da9110 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601028711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NG0OrJgM5uOXfafgj6N9/hIxz/Mxn1NzqyKKMmujJRs=; b=k6k9NIWYGUGqjHrkfCWCI0YCOS3zb/9xVYikaeqvqaNL9IdDiu4yiys1lKPv0F8vsItlaG RjsujkDUKUOtYVHkr0ofyuZ2UBrbHPj5JnE8M1eCpKBEll0msGPImE0l251H2GLzahDTgl QcPuY+dskEla5387e8iQgzprAvBnOa8= From: Juergen Gross To: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , stable@vger.kernel.org Subject: [PATCH] x86/xen: disable Firmware First mode for correctable memory errors Date: Fri, 25 Sep 2020 12:11:48 +0200 Message-Id: <20200925101148.21012-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" When running as Xen dom0 the kernel isn't responsible for selecting the error handling mode, this should be handled by the hypervisor. So disable setting FF mode when running as Xen pv guest. Not doing so might result in boot splats like: [ 7.509696] HEST: Enabling Firmware First mode for corrected errors. [ 7.510382] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 2. [ 7.510383] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 3. [ 7.510384] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 4. [ 7.510384] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 5. [ 7.510385] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 6. [ 7.510386] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 7. [ 7.510386] mce: [Firmware Bug]: Ignoring request to disable invalid MCA= bank 8. Reason is that the HEST ACPI table contains the real number of MCA banks, while the hypervisor is emulating only 2 banks for guests. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- arch/x86/xen/enlighten_pv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 22e741e0b10c..065c049d0f3c 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1296,6 +1296,14 @@ asmlinkage __visible void __init xen_start_kernel(vo= id) =20 xen_smp_init(); =20 +#ifdef CONFIG_ACPI + /* + * Disable selecting "Firmware First mode" for correctable memory + * errors, as this is the duty of the hypervisor to decide. + */ + acpi_disable_cmcff =3D 1; +#endif + #ifdef CONFIG_ACPI_NUMA /* * The pages we from Xen are not related to machine pages, so --=20 2.26.2