diff options
author | Xiaoyao Li <xiaoyao.li@intel.com> | 2024-01-24 21:40:14 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-02-16 13:56:08 +0100 |
commit | 10f92799af8ba3c3cef2352adcd4780f13fbab31 (patch) | |
tree | 2500aaaf891e4264021ff07d78752484aa8f4123 /target | |
parent | ea18be78a6a2126a269d4f624999dacebc99e8b9 (diff) | |
download | qemu-10f92799af8ba3c3cef2352adcd4780f13fbab31.zip qemu-10f92799af8ba3c3cef2352adcd4780f13fbab31.tar.gz qemu-10f92799af8ba3c3cef2352adcd4780f13fbab31.tar.bz2 |
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>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/kvm/kvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 76a6624..dff9ded 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -1914,6 +1914,7 @@ int kvm_arch_init_vcpu(CPUState *cs) } case 0x1f: if (env->nr_dies < 2) { + cpuid_i--; break; } /* fallthrough */ |