EDAC/mce_amd: Do not load edac_mce_amd module on guests
authorSmita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Mon, 28 Jun 2021 17:27:40 +0000 (12:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:24 +0000 (09:50 +0200)
commit8a6c5eec811c1013001c8dc9874bf647b3c4ec36
treed3c90573ed41a3ebb7eb2e51ad31286aef1b3112
parent4b680b3fc6f319860652532084b35b11d3868008
EDAC/mce_amd: Do not load edac_mce_amd module on guests

[ Upstream commit 767f4b620edadac579c9b8b6660761d4285fa6f9 ]

Hypervisors likely do not expose the SMCA feature to the guest and
loading this module leads to false warnings. This module should not be
loaded in guests to begin with, but people tend to do so, especially
when testing kernels in VMs. And then they complain about those false
warnings.

Do the practical thing and do not load this module when running as a
guest to avoid all that complaining.

 [ bp: Rewrite commit message. ]

Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Tested-by: Kim Phillips <kim.phillips@amd.com>
Link: https://lkml.kernel.org/r/20210628172740.245689-1-Smita.KoralahalliChannabasappa@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/mce_amd.c