Re: [PATCH] EDAC/mce_amd: Reduce unnecessary spew in dmesg if SMCA feature bit is not exposed
From: Borislav Petkov
Date: Tue Jun 15 2021 - 13:26:08 EST
On Tue, Jun 15, 2021 at 12:32:21PM -0400, Yazen Ghannam wrote:
> Yes, I agree. I was a bit confused about the X86_FEATURE_HYPERVISOR
> thing, but I think I get it. This definitely looks simple to do.
Yeah, if you look at the qemu repo:
kvm_arch_get_supported_cpuid:
...
} else if (function == 1 && reg == R_ECX) {
/* We can set the hypervisor flag, even if KVM does not return it on
* GET_SUPPORTED_CPUID
*/
ret |= CPUID_EXT_HYPERVISOR;
so long story short, that thing is set by the HV and there's an
"agreement" of sorts and APM v3 even says so:
"CPUID Fn0000_0001_ECX Feature Identifiers
...
31: RAZ. Reserved for use by hypervisor to indicate guest status."
HTH.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette