mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
cpu_x86: Rename CPUID function to eax_in
CPUID instruction normally takes its parameter from EAX, but sometimes ECX is used as an additional parameter. Let's rename 'function' to 'eax_in' in preparation for adding 'ecx_in'. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
7ab88767a7
commit
90f4bc34b5
@ -6,351 +6,351 @@
|
|||||||
|
|
||||||
<!-- standard features, EDX -->
|
<!-- standard features, EDX -->
|
||||||
<feature name='fpu'> <!-- CPUID_FP87 -->
|
<feature name='fpu'> <!-- CPUID_FP87 -->
|
||||||
<cpuid function='0x00000001' edx='0x00000001'/>
|
<cpuid eax_in='0x00000001' edx='0x00000001'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='vme'> <!-- CPUID_VME -->
|
<feature name='vme'> <!-- CPUID_VME -->
|
||||||
<cpuid function='0x00000001' edx='0x00000002'/>
|
<cpuid eax_in='0x00000001' edx='0x00000002'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='de'> <!-- CPUID_DE -->
|
<feature name='de'> <!-- CPUID_DE -->
|
||||||
<cpuid function='0x00000001' edx='0x00000004'/>
|
<cpuid eax_in='0x00000001' edx='0x00000004'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pse'> <!-- CPUID_PSE -->
|
<feature name='pse'> <!-- CPUID_PSE -->
|
||||||
<cpuid function='0x00000001' edx='0x00000008'/>
|
<cpuid eax_in='0x00000001' edx='0x00000008'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tsc'> <!-- CPUID_TSC -->
|
<feature name='tsc'> <!-- CPUID_TSC -->
|
||||||
<cpuid function='0x00000001' edx='0x00000010'/>
|
<cpuid eax_in='0x00000001' edx='0x00000010'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='msr'> <!-- CPUID_MSR -->
|
<feature name='msr'> <!-- CPUID_MSR -->
|
||||||
<cpuid function='0x00000001' edx='0x00000020'/>
|
<cpuid eax_in='0x00000001' edx='0x00000020'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pae'> <!-- CPUID_PAE -->
|
<feature name='pae'> <!-- CPUID_PAE -->
|
||||||
<cpuid function='0x00000001' edx='0x00000040'/>
|
<cpuid eax_in='0x00000001' edx='0x00000040'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mce'> <!-- CPUID_MCE -->
|
<feature name='mce'> <!-- CPUID_MCE -->
|
||||||
<cpuid function='0x00000001' edx='0x00000080'/>
|
<cpuid eax_in='0x00000001' edx='0x00000080'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cx8'> <!-- CPUID_CX8 -->
|
<feature name='cx8'> <!-- CPUID_CX8 -->
|
||||||
<cpuid function='0x00000001' edx='0x00000100'/>
|
<cpuid eax_in='0x00000001' edx='0x00000100'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='apic'> <!-- CPUID_APIC -->
|
<feature name='apic'> <!-- CPUID_APIC -->
|
||||||
<cpuid function='0x00000001' edx='0x00000200'/>
|
<cpuid eax_in='0x00000001' edx='0x00000200'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sep'> <!-- CPUID_SEP -->
|
<feature name='sep'> <!-- CPUID_SEP -->
|
||||||
<cpuid function='0x00000001' edx='0x00000800'/>
|
<cpuid eax_in='0x00000001' edx='0x00000800'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mtrr'> <!-- CPUID_MTRR -->
|
<feature name='mtrr'> <!-- CPUID_MTRR -->
|
||||||
<cpuid function='0x00000001' edx='0x00001000'/>
|
<cpuid eax_in='0x00000001' edx='0x00001000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pge'> <!-- CPUID_PGE -->
|
<feature name='pge'> <!-- CPUID_PGE -->
|
||||||
<cpuid function='0x00000001' edx='0x00002000'/>
|
<cpuid eax_in='0x00000001' edx='0x00002000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mca'> <!-- CPUID_MCA -->
|
<feature name='mca'> <!-- CPUID_MCA -->
|
||||||
<cpuid function='0x00000001' edx='0x00004000'/>
|
<cpuid eax_in='0x00000001' edx='0x00004000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cmov'> <!-- CPUID_CMOV -->
|
<feature name='cmov'> <!-- CPUID_CMOV -->
|
||||||
<cpuid function='0x00000001' edx='0x00008000'/>
|
<cpuid eax_in='0x00000001' edx='0x00008000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pat'> <!-- CPUID_PAT -->
|
<feature name='pat'> <!-- CPUID_PAT -->
|
||||||
<cpuid function='0x00000001' edx='0x00010000'/>
|
<cpuid eax_in='0x00000001' edx='0x00010000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pse36'> <!-- CPUID_PSE36 -->
|
<feature name='pse36'> <!-- CPUID_PSE36 -->
|
||||||
<cpuid function='0x00000001' edx='0x00020000'/>
|
<cpuid eax_in='0x00000001' edx='0x00020000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pn'> <!-- CPUID_PN -->
|
<feature name='pn'> <!-- CPUID_PN -->
|
||||||
<cpuid function='0x00000001' edx='0x00040000'/>
|
<cpuid eax_in='0x00000001' edx='0x00040000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='clflush'> <!-- CPUID_CLFLUSH -->
|
<feature name='clflush'> <!-- CPUID_CLFLUSH -->
|
||||||
<cpuid function='0x00000001' edx='0x00080000'/>
|
<cpuid eax_in='0x00000001' edx='0x00080000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ds'> <!-- CPUID_DTS -->
|
<feature name='ds'> <!-- CPUID_DTS -->
|
||||||
<cpuid function='0x00000001' edx='0x00200000'/>
|
<cpuid eax_in='0x00000001' edx='0x00200000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='acpi'> <!-- CPUID_ACPI -->
|
<feature name='acpi'> <!-- CPUID_ACPI -->
|
||||||
<cpuid function='0x00000001' edx='0x00400000'/>
|
<cpuid eax_in='0x00000001' edx='0x00400000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mmx'> <!-- CPUID_MMX -->
|
<feature name='mmx'> <!-- CPUID_MMX -->
|
||||||
<cpuid function='0x00000001' edx='0x00800000'/>
|
<cpuid eax_in='0x00000001' edx='0x00800000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='fxsr'> <!-- CPUID_FXSR -->
|
<feature name='fxsr'> <!-- CPUID_FXSR -->
|
||||||
<cpuid function='0x00000001' edx='0x01000000'/>
|
<cpuid eax_in='0x00000001' edx='0x01000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sse'> <!-- CPUID_SSE -->
|
<feature name='sse'> <!-- CPUID_SSE -->
|
||||||
<cpuid function='0x00000001' edx='0x02000000'/>
|
<cpuid eax_in='0x00000001' edx='0x02000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sse2'> <!-- CPUID_SSE2 -->
|
<feature name='sse2'> <!-- CPUID_SSE2 -->
|
||||||
<cpuid function='0x00000001' edx='0x04000000'/>
|
<cpuid eax_in='0x00000001' edx='0x04000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ss'> <!-- CPUID_SS -->
|
<feature name='ss'> <!-- CPUID_SS -->
|
||||||
<cpuid function='0x00000001' edx='0x08000000'/>
|
<cpuid eax_in='0x00000001' edx='0x08000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ht'> <!-- CPUID_HT -->
|
<feature name='ht'> <!-- CPUID_HT -->
|
||||||
<cpuid function='0x00000001' edx='0x10000000'/>
|
<cpuid eax_in='0x00000001' edx='0x10000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tm'> <!-- CPUID_TM -->
|
<feature name='tm'> <!-- CPUID_TM -->
|
||||||
<cpuid function='0x00000001' edx='0x20000000'/>
|
<cpuid eax_in='0x00000001' edx='0x20000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ia64'> <!-- CPUID_IA64 -->
|
<feature name='ia64'> <!-- CPUID_IA64 -->
|
||||||
<cpuid function='0x00000001' edx='0x40000000'/>
|
<cpuid eax_in='0x00000001' edx='0x40000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pbe'> <!-- CPUID_PBE -->
|
<feature name='pbe'> <!-- CPUID_PBE -->
|
||||||
<cpuid function='0x00000001' edx='0x80000000'/>
|
<cpuid eax_in='0x00000001' edx='0x80000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- standard features, ECX -->
|
<!-- standard features, ECX -->
|
||||||
<feature name='pni'> <!-- CPUID_EXT_SSE3 -->
|
<feature name='pni'> <!-- CPUID_EXT_SSE3 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000001'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000001'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pclmuldq'>
|
<feature name='pclmuldq'>
|
||||||
<cpuid function='0x00000001' ecx='0x00000002'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000002'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='dtes64'>
|
<feature name='dtes64'>
|
||||||
<cpuid function='0x00000001' ecx='0x00000004'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000004'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='monitor'> <!-- CPUID_EXT_MONITOR -->
|
<feature name='monitor'> <!-- CPUID_EXT_MONITOR -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000008'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000008'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ds_cpl'> <!-- CPUID_EXT_DSCPL -->
|
<feature name='ds_cpl'> <!-- CPUID_EXT_DSCPL -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000010'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000010'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='vmx'> <!-- CPUID_EXT_VMX -->
|
<feature name='vmx'> <!-- CPUID_EXT_VMX -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000020'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000020'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='smx'>
|
<feature name='smx'>
|
||||||
<cpuid function='0x00000001' ecx='0x00000040'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000040'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='est'> <!-- CPUID_EXT_EST -->
|
<feature name='est'> <!-- CPUID_EXT_EST -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000080'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000080'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tm2'> <!-- CPUID_EXT_TM2 -->
|
<feature name='tm2'> <!-- CPUID_EXT_TM2 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000100'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000100'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ssse3'> <!-- CPUID_EXT_SSSE3 -->
|
<feature name='ssse3'> <!-- CPUID_EXT_SSSE3 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000200'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000200'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cid'> <!-- CPUID_EXT_CID -->
|
<feature name='cid'> <!-- CPUID_EXT_CID -->
|
||||||
<cpuid function='0x00000001' ecx='0x00000400'/>
|
<cpuid eax_in='0x00000001' ecx='0x00000400'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='fma'>
|
<feature name='fma'>
|
||||||
<cpuid function='0x00000001' ecx='0x00001000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00001000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cx16'> <!-- CPUID_EXT_CX16 -->
|
<feature name='cx16'> <!-- CPUID_EXT_CX16 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00002000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00002000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='xtpr'> <!-- CPUID_EXT_XTPR -->
|
<feature name='xtpr'> <!-- CPUID_EXT_XTPR -->
|
||||||
<cpuid function='0x00000001' ecx='0x00004000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00004000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pdcm'>
|
<feature name='pdcm'>
|
||||||
<cpuid function='0x00000001' ecx='0x00008000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00008000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pcid'>
|
<feature name='pcid'>
|
||||||
<cpuid function='0x00000001' ecx='0x00020000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00020000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='dca'> <!-- CPUID_EXT_DCA -->
|
<feature name='dca'> <!-- CPUID_EXT_DCA -->
|
||||||
<cpuid function='0x00000001' ecx='0x00040000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00040000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sse4.1'> <!-- CPUID_EXT_SSE41 -->
|
<feature name='sse4.1'> <!-- CPUID_EXT_SSE41 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00080000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00080000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sse4.2'> <!-- CPUID_EXT_SSE42 -->
|
<feature name='sse4.2'> <!-- CPUID_EXT_SSE42 -->
|
||||||
<cpuid function='0x00000001' ecx='0x00100000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00100000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='x2apic'> <!-- CPUID_EXT_X2APIC -->
|
<feature name='x2apic'> <!-- CPUID_EXT_X2APIC -->
|
||||||
<cpuid function='0x00000001' ecx='0x00200000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00200000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='movbe'>
|
<feature name='movbe'>
|
||||||
<cpuid function='0x00000001' ecx='0x00400000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00400000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='popcnt'> <!-- CPUID_EXT_POPCNT -->
|
<feature name='popcnt'> <!-- CPUID_EXT_POPCNT -->
|
||||||
<cpuid function='0x00000001' ecx='0x00800000'/>
|
<cpuid eax_in='0x00000001' ecx='0x00800000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tsc-deadline'>
|
<feature name='tsc-deadline'>
|
||||||
<cpuid function='0x00000001' ecx='0x01000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x01000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='aes'>
|
<feature name='aes'>
|
||||||
<cpuid function='0x00000001' ecx='0x02000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x02000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='xsave'>
|
<feature name='xsave'>
|
||||||
<cpuid function='0x00000001' ecx='0x04000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x04000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='osxsave'>
|
<feature name='osxsave'>
|
||||||
<cpuid function='0x00000001' ecx='0x08000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x08000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx'>
|
<feature name='avx'>
|
||||||
<cpuid function='0x00000001' ecx='0x10000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x10000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='f16c'>
|
<feature name='f16c'>
|
||||||
<cpuid function='0x00000001' ecx='0x20000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x20000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='rdrand'>
|
<feature name='rdrand'>
|
||||||
<cpuid function='0x00000001' ecx='0x40000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x40000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='hypervisor'> <!-- CPUID_EXT_HYPERVISOR -->
|
<feature name='hypervisor'> <!-- CPUID_EXT_HYPERVISOR -->
|
||||||
<cpuid function='0x00000001' ecx='0x80000000'/>
|
<cpuid eax_in='0x00000001' ecx='0x80000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- extended features, EDX -->
|
<!-- extended features, EDX -->
|
||||||
<feature name='syscall'> <!-- CPUID_EXT2_SYSCALL -->
|
<feature name='syscall'> <!-- CPUID_EXT2_SYSCALL -->
|
||||||
<cpuid function='0x80000001' edx='0x00000800'/>
|
<cpuid eax_in='0x80000001' edx='0x00000800'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='nx'> <!-- CPUID_EXT2_NX -->
|
<feature name='nx'> <!-- CPUID_EXT2_NX -->
|
||||||
<cpuid function='0x80000001' edx='0x00100000'/>
|
<cpuid eax_in='0x80000001' edx='0x00100000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mmxext'> <!-- CPUID_EXT2_MMXEXT -->
|
<feature name='mmxext'> <!-- CPUID_EXT2_MMXEXT -->
|
||||||
<cpuid function='0x80000001' edx='0x00400000'/>
|
<cpuid eax_in='0x80000001' edx='0x00400000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='fxsr_opt'> <!-- CPUID_EXT2_FFXSR -->
|
<feature name='fxsr_opt'> <!-- CPUID_EXT2_FFXSR -->
|
||||||
<cpuid function='0x80000001' edx='0x02000000'/>
|
<cpuid eax_in='0x80000001' edx='0x02000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='pdpe1gb'> <!-- CPUID_EXT2_PDPE1GB -->
|
<feature name='pdpe1gb'> <!-- CPUID_EXT2_PDPE1GB -->
|
||||||
<cpuid function='0x80000001' edx='0x04000000'/>
|
<cpuid eax_in='0x80000001' edx='0x04000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='rdtscp'> <!-- CPUID_EXT2_RDTSCP -->
|
<feature name='rdtscp'> <!-- CPUID_EXT2_RDTSCP -->
|
||||||
<cpuid function='0x80000001' edx='0x08000000'/>
|
<cpuid eax_in='0x80000001' edx='0x08000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='lm'> <!-- CPUID_EXT2_LM -->
|
<feature name='lm'> <!-- CPUID_EXT2_LM -->
|
||||||
<cpuid function='0x80000001' edx='0x20000000'/>
|
<cpuid eax_in='0x80000001' edx='0x20000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='3dnowext'> <!-- CPUID_EXT2_3DNOWEXT -->
|
<feature name='3dnowext'> <!-- CPUID_EXT2_3DNOWEXT -->
|
||||||
<cpuid function='0x80000001' edx='0x40000000'/>
|
<cpuid eax_in='0x80000001' edx='0x40000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='3dnow'> <!-- CPUID_EXT2_3DNOW -->
|
<feature name='3dnow'> <!-- CPUID_EXT2_3DNOW -->
|
||||||
<cpuid function='0x80000001' edx='0x80000000'/>
|
<cpuid eax_in='0x80000001' edx='0x80000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- extended features, ECX -->
|
<!-- extended features, ECX -->
|
||||||
<feature name='lahf_lm'> <!-- CPUID_EXT3_LAHF_LM -->
|
<feature name='lahf_lm'> <!-- CPUID_EXT3_LAHF_LM -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000001'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000001'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cmp_legacy'> <!-- CPUID_EXT3_CMP_LEG -->
|
<feature name='cmp_legacy'> <!-- CPUID_EXT3_CMP_LEG -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000002'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000002'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='svm'> <!-- CPUID_EXT3_SVM -->
|
<feature name='svm'> <!-- CPUID_EXT3_SVM -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000004'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000004'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='extapic'> <!-- CPUID_EXT3_EXTAPIC -->
|
<feature name='extapic'> <!-- CPUID_EXT3_EXTAPIC -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000008'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000008'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cr8legacy'> <!-- CPUID_EXT3_CR8LEG -->
|
<feature name='cr8legacy'> <!-- CPUID_EXT3_CR8LEG -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000010'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000010'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='abm'> <!-- CPUID_EXT3_ABM -->
|
<feature name='abm'> <!-- CPUID_EXT3_ABM -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000020'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000020'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='sse4a'> <!-- CPUID_EXT3_SSE4A -->
|
<feature name='sse4a'> <!-- CPUID_EXT3_SSE4A -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000040'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000040'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='misalignsse'> <!-- CPUID_EXT3_MISALIGNSSE -->
|
<feature name='misalignsse'> <!-- CPUID_EXT3_MISALIGNSSE -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000080'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000080'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='3dnowprefetch'> <!-- CPUID_EXT3_3DNOWPREFETCH -->
|
<feature name='3dnowprefetch'> <!-- CPUID_EXT3_3DNOWPREFETCH -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000100'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000100'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='osvw'> <!-- CPUID_EXT3_OSVW -->
|
<feature name='osvw'> <!-- CPUID_EXT3_OSVW -->
|
||||||
<cpuid function='0x80000001' ecx='0x00000200'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000200'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='ibs'>
|
<feature name='ibs'>
|
||||||
<cpuid function='0x80000001' ecx='0x00000400'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000400'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='xop'>
|
<feature name='xop'>
|
||||||
<cpuid function='0x80000001' ecx='0x00000800'/>
|
<cpuid eax_in='0x80000001' ecx='0x00000800'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='skinit'> <!-- CPUID_EXT3_SKINIT -->
|
<feature name='skinit'> <!-- CPUID_EXT3_SKINIT -->
|
||||||
<cpuid function='0x80000001' ecx='0x00001000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00001000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='wdt'>
|
<feature name='wdt'>
|
||||||
<cpuid function='0x80000001' ecx='0x00002000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00002000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='lwp'>
|
<feature name='lwp'>
|
||||||
<cpuid function='0x80000001' ecx='0x00008000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00008000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='fma4'>
|
<feature name='fma4'>
|
||||||
<cpuid function='0x80000001' ecx='0x00010000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00010000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tce'>
|
<feature name='tce'>
|
||||||
<cpuid function='0x80000001' ecx='0x00020000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00020000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='cvt16'>
|
<feature name='cvt16'>
|
||||||
<cpuid function='0x80000001' ecx='0x00040000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00040000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='nodeid_msr'>
|
<feature name='nodeid_msr'>
|
||||||
<cpuid function='0x80000001' ecx='0x00080000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00080000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tbm'>
|
<feature name='tbm'>
|
||||||
<cpuid function='0x80000001' ecx='0x00200000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00200000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='topoext'>
|
<feature name='topoext'>
|
||||||
<cpuid function='0x80000001' ecx='0x00400000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00400000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='perfctr_core'>
|
<feature name='perfctr_core'>
|
||||||
<cpuid function='0x80000001' ecx='0x00800000'/>
|
<cpuid eax_in='0x80000001' ecx='0x00800000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='perfctr_nb'>
|
<feature name='perfctr_nb'>
|
||||||
<cpuid function='0x80000001' ecx='0x01000000'/>
|
<cpuid eax_in='0x80000001' ecx='0x01000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- cpuid function 0x7 ecx 0x0 features -->
|
<!-- cpuid function 0x7 ecx 0x0 features -->
|
||||||
<!-- We support only ecx 0x0 now as it's done by a workaround -->
|
<!-- We support only ecx 0x0 now as it's done by a workaround -->
|
||||||
<feature name='fsgsbase'>
|
<feature name='fsgsbase'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000001'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000001'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='tsc_adjust'>
|
<feature name='tsc_adjust'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000002'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000002'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='bmi1'>
|
<feature name='bmi1'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000008'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000008'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='hle'>
|
<feature name='hle'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000010'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000010'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx2'>
|
<feature name='avx2'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000020'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000020'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='smep'>
|
<feature name='smep'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000080'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000080'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='bmi2'>
|
<feature name='bmi2'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000100'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000100'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='erms'>
|
<feature name='erms'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000200'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000200'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='invpcid'>
|
<feature name='invpcid'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000400'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000400'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='rtm'>
|
<feature name='rtm'>
|
||||||
<cpuid function='0x00000007' ebx='0x00000800'/>
|
<cpuid eax_in='0x00000007' ebx='0x00000800'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='mpx'>
|
<feature name='mpx'>
|
||||||
<cpuid function='0x00000007' ebx='0x00004000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00004000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx512f'> <!-- AVX-512 Foundation -->
|
<feature name='avx512f'> <!-- AVX-512 Foundation -->
|
||||||
<cpuid function='0x00000007' ebx='0x00010000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00010000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='rdseed'>
|
<feature name='rdseed'>
|
||||||
<cpuid function='0x00000007' ebx='0x00040000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00040000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='adx'>
|
<feature name='adx'>
|
||||||
<cpuid function='0x00000007' ebx='0x00080000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00080000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='smap'>
|
<feature name='smap'>
|
||||||
<cpuid function='0x00000007' ebx='0x00100000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00100000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='clflushopt'>
|
<feature name='clflushopt'>
|
||||||
<cpuid function='0x00000007' ebx='0x00800000'/>
|
<cpuid eax_in='0x00000007' ebx='0x00800000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx512pf'> <!-- AVX-512 Prefetch -->
|
<feature name='avx512pf'> <!-- AVX-512 Prefetch -->
|
||||||
<cpuid function='0x00000007' ebx='0x04000000'/>
|
<cpuid eax_in='0x00000007' ebx='0x04000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx512er'> <!-- AVX-512 Exponential and Reciprocal -->
|
<feature name='avx512er'> <!-- AVX-512 Exponential and Reciprocal -->
|
||||||
<cpuid function='0x00000007' ebx='0x08000000'/>
|
<cpuid eax_in='0x00000007' ebx='0x08000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature name='avx512cd'> <!-- AVX-512 Conflict Detection -->
|
<feature name='avx512cd'> <!-- AVX-512 Conflict Detection -->
|
||||||
<cpuid function='0x00000007' ebx='0x10000000'/>
|
<cpuid eax_in='0x00000007' ebx='0x10000000'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- Advanced Power Management edx features -->
|
<!-- Advanced Power Management edx features -->
|
||||||
<feature name='invtsc' migratable='no'>
|
<feature name='invtsc' migratable='no'>
|
||||||
<cpuid function='0x80000007' edx='0x00000100'/>
|
<cpuid eax_in='0x80000007' edx='0x00000100'/>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- models -->
|
<!-- models -->
|
||||||
|
@ -68,24 +68,24 @@ struct _virCPUx86KVMFeature {
|
|||||||
|
|
||||||
static const virCPUx86KVMFeature x86_kvm_features[] =
|
static const virCPUx86KVMFeature x86_kvm_features[] =
|
||||||
{
|
{
|
||||||
{VIR_CPU_x86_KVM_CLOCKSOURCE, { .function = 0x40000001, .eax = 0x00000001 }},
|
{VIR_CPU_x86_KVM_CLOCKSOURCE, { .eax_in = 0x40000001, .eax = 0x00000001 }},
|
||||||
{VIR_CPU_x86_KVM_NOP_IO_DELAY, { .function = 0x40000001, .eax = 0x00000002 }},
|
{VIR_CPU_x86_KVM_NOP_IO_DELAY, { .eax_in = 0x40000001, .eax = 0x00000002 }},
|
||||||
{VIR_CPU_x86_KVM_MMU_OP, { .function = 0x40000001, .eax = 0x00000004 }},
|
{VIR_CPU_x86_KVM_MMU_OP, { .eax_in = 0x40000001, .eax = 0x00000004 }},
|
||||||
{VIR_CPU_x86_KVM_CLOCKSOURCE2, { .function = 0x40000001, .eax = 0x00000008 }},
|
{VIR_CPU_x86_KVM_CLOCKSOURCE2, { .eax_in = 0x40000001, .eax = 0x00000008 }},
|
||||||
{VIR_CPU_x86_KVM_ASYNC_PF, { .function = 0x40000001, .eax = 0x00000010 }},
|
{VIR_CPU_x86_KVM_ASYNC_PF, { .eax_in = 0x40000001, .eax = 0x00000010 }},
|
||||||
{VIR_CPU_x86_KVM_STEAL_TIME, { .function = 0x40000001, .eax = 0x00000020 }},
|
{VIR_CPU_x86_KVM_STEAL_TIME, { .eax_in = 0x40000001, .eax = 0x00000020 }},
|
||||||
{VIR_CPU_x86_KVM_PV_EOI, { .function = 0x40000001, .eax = 0x00000040 }},
|
{VIR_CPU_x86_KVM_PV_EOI, { .eax_in = 0x40000001, .eax = 0x00000040 }},
|
||||||
{VIR_CPU_x86_KVM_PV_UNHALT, { .function = 0x40000001, .eax = 0x00000080 }},
|
{VIR_CPU_x86_KVM_PV_UNHALT, { .eax_in = 0x40000001, .eax = 0x00000080 }},
|
||||||
{VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
|
{VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
|
||||||
{ .function = 0x40000001, .eax = 0x01000000 }},
|
{ .eax_in = 0x40000001, .eax = 0x01000000 }},
|
||||||
{VIR_CPU_x86_KVM_HV_RUNTIME, { .function = 0x40000003, .eax = 0x00000001 }},
|
{VIR_CPU_x86_KVM_HV_RUNTIME, { .eax_in = 0x40000003, .eax = 0x00000001 }},
|
||||||
{VIR_CPU_x86_KVM_HV_SYNIC, { .function = 0x40000003, .eax = 0x00000004 }},
|
{VIR_CPU_x86_KVM_HV_SYNIC, { .eax_in = 0x40000003, .eax = 0x00000004 }},
|
||||||
{VIR_CPU_x86_KVM_HV_STIMER, { .function = 0x40000003, .eax = 0x00000008 }},
|
{VIR_CPU_x86_KVM_HV_STIMER, { .eax_in = 0x40000003, .eax = 0x00000008 }},
|
||||||
{VIR_CPU_x86_KVM_HV_RELAXED, { .function = 0x40000003, .eax = 0x00000020 }},
|
{VIR_CPU_x86_KVM_HV_RELAXED, { .eax_in = 0x40000003, .eax = 0x00000020 }},
|
||||||
{VIR_CPU_x86_KVM_HV_SPINLOCK, { .function = 0x40000003, .eax = 0x00000022 }},
|
{VIR_CPU_x86_KVM_HV_SPINLOCK, { .eax_in = 0x40000003, .eax = 0x00000022 }},
|
||||||
{VIR_CPU_x86_KVM_HV_VAPIC, { .function = 0x40000003, .eax = 0x00000030 }},
|
{VIR_CPU_x86_KVM_HV_VAPIC, { .eax_in = 0x40000003, .eax = 0x00000030 }},
|
||||||
{VIR_CPU_x86_KVM_HV_VPINDEX, { .function = 0x40000003, .eax = 0x00000040 }},
|
{VIR_CPU_x86_KVM_HV_VPINDEX, { .eax_in = 0x40000003, .eax = 0x00000040 }},
|
||||||
{VIR_CPU_x86_KVM_HV_RESET, { .function = 0x40000003, .eax = 0x00000080 }},
|
{VIR_CPU_x86_KVM_HV_RESET, { .eax_in = 0x40000003, .eax = 0x00000080 }},
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _virCPUx86Model virCPUx86Model;
|
typedef struct _virCPUx86Model virCPUx86Model;
|
||||||
@ -203,9 +203,9 @@ virCPUx86CPUIDSorter(const void *a, const void *b)
|
|||||||
virCPUx86CPUID *da = (virCPUx86CPUID *) a;
|
virCPUx86CPUID *da = (virCPUx86CPUID *) a;
|
||||||
virCPUx86CPUID *db = (virCPUx86CPUID *) b;
|
virCPUx86CPUID *db = (virCPUx86CPUID *) b;
|
||||||
|
|
||||||
if (da->function > db->function)
|
if (da->eax_in > db->eax_in)
|
||||||
return 1;
|
return 1;
|
||||||
else if (da->function < db->function)
|
else if (da->eax_in < db->eax_in)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -232,12 +232,12 @@ x86DataCpuidNext(virCPUx86DataIteratorPtr iterator)
|
|||||||
|
|
||||||
static virCPUx86CPUID *
|
static virCPUx86CPUID *
|
||||||
x86DataCpuid(const virCPUx86Data *data,
|
x86DataCpuid(const virCPUx86Data *data,
|
||||||
uint32_t function)
|
uint32_t eax_in)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < data->len; i++) {
|
for (i = 0; i < data->len; i++) {
|
||||||
if (data->data[i].function == function)
|
if (data->data[i].eax_in == eax_in)
|
||||||
return data->data + i;
|
return data->data + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ virCPUx86DataAddCPUID(virCPUx86Data *data,
|
|||||||
{
|
{
|
||||||
virCPUx86CPUID *existing;
|
virCPUx86CPUID *existing;
|
||||||
|
|
||||||
if ((existing = x86DataCpuid(data, cpuid->function))) {
|
if ((existing = x86DataCpuid(data, cpuid->eax_in))) {
|
||||||
x86cpuidSetBits(existing, cpuid);
|
x86cpuidSetBits(existing, cpuid);
|
||||||
} else {
|
} else {
|
||||||
if (VIR_APPEND_ELEMENT_COPY(data->data, data->len,
|
if (VIR_APPEND_ELEMENT_COPY(data->data, data->len,
|
||||||
@ -331,7 +331,7 @@ x86DataAdd(virCPUx86Data *data1,
|
|||||||
virCPUx86CPUID *cpuid2;
|
virCPUx86CPUID *cpuid2;
|
||||||
|
|
||||||
while ((cpuid2 = x86DataCpuidNext(&iter))) {
|
while ((cpuid2 = x86DataCpuidNext(&iter))) {
|
||||||
cpuid1 = x86DataCpuid(data1, cpuid2->function);
|
cpuid1 = x86DataCpuid(data1, cpuid2->eax_in);
|
||||||
|
|
||||||
if (cpuid1) {
|
if (cpuid1) {
|
||||||
x86cpuidSetBits(cpuid1, cpuid2);
|
x86cpuidSetBits(cpuid1, cpuid2);
|
||||||
@ -354,7 +354,7 @@ x86DataSubtract(virCPUx86Data *data1,
|
|||||||
virCPUx86CPUID *cpuid2;
|
virCPUx86CPUID *cpuid2;
|
||||||
|
|
||||||
while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
||||||
cpuid2 = x86DataCpuid(data2, cpuid1->function);
|
cpuid2 = x86DataCpuid(data2, cpuid1->eax_in);
|
||||||
x86cpuidClearBits(cpuid1, cpuid2);
|
x86cpuidClearBits(cpuid1, cpuid2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ x86DataIntersect(virCPUx86Data *data1,
|
|||||||
virCPUx86CPUID *cpuid2;
|
virCPUx86CPUID *cpuid2;
|
||||||
|
|
||||||
while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
||||||
cpuid2 = x86DataCpuid(data2, cpuid1->function);
|
cpuid2 = x86DataCpuid(data2, cpuid1->eax_in);
|
||||||
if (cpuid2)
|
if (cpuid2)
|
||||||
x86cpuidAndBits(cpuid1, cpuid2);
|
x86cpuidAndBits(cpuid1, cpuid2);
|
||||||
else
|
else
|
||||||
@ -397,7 +397,7 @@ x86DataIsSubset(const virCPUx86Data *data,
|
|||||||
const virCPUx86CPUID *cpuidSubset;
|
const virCPUx86CPUID *cpuidSubset;
|
||||||
|
|
||||||
while ((cpuidSubset = x86DataCpuidNext(&iter))) {
|
while ((cpuidSubset = x86DataCpuidNext(&iter))) {
|
||||||
if (!(cpuid = x86DataCpuid(data, cpuidSubset->function)) ||
|
if (!(cpuid = x86DataCpuid(data, cpuidSubset->eax_in)) ||
|
||||||
!x86cpuidMatchMasked(cpuid, cpuidSubset))
|
!x86cpuidMatchMasked(cpuid, cpuidSubset))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -438,7 +438,7 @@ x86DataToVendor(const virCPUx86Data *data,
|
|||||||
|
|
||||||
for (i = 0; i < map->nvendors; i++) {
|
for (i = 0; i < map->nvendors; i++) {
|
||||||
virCPUx86VendorPtr vendor = map->vendors[i];
|
virCPUx86VendorPtr vendor = map->vendors[i];
|
||||||
if ((cpuid = x86DataCpuid(data, vendor->cpuid.function)) &&
|
if ((cpuid = x86DataCpuid(data, vendor->cpuid.eax_in)) &&
|
||||||
x86cpuidMatchMasked(cpuid, &vendor->cpuid)) {
|
x86cpuidMatchMasked(cpuid, &vendor->cpuid)) {
|
||||||
x86cpuidClearBits(cpuid, &vendor->cpuid);
|
x86cpuidClearBits(cpuid, &vendor->cpuid);
|
||||||
return vendor;
|
return vendor;
|
||||||
@ -553,7 +553,7 @@ x86VendorParse(xmlXPathContextPtr ctxt,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
vendor->cpuid.function = 0;
|
vendor->cpuid.eax_in = 0;
|
||||||
vendor->cpuid.ebx = virReadBufInt32LE(string);
|
vendor->cpuid.ebx = virReadBufInt32LE(string);
|
||||||
vendor->cpuid.edx = virReadBufInt32LE(string + 4);
|
vendor->cpuid.edx = virReadBufInt32LE(string + 4);
|
||||||
vendor->cpuid.ecx = virReadBufInt32LE(string + 8);
|
vendor->cpuid.ecx = virReadBufInt32LE(string + 8);
|
||||||
@ -667,23 +667,25 @@ static int
|
|||||||
x86ParseCPUID(xmlXPathContextPtr ctxt,
|
x86ParseCPUID(xmlXPathContextPtr ctxt,
|
||||||
virCPUx86CPUID *cpuid)
|
virCPUx86CPUID *cpuid)
|
||||||
{
|
{
|
||||||
unsigned long fun, eax, ebx, ecx, edx;
|
unsigned long eax_in;
|
||||||
int ret_fun, ret_eax, ret_ebx, ret_ecx, ret_edx;
|
unsigned long eax, ebx, ecx, edx;
|
||||||
|
int ret_eax_in, ret_eax, ret_ebx, ret_ecx, ret_edx;
|
||||||
|
|
||||||
memset(cpuid, 0, sizeof(*cpuid));
|
memset(cpuid, 0, sizeof(*cpuid));
|
||||||
|
|
||||||
fun = eax = ebx = ecx = edx = 0;
|
eax_in = 0;
|
||||||
ret_fun = virXPathULongHex("string(@function)", ctxt, &fun);
|
eax = ebx = ecx = edx = 0;
|
||||||
|
ret_eax_in = virXPathULongHex("string(@eax_in)", ctxt, &eax_in);
|
||||||
ret_eax = virXPathULongHex("string(@eax)", ctxt, &eax);
|
ret_eax = virXPathULongHex("string(@eax)", ctxt, &eax);
|
||||||
ret_ebx = virXPathULongHex("string(@ebx)", ctxt, &ebx);
|
ret_ebx = virXPathULongHex("string(@ebx)", ctxt, &ebx);
|
||||||
ret_ecx = virXPathULongHex("string(@ecx)", ctxt, &ecx);
|
ret_ecx = virXPathULongHex("string(@ecx)", ctxt, &ecx);
|
||||||
ret_edx = virXPathULongHex("string(@edx)", ctxt, &edx);
|
ret_edx = virXPathULongHex("string(@edx)", ctxt, &edx);
|
||||||
|
|
||||||
if (ret_fun < 0 || ret_eax == -2 || ret_ebx == -2
|
if (ret_eax_in < 0 ||
|
||||||
|| ret_ecx == -2 || ret_edx == -2)
|
ret_eax == -2 || ret_ebx == -2 || ret_ecx == -2 || ret_edx == -2)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
cpuid->function = fun;
|
cpuid->eax_in = eax_in;
|
||||||
cpuid->eax = eax;
|
cpuid->eax = eax;
|
||||||
cpuid->ebx = ebx;
|
cpuid->ebx = ebx;
|
||||||
cpuid->ecx = ecx;
|
cpuid->ecx = ecx;
|
||||||
@ -966,7 +968,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|||||||
while ((cpuid1 = x86DataCpuidNext(&iter1))) {
|
while ((cpuid1 = x86DataCpuidNext(&iter1))) {
|
||||||
virCPUx86CompareResult match = SUPERSET;
|
virCPUx86CompareResult match = SUPERSET;
|
||||||
|
|
||||||
if ((cpuid2 = x86DataCpuid(model2->data, cpuid1->function))) {
|
if ((cpuid2 = x86DataCpuid(model2->data, cpuid1->eax_in))) {
|
||||||
if (x86cpuidMatch(cpuid1, cpuid2))
|
if (x86cpuidMatch(cpuid1, cpuid2))
|
||||||
continue;
|
continue;
|
||||||
else if (!x86cpuidMatchMasked(cpuid1, cpuid2))
|
else if (!x86cpuidMatchMasked(cpuid1, cpuid2))
|
||||||
@ -982,7 +984,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|||||||
while ((cpuid2 = x86DataCpuidNext(&iter2))) {
|
while ((cpuid2 = x86DataCpuidNext(&iter2))) {
|
||||||
virCPUx86CompareResult match = SUBSET;
|
virCPUx86CompareResult match = SUBSET;
|
||||||
|
|
||||||
if ((cpuid1 = x86DataCpuid(model1->data, cpuid2->function))) {
|
if ((cpuid1 = x86DataCpuid(model1->data, cpuid2->eax_in))) {
|
||||||
if (x86cpuidMatch(cpuid2, cpuid1))
|
if (x86cpuidMatch(cpuid2, cpuid1))
|
||||||
continue;
|
continue;
|
||||||
else if (!x86cpuidMatchMasked(cpuid2, cpuid1))
|
else if (!x86cpuidMatchMasked(cpuid2, cpuid1))
|
||||||
@ -1272,10 +1274,10 @@ x86CPUDataFormat(const virCPUData *data)
|
|||||||
virBufferAddLit(&buf, "<cpudata arch='x86'>\n");
|
virBufferAddLit(&buf, "<cpudata arch='x86'>\n");
|
||||||
while ((cpuid = x86DataCpuidNext(&iter))) {
|
while ((cpuid = x86DataCpuidNext(&iter))) {
|
||||||
virBufferAsprintf(&buf,
|
virBufferAsprintf(&buf,
|
||||||
" <cpuid function='0x%08x'"
|
" <cpuid eax_in='0x%08x'"
|
||||||
" eax='0x%08x' ebx='0x%08x'"
|
" eax='0x%08x' ebx='0x%08x'"
|
||||||
" ecx='0x%08x' edx='0x%08x'/>\n",
|
" ecx='0x%08x' edx='0x%08x'/>\n",
|
||||||
cpuid->function,
|
cpuid->eax_in,
|
||||||
cpuid->eax, cpuid->ebx, cpuid->ecx, cpuid->edx);
|
cpuid->eax, cpuid->ebx, cpuid->ecx, cpuid->edx);
|
||||||
}
|
}
|
||||||
virBufferAddLit(&buf, "</cpudata>\n");
|
virBufferAddLit(&buf, "</cpudata>\n");
|
||||||
@ -1884,7 +1886,7 @@ cpuidCall(virCPUx86CPUID *cpuid)
|
|||||||
"=b" (cpuid->ebx),
|
"=b" (cpuid->ebx),
|
||||||
"=c" (cpuid->ecx),
|
"=c" (cpuid->ecx),
|
||||||
"=d" (cpuid->edx)
|
"=d" (cpuid->edx)
|
||||||
: "a" (cpuid->function));
|
: "a" (cpuid->eax_in));
|
||||||
# else
|
# else
|
||||||
/* we need to avoid direct use of ebx for CPUID output as it is used
|
/* we need to avoid direct use of ebx for CPUID output as it is used
|
||||||
* for global offset table on i386 with -fPIC
|
* for global offset table on i386 with -fPIC
|
||||||
@ -1900,7 +1902,7 @@ cpuidCall(virCPUx86CPUID *cpuid)
|
|||||||
"=r" (cpuid->ebx),
|
"=r" (cpuid->ebx),
|
||||||
"=c" (cpuid->ecx),
|
"=c" (cpuid->ecx),
|
||||||
"=d" (cpuid->edx)
|
"=d" (cpuid->edx)
|
||||||
: "a" (cpuid->function)
|
: "a" (cpuid->eax_in)
|
||||||
: "cc");
|
: "cc");
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
@ -1917,7 +1919,7 @@ cpuidSet(uint32_t base, virCPUx86Data *data)
|
|||||||
max = cpuid.eax;
|
max = cpuid.eax;
|
||||||
|
|
||||||
for (i = base; i <= max; i++) {
|
for (i = base; i <= max; i++) {
|
||||||
cpuid.function = i;
|
cpuid.eax_in = i;
|
||||||
cpuidCall(&cpuid);
|
cpuidCall(&cpuid);
|
||||||
if (virCPUx86DataAddCPUID(data, &cpuid) < 0)
|
if (virCPUx86DataAddCPUID(data, &cpuid) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
typedef struct _virCPUx86CPUID virCPUx86CPUID;
|
typedef struct _virCPUx86CPUID virCPUx86CPUID;
|
||||||
struct _virCPUx86CPUID {
|
struct _virCPUx86CPUID {
|
||||||
uint32_t function;
|
uint32_t eax_in;
|
||||||
uint32_t eax;
|
uint32_t eax;
|
||||||
uint32_t ebx;
|
uint32_t ebx;
|
||||||
uint32_t ecx;
|
uint32_t ecx;
|
||||||
|
@ -6363,7 +6363,7 @@ qemuMonitorJSONParseCPUx86FeatureWord(virJSONValuePtr data,
|
|||||||
virCPUx86CPUID *cpuid)
|
virCPUx86CPUID *cpuid)
|
||||||
{
|
{
|
||||||
const char *reg;
|
const char *reg;
|
||||||
unsigned long long fun;
|
unsigned long long eax_in;
|
||||||
unsigned long long features;
|
unsigned long long features;
|
||||||
|
|
||||||
memset(cpuid, 0, sizeof(*cpuid));
|
memset(cpuid, 0, sizeof(*cpuid));
|
||||||
@ -6373,7 +6373,7 @@ qemuMonitorJSONParseCPUx86FeatureWord(virJSONValuePtr data,
|
|||||||
_("missing cpuid-register in CPU data"));
|
_("missing cpuid-register in CPU data"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (virJSONValueObjectGetNumberUlong(data, "cpuid-input-eax", &fun) < 0) {
|
if (virJSONValueObjectGetNumberUlong(data, "cpuid-input-eax", &eax_in) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("missing or invalid cpuid-input-eax in CPU data"));
|
_("missing or invalid cpuid-input-eax in CPU data"));
|
||||||
return -1;
|
return -1;
|
||||||
@ -6384,7 +6384,7 @@ qemuMonitorJSONParseCPUx86FeatureWord(virJSONValuePtr data,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpuid->function = fun;
|
cpuid->eax_in = eax_in;
|
||||||
if (STREQ(reg, "EAX")) {
|
if (STREQ(reg, "EAX")) {
|
||||||
cpuid->eax = features;
|
cpuid->eax = features;
|
||||||
} else if (STREQ(reg, "EBX")) {
|
} else if (STREQ(reg, "EBX")) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<cpudata arch='x86'>
|
<cpudata arch='x86'>
|
||||||
<cpuid function='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x078bfbfd'/>
|
<cpuid eax_in='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x078bfbfd'/>
|
||||||
<cpuid function='0x40000001' eax='0x0100003b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
<cpuid eax_in='0x40000001' eax='0x0100003b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
||||||
<cpuid function='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x28100800'/>
|
<cpuid eax_in='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x28100800'/>
|
||||||
</cpudata>
|
</cpudata>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<cpudata arch='x86'>
|
<cpudata arch='x86'>
|
||||||
<cpuid function='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x0f8bfbff'/>
|
<cpuid eax_in='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x0f8bfbff'/>
|
||||||
<cpuid function='0x00000007' eax='0x00000000' ebx='0x00000002' ecx='0x00000000' edx='0x00000000'/>
|
<cpuid eax_in='0x00000007' eax='0x00000000' ebx='0x00000002' ecx='0x00000000' edx='0x00000000'/>
|
||||||
<cpuid function='0x40000001' eax='0x0100007b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
<cpuid eax_in='0x40000001' eax='0x0100007b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
||||||
<cpuid function='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x2993fbff'/>
|
<cpuid eax_in='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x2993fbff'/>
|
||||||
</cpudata>
|
</cpudata>
|
||||||
|
Loading…
Reference in New Issue
Block a user