i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F
commit10f92799af8ba3c3cef2352adcd4780f13fbab31
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 25 Jan 2024 02:40:14 +0000 (24 21:40 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Feb 2024 12:56:08 +0000 (16 13:56 +0100)
tree2500aaaf891e4264021ff07d78752484aa8f4123
parentea18be78a6a2126a269d4f624999dacebc99e8b9
i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F

Existing code misses a decrement of cpuid_i when skip leaf 0x1F.
There's a blank CPUID entry(with leaf, subleaf as 0, and all fields
stuffed 0s) left in the CPUID array.

It conflicts with correct CPUID leaf 0.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by:Yang Weijiang <weijiang.yang@intel.com>
Message-ID: <20240125024016.2521244-2-xiaoyao.li@intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/kvm.c