]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/cpuid: Clear XFD for component i if the base feature is missing
authorLike Xu <likexu@tencent.com>
Mon, 17 Jan 2022 07:45:31 +0000 (15:45 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Jan 2022 17:09:25 +0000 (12:09 -0500)
commit05a560297581694110f27646ff33a8e9f8f858c1
tree04048690d06ce1c577d22010672507e59b901abe
parent8c67dfb3ed3b9505473e7476eed7a46cf5f52671
KVM: x86/cpuid: Clear XFD for component i if the base feature is missing

According to Intel extended feature disable (XFD) spec, the sub-function i
(i > 1) of CPUID function 0DH enumerates "details for state component i.
ECX[2] enumerates support for XFD support for this state component."

If KVM does not report F(XFD) feature (e.g. due to CONFIG_X86_64),
then the corresponding XFD support for any state component i
should also be removed. Translate this dependency into KVM terms.

Fixes: 9ea1419daa2b ("kvm: x86: Add CPUID support for Intel AMX")
Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20220117074531.76925-1-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c