Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1135703pxk; Fri, 25 Sep 2020 07:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpP3aa2X2B6V7NZYknslh7VQ6YewjE7p3PDYbPMH4O//3dHJIt1xhGbuiYv7IBQSMlSs2A X-Received: by 2002:a17:906:71cc:: with SMTP id i12mr2849972ejk.507.1601043014977; Fri, 25 Sep 2020 07:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601043014; cv=none; d=google.com; s=arc-20160816; b=ZOPrLB2Q790f79pPCy37X+2poqVbFFGI6eBPsNmGoMtAmDzQ+cYmVELxgPbX5IDNoa mzbnHKHsaDyT5d1byYlJs/WZI+mlXWrAV498ELLAUjYmKpL5gzq+HJBlObiR4eddMbpL uKRoOvazAKQfhZsWbuyAnQCTrk9PU6AO6Tl0KJzOF2C2SgFacwMUYk8Npe1xBrD+Ao1K xtU01i06UMXuyRMDugXq/XaVbdSHpbb1da/cWG2MLMUGIlN/md72uuP2xr86ozx1DmWq uIv6J567DZKcHF+JUQbL7PrdI7XT6c+4NQmtrCRuZSKBXDD+AKjhYQ5cMyOIvyVdGcLX jlFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0bb+VXJKXkSVXRXN2wKoX5N5IGTNG4/vY2hQ3WdHPGU=; b=ErlnHowwQRdfTmGkgl3/2ujgD//nld0uC6vvlmIut63x8G+KWVHrryy3/mUZkW+JGc 9RjmavL94zAdBKSsRSEhGa7PAUS3JROvXz5VIn5OV/jGRu6xiH3EUiAZCue071WqTCXL WnVZiX+VbVN0sTLoW8CHRBhFO4sT1eHC2/+RZxIpJbi+tcbU6iVpdwCsRLwlqdy9Us3i Top90fF6xWMCcvJ7CcyZNi+QT3GbQIoh0Vnr8LYp/JwPwvdv3fHcBN1LJXfqstieqpa9 4tqEvRLLhSrQ3iWu+MMV5yWJQBs+oOiLiuS6zwH262BbMHEd9RXuy/S8KmamoSpfaQaH wXAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=H77nb9nX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si1729405ejk.247.2020.09.25.07.09.51; Fri, 25 Sep 2020 07:10:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=H77nb9nX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728905AbgIYOHz (ORCPT + 99 others); Fri, 25 Sep 2020 10:07:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:57436 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbgIYOHz (ORCPT ); Fri, 25 Sep 2020 10:07:55 -0400 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=1601042873; 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=0bb+VXJKXkSVXRXN2wKoX5N5IGTNG4/vY2hQ3WdHPGU=; b=H77nb9nX7Qdrnb3iOVjCM9C8IVwWrAAIuFH1DoigveWlnZ4h7SeOrwfJZFjEEJhbrxwber y5jPfft4BcbP02YB9F+c/pMRaqdzOF/1JG8x/+DgH64b5tauF2YN22y/kS8iXdRj0gt0V7 O3r4xW2P0fzvI+ftL48ZVrU3d5shVgY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6D7CEAB9F; Fri, 25 Sep 2020 14:07:53 +0000 (UTC) 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 v2] x86/xen: disable Firmware First mode for correctable memory errors Date: Fri, 25 Sep 2020 16:07:51 +0200 Message-Id: <20200925140751.31381-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 22e741e0b10c..351ac1a9a119 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1376,6 +1376,15 @@ asmlinkage __visible void __init xen_start_kernel(void) 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) -- 2.26.2