[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [libvirt] [PATCH qom-cpu 6/9] target-i386: Add "feature
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [libvirt] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property |
Date: |
Mon, 22 Apr 2013 14:37:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/22/2013 01:00 PM, Eduardo Habkost wrote:
> This property will be useful for libvirt, as libvirt already has logic
> based on low-level feature bits (not feature names), so it will be
> really easy to convert the current libvirt logic to something using the
> "feature-words" property.
>
> The property will have two main use cases:
> - Checking host capabilities, by checking the features of the "host"
> CPU model
> - Checking which features are enabled on each CPU model
>
> Example output:
>
> $ ./QMP/qmp --path=/tmp/m qom-get --path=/machine/unattached/device[1]
> --property=feature-words
If I'm not mistaken, the QMP counterpart that libvirt will use is:
{ "execute":"qom-get",
"arguments": { "path":"/machine/unattached/device[1]",
"property":"feature-words" } }
> item[0].cpuid-register: EDX
> item[0].cpuid-input-eax: 2147483658
> item[0].features: 0
> item[1].cpuid-register: EAX
> item[1].cpuid-input-eax: 1073741825
> item[1].features: 0
> item[2].cpuid-register: EDX
> item[2].cpuid-input-eax: 3221225473
> item[2].features: 0
> item[3].cpuid-register: ECX
> item[3].cpuid-input-eax: 2147483649
> item[3].features: 101
> item[4].cpuid-register: EDX
> item[4].cpuid-input-eax: 2147483649
> item[4].features: 563346425
> item[5].cpuid-register: EBX
> item[5].cpuid-input-eax: 7
> item[5].features: 0
> item[5].cpuid-input-ecx: 0
> item[6].cpuid-register: ECX
> item[6].cpuid-input-eax: 1
> item[6].features: 2155880449
> item[7].cpuid-register: EDX
> item[7].cpuid-input-eax: 1
> item[7].features: 126614521
And this would then be returned as a JSON array containing struct
members looking like this:
> +{ 'type': 'X86CPUFeatureWordInfo',
> + 'data': { 'cpuid-input-eax': 'int',
> + '*cpuid-input-ecx': 'int',
> + 'cpuid-register': 'X86CPURegister32',
> + 'features': 'int' } }
Looks reasonable (and better than what we've had in the past!), although
I'll let Jiri Denemark give final say on whether it meets libvirt's needs.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH qom-cpu 0/9] x86: feature words array (v11) + "feature-words" property, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 2/9] target-i386/kvm.c: Code formatting changes, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 1/9] target-i386: cleanup: Group together level, xlevel, xlevel2 fields, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 3/9] target-i386/cpu.c: Break lines so they don't get too long, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 5/9] target-i386: Add ECX information to FeatureWordInfo, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm(), Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property, Eduardo Habkost, 2013/04/22
- Re: [Qemu-devel] [libvirt] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property,
Eric Blake <=
- [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 9/9] target-i386: Add "filtered-features" property to X86CPU, Eduardo Habkost, 2013/04/22
- [Qemu-devel] [PATCH qom-cpu 4/9] target-i386: Replace cpuid_*features fields with a feature word array, Eduardo Habkost, 2013/04/22