qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 00/11] Add runnability info to query-cpu-definitions
@ 2016-09-29 21:14 Eduardo Habkost
  2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 01/11] tests: Add test case for x86 feature parsing compatibility Eduardo Habkost
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Eduardo Habkost @ 2016-09-29 21:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: dahi, Paolo Bonzini, Igor Mammedov, Jiri Denemark,
	Markus Armbruster, Richard Henderson, libvir-list,
	Michael Mueller, Christian Borntraeger, Cornelia Huck

This series extends query-cpu-definitions to include an extra
field: "unavailable-features". The new field can be used to find
out reasons that prevent the CPU model from running in the
current host.

This will return information based on the current machine and
accelerator only. In the future we may extend these mechanisms to
allow querying other machines and other accelerators without
restarting QEMU, but it will require some reorganization of
QEMU's main code.

To be able to implement this more cleanly, the series rework some
of the feature/property name code.

This series can be seen in the git branch at:
  https://github.com/ehabkost/qemu-hacks.git work/query-cpu-definitions-runnable-info

The series is based on my x86-next branch:
   https://github.com/ehabkost/qemu.git x86-next

Changes v3 -> v4:
* Removed patch "Define CPUID filtering functions before x86_cpu_list"
* New patch: "tests: Add test case for x86 feature parsing compatibility"
* New patch: "target-i386: Disable VME by default with TCG"
  * Disable VME by default on TCG to avoid returning bogus
    results for all CPU models in TCG mode
* New patch: "target-i386: Make plus_features/minus_features QOM-based"
* New patch: "target-i386: Remove underscores from property names"
* New patch: "target-i386: Register properties for feature aliases manually"
* New patch: "target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas"
* New patch: "target-i386: x86_cpu_load_features() function"
* On patch: "target-i386: Return runnability information on query-cpu-definitions"
  * Added code to handle unsupported XSAVE components cleanly
  * Use x86_cpu_load_features() function

Changes v2 -> v3:
* Small documentation reword
  * Suggested-by: Markus Armbruster <armbru@redhat.com>
* Create a x86_cpu_feature_name() function, to
  isolate the code that returns the property name

Changes v1 -> v2:
* Fixed documentation to say "(since 2.7)"
* Removed @runnable field, improved documentation

Example command output:

    { "return": [
        {
            "unavailable-features": [],
            "static": false,
            "name": "host"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "qemu64"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "qemu32"
        },
        {
            "unavailable-features": ["npt", "sse4a", "3dnow", "3dnowext", "fxsr-opt", "mmxext"],
            "static": false,
            "name": "phenom"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "pentium3"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "pentium2"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "pentium"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "n270"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "kvm64"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "kvm32"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "coreduo"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "core2duo"
        },
        {
            "unavailable-features": ["3dnow", "3dnowext", "mmxext"],
            "static": false,
            "name": "athlon"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Westmere"
        },
        {
            "unavailable-features": ["xgetbv1", "xsavec", "3dnowprefetch", "smap", "adx", "rdseed", "mpx", "rtm", "hle"],
            "static": false,
            "name": "Skylake-Client"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "SandyBridge"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Penryn"
        },
        {
            "unavailable-features": ["tbm", "fma4", "xop", "3dnowprefetch", "misalignsse", "sse4a"],
            "static": false,
            "name": "Opteron_G5"
        },
        {
            "unavailable-features": ["fma4", "xop", "3dnowprefetch", "misalignsse", "sse4a"],
            "static": false,
            "name": "Opteron_G4"
        },
        {
            "unavailable-features": ["misalignsse", "sse4a"],
            "static": false,
            "name": "Opteron_G3"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Opteron_G2"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Opteron_G1"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Nehalem"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "IvyBridge"
        },
        {
            "unavailable-features": ["rtm", "hle"],
            "static": false,
            "name": "Haswell"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Haswell-noTSX"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "Conroe"
        },
        {
            "unavailable-features": ["3dnowprefetch", "smap", "adx", "rdseed", "rtm", "hle"],
            "static": false,
            "name": "Broadwell"
        },
        {
            "unavailable-features": ["3dnowprefetch", "smap", "adx", "rdseed"],
            "static": false,
            "name": "Broadwell-noTSX"
        },
        {
            "unavailable-features": [],
            "static": false,
            "name": "486"
        }
    ]}

Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: Michael Mueller <mimu@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Jiri Denemark <jdenemar@redhat.com>
Cc: libvir-list@redhat.com

Eduardo Habkost (11):
  tests: Add test case for x86 feature parsing compatibility
  target-i386: List CPU models using subclass list
  target-i386: Disable VME by default with TCG
  target-i386: Make plus_features/minus_features QOM-based
  target-i386: Remove underscores from property names
  target-i386: Register properties for feature aliases manually
  target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas
  target-i386: Move warning code outside x86_cpu_filter_features()
  target-i386: x86_cpu_load_features() function
  qmp: Add runnability information to query-cpu-definitions
  target-i386: Return runnability information on query-cpu-definitions

 qapi-schema.json              |  23 +-
 target-i386/cpu-qom.h         |   4 +
 target-i386/cpu.c             | 489 +++++++++++++++++++++++++-----------------
 tests/test-x86-cpuid-compat.c |  39 ++++
 4 files changed, 362 insertions(+), 193 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-09-30 21:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-29 21:14 [Qemu-devel] [PATCH v4 00/11] Add runnability info to query-cpu-definitions Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 01/11] tests: Add test case for x86 feature parsing compatibility Eduardo Habkost
2016-09-29 21:31   ` Jonathan Neuschäfer
2016-09-30  7:55   ` Paolo Bonzini
2016-09-30  8:08     ` Jiri Denemark
2016-09-30 18:33     ` Eduardo Habkost
2016-09-30 21:07       ` Paolo Bonzini
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 02/11] target-i386: List CPU models using subclass list Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 03/11] target-i386: Disable VME by default with TCG Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 04/11] target-i386: Make plus_features/minus_features QOM-based Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from property names Eduardo Habkost
2016-09-30  7:29   ` Jiri Denemark
2016-09-30 13:42     ` Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 06/11] target-i386: Register properties for feature aliases manually Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 07/11] target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 08/11] target-i386: Move warning code outside x86_cpu_filter_features() Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 09/11] target-i386: x86_cpu_load_features() function Eduardo Habkost
2016-09-30  8:00   ` Paolo Bonzini
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 10/11] qmp: Add runnability information to query-cpu-definitions Eduardo Habkost
2016-09-29 21:14 ` [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions Eduardo Habkost
2016-09-30  8:02   ` Paolo Bonzini
2016-09-30 13:40     ` Eduardo Habkost

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).