mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Add monitor APIs to fetch CPUID data from QEMU
The qemu monitor supports retrieval of actual CPUID bits presented to the guest using QMP monitor. Add APIs to extract these information and tests for them. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
committed by
Peter Krempa
parent
f80a11c921
commit
3afde0756f
@@ -0,0 +1,5 @@
|
||||
<cpudata arch='x86'>
|
||||
<cpuid function='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x078bfbfd'/>
|
||||
<cpuid function='0x40000001' eax='0x0100003b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
||||
<cpuid function='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x28100800'/>
|
||||
</cpudata>
|
||||
46
tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.json
Normal file
46
tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"return": [
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 2147483658,
|
||||
"features": 0
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EAX",
|
||||
"cpuid-input-eax": 1073741825,
|
||||
"features": 16777275
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 3221225473,
|
||||
"features": 0
|
||||
},
|
||||
{
|
||||
"cpuid-register": "ECX",
|
||||
"cpuid-input-eax": 2147483649,
|
||||
"features": 1
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 2147483649,
|
||||
"features": 672139264
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EBX",
|
||||
"cpuid-input-ecx": 0,
|
||||
"cpuid-input-eax": 7,
|
||||
"features": 0
|
||||
},
|
||||
{
|
||||
"cpuid-register": "ECX",
|
||||
"cpuid-input-eax": 1,
|
||||
"features": 2545558051
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 1,
|
||||
"features": 126614525
|
||||
}
|
||||
],
|
||||
"id": "libvirt-6"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<cpudata arch='x86'>
|
||||
<cpuid function='0x00000001' eax='0x00000000' ebx='0x00000000' ecx='0x97ba2223' edx='0x0f8bfbff'/>
|
||||
<cpuid function='0x00000007' eax='0x00000000' ebx='0x00000002' ecx='0x00000000' edx='0x00000000'/>
|
||||
<cpuid function='0x40000001' eax='0x0100007b' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
|
||||
<cpuid function='0x80000001' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x2993fbff'/>
|
||||
</cpudata>
|
||||
45
tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.json
Normal file
45
tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"return": [
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 2147483658,
|
||||
"features": 0
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EAX",
|
||||
"cpuid-input-eax": 1073741825,
|
||||
"features": 16777339
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 3221225473,
|
||||
"features": 0
|
||||
},
|
||||
{
|
||||
"cpuid-register": "ECX",
|
||||
"cpuid-input-eax": 2147483649,
|
||||
"features": 1
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 2147483649,
|
||||
"features": 697564159
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EBX",
|
||||
"cpuid-input-ecx": 0,
|
||||
"cpuid-input-eax": 7,
|
||||
"features": 2
|
||||
},
|
||||
{
|
||||
"cpuid-register": "ECX",
|
||||
"cpuid-input-eax": 1,
|
||||
"features": 2545558051
|
||||
},
|
||||
{
|
||||
"cpuid-register": "EDX",
|
||||
"cpuid-input-eax": 1,
|
||||
"features": 260832255
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user