linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] x86/xen: disable Firmware First mode for correctable memory errors
@ 2020-09-25 14:07 Juergen Gross
  2020-09-30 14:14 ` boris.ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2020-09-25 14:07 UTC (permalink / raw)
  To: xen-devel, x86, linux-kernel
  Cc: Juergen Gross, Boris Ostrovsky, Stefano Stabellini,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	stable

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 <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] x86/xen: disable Firmware First mode for correctable memory errors
  2020-09-25 14:07 [PATCH v2] x86/xen: disable Firmware First mode for correctable memory errors Juergen Gross
@ 2020-09-30 14:14 ` boris.ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: boris.ostrovsky @ 2020-09-30 14:14 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, x86, linux-kernel
  Cc: Stefano Stabellini, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H. Peter Anvin, stable


On 9/25/20 10:07 AM, Juergen Gross wrote:
> 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 <jgross@suse.com>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>


Applied to for-linus-5.10



-boris


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-30 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 14:07 [PATCH v2] x86/xen: disable Firmware First mode for correctable memory errors Juergen Gross
2020-09-30 14:14 ` boris.ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).