Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp986708pxk; Fri, 25 Sep 2020 03:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzifRhu/eusVwgcg8XvWVsirCN05Wc49Lm+X/XTKkc72gb4JUHDCvABQWaVJAqgc6QzLDFu X-Received: by 2002:a17:906:ae8f:: with SMTP id md15mr1854860ejb.131.1601028922534; Fri, 25 Sep 2020 03:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601028922; cv=none; d=google.com; s=arc-20160816; b=KHsRPqjcXxeXuT/EJ5C5uJSIwpKBbRuz/bah3bxn2oGI6npSZw7TK+CwLrdTYzzmp7 uFA1x+xVk1yerdO9aoBIsKU3cwk1ho2l4g3zTidjTt655TlGYrRGuLdM4aXMqItps0HJ NxzRpQqtsNNWznMUab1z6P6e4/QtPol1ZGCA33s0Ev7R9mr9tH7xtyGMX9iCWrEQY5Hs f7idF+xmtMzge6IPv2Whd+q52LkSOKwD7EtuK458xie0jQcYFLDBkey/3kekEkkO8voK q5qTcCmTxGDDrAczSixLkEIWmAQNNOgOHuxAx4h0ddJa0aQDi+nuVJDYaaEx3zPh3YlM OcpQ== 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=NG0OrJgM5uOXfafgj6N9/hIxz/Mxn1NzqyKKMmujJRs=; b=ziV9GdwpZFoDM93q9gSd2iUCQ8H049sF7uIU+nLHIpTFC0GEPnjrltTlJXfv1lLCII /KcUg9V0FbqaOXjJCrWroJCdLIyu5Xi+3L52S5zKpq19KIqciokub30z0CkZjmqk3OYg cYWXZ19ManSa5s/4dH6VKJTeFHnDmS7dWh5E+d+6bcAIHXGC8sLOMqiCV/jY4IAf8vG3 ve/6RZDVnRtDqw9M12LaKonVw5BxyNEYLMISoxggF+AjYz18nZYpjCZMdOSBFt0uICfI j2Yivhn5csxSI4ScOL+V3lndsXCVgmJhuNIJwQa+tFRIRi+Aigf5m6nSLgcZlEawjEMW XYrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=k6k9NIWY; 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 f14si1584206ejd.289.2020.09.25.03.14.59; Fri, 25 Sep 2020 03:15:22 -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=k6k9NIWY; 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 S1728043AbgIYKLx (ORCPT + 99 others); Fri, 25 Sep 2020 06:11:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:54670 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbgIYKLx (ORCPT ); Fri, 25 Sep 2020 06:11:53 -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=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= 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) 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: 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 --- 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(void) xen_smp_init(); +#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 + #ifdef CONFIG_ACPI_NUMA /* * The pages we from Xen are not related to machine pages, so -- 2.26.2