]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/cpuid: Move leaf 7 to correct group
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 25 Jan 2024 02:40:16 +0000 (21:40 -0500)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 20 Feb 2024 15:43:00 +0000 (18:43 +0300)
commit3c819d9717956c416b31aed56105190263da6a2d
treecb9b8967bac6e568b78858d2f28c5853e5d18945
parent46f701c44d82e467c2932480811d7f2dc818dee6
i386/cpuid: Move leaf 7 to correct group

CPUID leaf 7 was grouped together with SGX leaf 0x12 by commit
b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") by mistake.

SGX leaf 0x12 has its specific logic to check if subleaf (starting from 2)
is valid or not by checking the bit 0:3 of corresponding EAX is 1 or
not.

Leaf 7 follows the logic that EAX of subleaf 0 enumerates the maximum
valid subleaf.

Fixes: b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-ID: <20240125024016.2521244-4-xiaoyao.li@intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 0729857c707535847d7fe31d3d91eb8b2a118e3c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/i386/kvm/kvm.c