qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 00/11] Add runnability info to query-cpu-definiti


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH v4 00/11] Add runnability info to query-cpu-definitions
Date: Thu, 29 Sep 2016 18:14:48 -0300

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 <address@hidden>
* 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 <address@hidden>
Cc: Michael Mueller <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: Jiri Denemark <address@hidden>
Cc: address@hidden

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]