From patchwork Sat Oct 31 11:35:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 317427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC1EBC4742C for ; Sat, 31 Oct 2020 11:37:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 920EA20731 for ; Sat, 31 Oct 2020 11:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144256; bh=THb8s8SXPIbBfsc8yjTc00K0u3vjv6go/m8TXpARlBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jyf9lPaaSUte/160CrDkmDSB5R50BwUiB0utwATMZdPqjeCzPPL4PI+TDAQMIsWxn X3ci9tyg1PwNWSX0wGiCqzyR7IWxRZRzatMLVVfM7yQ4YkMsRwkzDGoNrE0PPGS7Sp qXcPamJOKFL+msfJ2vgmQatX8+48GCXVvQnOk2hw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727195AbgJaLhH (ORCPT ); Sat, 31 Oct 2020 07:37:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbgJaLhG (ORCPT ); Sat, 31 Oct 2020 07:37:06 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EDC2D20825; Sat, 31 Oct 2020 11:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144225; bh=THb8s8SXPIbBfsc8yjTc00K0u3vjv6go/m8TXpARlBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xz0IrFtVxq0emjqO+05iif3F2wQsxtdcZHgwfFbJ/A9UR/qs44Yp+Jtxj5lEpNpaC 45A9N2gQqYEI42W2mt52VTCnhoM8h9M8V3ztr0XHCjYyc6/f5wBp5XujBpQeoa1zjI 4vffGv/KSPdoBzmn2dT91379T6ZyUpO3gQV0Oy9E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , Boris Ostrovsky Subject: [PATCH 5.4 31/49] x86/xen: disable Firmware First mode for correctable memory errors Date: Sat, 31 Oct 2020 12:35:27 +0100 Message-Id: <20201031113456.942054011@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201031113455.439684970@linuxfoundation.org> References: <20201031113455.439684970@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Juergen Gross commit d759af38572f97321112a0852353613d18126038 upstream. 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 Link: https://lore.kernel.org/r/20200925140751.31381-1-jgross@suse.com Signed-off-by: Boris Ostrovsky Signed-off-by: Greg Kroah-Hartman --- arch/x86/xen/enlighten_pv.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1382,6 +1382,15 @@ asmlinkage __visible void __init xen_sta x86_init.mpparse.get_smp_config = x86_init_uint_noop; xen_boot_params_init_edd(); + +#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 = 1; +#endif } if (!boot_params.screen_info.orig_video_isVGA)