]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC/Intel: Do not load EDAC driver when running as a guest
authorLuck, Tony <tony.luck@intel.com>
Tue, 15 Jun 2021 17:44:19 +0000 (10:44 -0700)
committerTony Luck <tony.luck@intel.com>
Fri, 18 Jun 2021 01:23:14 +0000 (18:23 -0700)
commit68a21386876a33022a88ddc5de922d65432a372b
tree4dcfcf68d9881200894ea621a81b611c9e7e354e
parentd07344a415b95afe77caf65aa7fa8df570b2d5db
EDAC/Intel: Do not load EDAC driver when running as a guest

There's little to no point in loading an EDAC driver running in a guest:
1) The CPU model reported by CPUID may not represent actual h/w
2) The hypervisor likely does not pass in access to memory controller devices
3) Hypervisors generally do not pass corrected error details to guests

Add a check in each of the Intel EDAC drivers for X86_FEATURE_HYPERVISOR
and simply return -ENODEV in the init routine.

Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20210615174419.GA1087688@agluck-desk2.amr.corp.intel.com
drivers/edac/i10nm_base.c
drivers/edac/pnd2_edac.c
drivers/edac/sb_edac.c
drivers/edac/skx_base.c