diff options
| author | Xiaoyao Li <xiaoyao.li@intel.com> | 2025-06-30 16:06:10 +0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-07-12 15:28:21 +0200 |
| commit | b6c5b41ba28198030ce2f2b19cf333a9129d07dc (patch) | |
| tree | 4ebbcdfa3ddf113606ff1890b877135def792836 /scripts/qapi/main.py | |
| parent | 3359b588f1f51c1ceaa72eb95cdc7e842d00a5b0 (diff) | |
| download | focaccia-qemu-b6c5b41ba28198030ce2f2b19cf333a9129d07dc.tar.gz focaccia-qemu-b6c5b41ba28198030ce2f2b19cf333a9129d07dc.zip | |
i386/cpu: Unify family, model and stepping calculation for x86 CPU
There are multiple places where CPUID family/model/stepping info are retrieved from env->cpuid_version. Besides, the calculation of family and model inside host_cpu_vendor_fms() doesn't comply to what Intel and AMD define. For family, both Intel and AMD define that Extended Family ID needs to be counted only when (base) Family is 0xF. For model, Intel counts Extended Model when (base) Family is 0x6 or 0xF, while AMD counts EXtended MOdel when (base) Family is 0xF. Introduce generic helper functions to get family, model and stepping from the EAX value of CPUID leaf 1, with the correct calculation formula. Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20250630080610.3151956-5-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/qapi/main.py')
0 files changed, 0 insertions, 0 deletions