From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, "Igor Mammedov" <imammedo@redhat.com>,
"Jiri Denemark" <jdenemar@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [RFC 0/5] X86CPU "feature-words" & "filtered-features" properties (v2)
Date: Thu, 4 Apr 2013 15:11:08 -0300 [thread overview]
Message-ID: <1365099073-21491-1-git-send-email-ehabkost@redhat.com> (raw)
Changes v2:
* Added "filtered-features" properties
* Removed the non-qapi version and kept only the qapi version of the code
* Moved the new types to qapi-schema.json instead of creating
cpu-qapi-schema.json
* Rebased on top of "feature words array" series
Git tree:
https://github.com/ehabkost/qemu-hacks/tree/work/cpu-raw-feature-props-v2
git://github.com/ehabkost/qemu-hacks.git work/cpu-raw-feature-props-v2
Description:
As the work to get X86CPU subclasses static properties defined is taking very
long to get reviewed and we risk not getting it finished in 1.5, I am sending
an alternative mechanism to allow libvirt to probe for CPU model information.
It's interesting to note that this alternative solution is actually _easier_ to
use for libvirt, because libvirt logic is already based on CPUID bit values, not
"feature names", so it should be very easy to convert the current libvirt code
that (incorrectly) query the host CPU directly for available features to instead
start QEMU with "-cpu host" and use the "feature-words" array information to
find out which CPU features are supported by the host.
The "feature-words" 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.
The "filtered-features" property will have two main use cases:
* Allowing libvirt to emulate the "check" & "enforce" flags while collecting
more detailted data about the missing features;
* Allowing libvirt to probe for CPU model information even if host features
are missing (it can simply combine the "feature-words" and
"filtered-features" values to get the full CPU model definition)
Example output:
$ ./QMP/qmp --path=/tmp/m qom-get --path=/machine/unattached/device[1] --property=feature-words
item[0].cpuid-register: EDX
item[0].cpuid-input-eax: 1
item[0].features: 126614521
item[1].cpuid-register: ECX
item[1].cpuid-input-eax: 1
item[1].features: 2155880449
item[2].cpuid-register: EBX
item[2].cpuid-input-eax: 7
item[2].features: 0
item[2].cpuid-input-ecx: 0
item[3].cpuid-register: EDX
item[3].cpuid-input-eax: 2147483649
item[3].features: 563346425
item[4].cpuid-register: ECX
item[4].cpuid-input-eax: 2147483649
item[4].features: 101
item[5].cpuid-register: EDX
item[5].cpuid-input-eax: 3221225473
item[5].features: 0
item[6].cpuid-register: EAX
item[6].cpuid-input-eax: 1073741825
item[6].features: 0
item[7].cpuid-register: EDX
item[7].cpuid-input-eax: 2147483658
item[7].features: 0
Eduardo Habkost (5):
target-i386: Add ECX information to FeatureWordInfo
target-i386: Add "feature-words" property
target-i386: Use FeatureWord loop on filter_features_for_kvm()
target-i386: Introduce X86CPU.filtered_features field
target-i386: Add "filtered-features" property to X86CPU
.gitignore | 2 +
Makefile.objs | 7 +++-
qapi-schema.json | 32 +++++++++++++++
target-i386/cpu-qom.h | 3 ++
target-i386/cpu.c | 110 +++++++++++++++++++++++++++++++++++---------------
5 files changed, 121 insertions(+), 33 deletions(-)
--
1.8.1.4
next reply other threads:[~2013-04-04 18:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 18:11 Eduardo Habkost [this message]
2013-04-04 18:11 ` [Qemu-devel] [RFC 1/5] target-i386: Add ECX information to FeatureWordInfo Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 2/5] target-i386: Add "feature-words" property Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 3/5] target-i386: Use FeatureWord loop on filter_features_for_kvm() Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 4/5] target-i386: Introduce X86CPU.filtered_features field Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 5/5] target-i386: Add "filtered-features" property to X86CPU Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365099073-21491-1-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=afaerber@suse.de \
--cc=imammedo@redhat.com \
--cc=jdenemar@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).