[libvirt] [PATCH 0/8] qemu: Add support for unavailable-features

QEMU 2.8.0 adds support for unavailable-features in query-cpu-definitions reply. The unavailable-features array lists CPU features which prevent a corresponding CPU model from being usable on current host. It can only be used when all the unavailable features are disabled. Empty array means the CPU model can be used without modifications. Jiri Denemark (8): qemu: Add support for unavailable-features tests: Add QEMU 2.8.0 capabilities data qemu: Add flags to virQEMUCapsNewForBinaryInternal qemu: Enable KVM when probing capabilities qemu: Store loaded QEMU binary ctime in qemuCaps qemu: Unify cached caps validity checks qemu: Discard caps cache when KVM availability changes qemu: Ignore CPU usability when accel doesn't match src/conf/domain_capabilities.c | 11 +- src/conf/domain_capabilities.h | 3 +- src/qemu/qemu_capabilities.c | 196 +- src/qemu/qemu_capabilities.h | 11 +- src/qemu/qemu_capspriv.h | 9 +- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 27 +- src/qemu/qemu_process.c | 2 +- .../qemu_2.8.0-kvm-on-tcg.x86_64.xml | 116 + .../qemu_2.8.0-tcg-on-kvm.x86_64.xml | 116 + .../domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 116 + tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 116 + tests/domaincapstest.c | 16 + .../caps_2.8.0-tcg.x86_64.replies | 5239 ++++++++++++++++++++ .../qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml | 260 + .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 5176 +++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 260 + tests/qemucapabilitiestest.c | 2 + tests/qemucapsprobe.c | 18 +- tests/qemumonitorjsontest.c | 25 +- tests/qemuxml2argvtest.c | 12 +- tests/testutilsqemu.c | 3 +- 22 files changed, 11655 insertions(+), 80 deletions(-) create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml -- 2.10.2

QEMU 2.8.0 adds support for unavailable-features in query-cpu-definitions reply. The unavailable-features array lists CPU features which prevent a corresponding CPU model from being usable on current host. It can only be used when all the unavailable features are disabled. Empty array means the CPU model can be used without modifications. We can use unavailable-features for providing CPU model usability info in domain capabilities XML: <domainCapabilities> ... <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'> <model fallback='allow'>Skylake-Client</model> ... </mode> <mode name='custom' supported='yes'> <model usable='yes'>qemu64</model> <model usable='yes'>qemu32</model> <model usable='no'>phenom</model> <model usable='yes'>pentium3</model> <model usable='yes'>pentium2</model> <model usable='yes'>pentium</model> <model usable='yes'>n270</model> <model usable='yes'>kvm64</model> <model usable='yes'>kvm32</model> <model usable='yes'>coreduo</model> <model usable='yes'>core2duo</model> <model usable='no'>athlon</model> <model usable='yes'>Westmere</model> <model usable='yes'>Skylake-Client</model> ... </mode> </cpu> ... </domainCapabilities> Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 53 ++++++++++++++++++++++++++++++++++---------- src/qemu/qemu_capabilities.h | 6 +++-- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 27 ++++++++++++++++------ src/qemu/qemu_process.c | 2 +- tests/qemumonitorjsontest.c | 25 +++++++++++++++++---- tests/qemuxml2argvtest.c | 12 ++++++---- 7 files changed, 96 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7a8202a..9fce7a6 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2306,7 +2306,8 @@ const char *virQEMUCapsGetPackage(virQEMUCapsPtr qemuCaps) int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, const char **name, - size_t count) + size_t count, + virDomainCapsCPUUsable usable) { size_t i; @@ -2316,7 +2317,7 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, for (i = 0; i < count; i++) { if (virDomainCapsCPUModelsAdd(qemuCaps->cpuDefinitions, name[i], -1, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + usable) < 0) return -1; } @@ -2327,10 +2328,12 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, char ***names, - size_t *count) + size_t *count, + bool usable) { size_t i; char **models = NULL; + size_t n = 0; *count = 0; if (names) @@ -2344,17 +2347,21 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, for (i = 0; i < qemuCaps->cpuDefinitions->nmodels; i++) { virDomainCapsCPUModelPtr cpu = qemuCaps->cpuDefinitions->models + i; - if (models && VIR_STRDUP(models[i], cpu->name) < 0) - goto error; + if (!usable || + cpu->usable == VIR_DOMCAPS_CPU_USABLE_YES) { + if (models && VIR_STRDUP(models[n], cpu->name) < 0) + goto error; + n++; + } } if (names) *names = models; - *count = qemuCaps->cpuDefinitions->nmodels; + *count = n; return 0; error: - virStringFreeListCount(models, i); + virStringFreeListCount(models, n); return -1; } @@ -2713,9 +2720,15 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps, goto cleanup; for (i = 0; i < ncpus; i++) { + virDomainCapsCPUUsable usable = VIR_DOMCAPS_CPU_USABLE_UNKNOWN; + + if (cpus[i]->usable == VIR_TRISTATE_BOOL_YES) + usable = VIR_DOMCAPS_CPU_USABLE_YES; + else if (cpus[i]->usable == VIR_TRISTATE_BOOL_NO) + usable = VIR_DOMCAPS_CPU_USABLE_NO; + if (virDomainCapsCPUModelsAddSteal(qemuCaps->cpuDefinitions, - &cpus[i]->name, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + &cpus[i]->name, usable) < 0) goto cleanup; } @@ -3128,6 +3141,17 @@ virQEMUCapsLoadCache(virCapsPtr caps, goto cleanup; for (i = 0; i < n; i++) { + int usable = VIR_DOMCAPS_CPU_USABLE_UNKNOWN; + + if ((str = virXMLPropString(nodes[i], "usable")) && + (usable = virDomainCapsCPUUsableTypeFromString(str)) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unknown value '%s' in attribute 'usable'"), + str); + goto cleanup; + } + VIR_FREE(str); + if (!(str = virXMLPropString(nodes[i], "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing cpu name in QEMU capabilities cache")); @@ -3135,8 +3159,7 @@ virQEMUCapsLoadCache(virCapsPtr caps, } if (virDomainCapsCPUModelsAddSteal(qemuCaps->cpuDefinitions, - &str, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + &str, usable) < 0) goto cleanup; } } @@ -3301,7 +3324,13 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps, if (qemuCaps->cpuDefinitions) { for (i = 0; i < qemuCaps->cpuDefinitions->nmodels; i++) { virDomainCapsCPUModelPtr cpu = qemuCaps->cpuDefinitions->models + i; - virBufferEscapeString(&buf, "<cpu name='%s'/>\n", cpu->name); + virBufferEscapeString(&buf, "<cpu name='%s'", cpu->name); + if (cpu->usable) { + const char *usable; + usable = virDomainCapsCPUUsableTypeToString(cpu->usable); + virBufferAsprintf(&buf, " usable='%s'", usable); + } + virBufferAddLit(&buf, "/>\n"); } } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6e7a855..c77ba13 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -428,10 +428,12 @@ const char *virQEMUCapsGetPackage(virQEMUCapsPtr qemuCaps); unsigned int virQEMUCapsGetKVMVersion(virQEMUCapsPtr qemuCaps); int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, const char **name, - size_t count); + size_t count, + virDomainCapsCPUUsable usable); int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, char ***names, - size_t *count); + size_t *count, + bool usable); virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps); bool virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps, virCapsPtr caps, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c3133c4..f81de68 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -913,6 +913,7 @@ typedef struct _qemuMonitorCPUDefInfo qemuMonitorCPUDefInfo; typedef qemuMonitorCPUDefInfo *qemuMonitorCPUDefInfoPtr; struct _qemuMonitorCPUDefInfo { + virTristateBool usable; char *name; }; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 6c13832..e2dfb34 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4925,13 +4925,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup; - if (!(data = virJSONValueObjectGetArray(reply, "return"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("query-cpu-definitions reply was missing return data")); - goto cleanup; - } - - if ((n = virJSONValueArraySize(data)) < 0) { + if (!(data = virJSONValueObjectGetArray(reply, "return")) || + (n = virJSONValueArraySize(data)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("query-cpu-definitions reply data was not an array")); goto cleanup; @@ -4958,6 +4953,24 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, if (VIR_STRDUP(cpu->name, tmp) < 0) goto cleanup; + + if (virJSONValueObjectHasKey(child, "unavailable-features")) { + virJSONValuePtr blockers; + + blockers = virJSONValueObjectGetArray(child, + "unavailable-features"); + if (!blockers) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("unavailable-features in query-cpu-definitions " + "reply data was not an array")); + goto cleanup; + } + + if (virJSONValueArraySize(blockers) > 0) + cpu->usable = VIR_TRISTATE_BOOL_NO; + else + cpu->usable = VIR_TRISTATE_BOOL_YES; + } } ret = n; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1b67aee..50fb3de 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5057,7 +5057,7 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def, virQEMUCapsGetHostModel(qemuCaps)) < 0) goto cleanup; - if (virQEMUCapsGetCPUDefinitions(qemuCaps, &models, &nmodels) < 0 || + if (virQEMUCapsGetCPUDefinitions(qemuCaps, &models, &nmodels, false) < 0 || virCPUTranslate(def->os.arch, def->cpu, models, nmodels) < 0) goto cleanup; diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index d8fd958..7111bc8 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -432,10 +432,12 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) " \"name\": \"qemu64\" " " }, " " { " - " \"name\": \"Opteron_G4\" " + " \"name\": \"Opteron_G4\", " + " \"unavailable-features\": [\"vme\"]" " }, " " { " - " \"name\": \"Westmere\" " + " \"name\": \"Westmere\", " + " \"unavailable-features\": []" " } " " ]" "}") < 0) @@ -452,6 +454,13 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) } #define CHECK(i, wantname) \ + CHECK_FULL(i, wantname, VIR_TRISTATE_BOOL_ABSENT) + +#define CHECK_USABLE(i, wantname, usable) \ + CHECK_FULL(i, wantname, \ + usable ? VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO) + +#define CHECK_FULL(i, wantname, Usable) \ do { \ if (STRNEQ(cpus[i]->name, (wantname))) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ @@ -459,13 +468,21 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) cpus[i]->name, (wantname)); \ goto cleanup; \ } \ + if (cpus[i]->usable != (Usable)) { \ + virReportError(VIR_ERR_INTERNAL_ERROR, \ + "%s: expecting usable flag %d, got %d", \ + cpus[i]->name, Usable, cpus[i]->usable); \ + goto cleanup; \ + } \ } while (0) CHECK(0, "qemu64"); - CHECK(1, "Opteron_G4"); - CHECK(2, "Westmere"); + CHECK_USABLE(1, "Opteron_G4", false); + CHECK_USABLE(2, "Westmere", true); #undef CHECK +#undef CHECK_USABLE +#undef CHECK_FULL ret = 0; diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 90d6aaf..a3fb8e7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -303,20 +303,24 @@ testAddCPUModels(virQEMUCapsPtr caps, bool skipLegacy) if (ARCH_IS_X86(arch)) { if (virQEMUCapsAddCPUDefinitions(caps, x86Models, - ARRAY_CARDINALITY(x86Models)) < 0) + ARRAY_CARDINALITY(x86Models), + VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) return -1; if (!skipLegacy && virQEMUCapsAddCPUDefinitions(caps, x86LegacyModels, - ARRAY_CARDINALITY(x86LegacyModels)) < 0) + ARRAY_CARDINALITY(x86LegacyModels), + VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) return -1; } else if (ARCH_IS_ARM(arch)) { if (virQEMUCapsAddCPUDefinitions(caps, armModels, - ARRAY_CARDINALITY(armModels)) < 0) + ARRAY_CARDINALITY(armModels), + VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) return -1; } else if (ARCH_IS_PPC64(arch)) { if (virQEMUCapsAddCPUDefinitions(caps, ppc64Models, - ARRAY_CARDINALITY(ppc64Models)) < 0) + ARRAY_CARDINALITY(ppc64Models), + VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) return -1; } -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:30AM +0100, Jiri Denemark wrote:
QEMU 2.8.0 adds support for unavailable-features in query-cpu-definitions reply. The unavailable-features array lists CPU features which prevent a corresponding CPU model from being usable on current host. It can only be used when all the unavailable features are disabled. Empty array means the CPU model can be used without modifications.
We can use unavailable-features for providing CPU model usability info in domain capabilities XML:
<domainCapabilities> ... <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'> <model fallback='allow'>Skylake-Client</model> ... </mode> <mode name='custom' supported='yes'> <model usable='yes'>qemu64</model> <model usable='yes'>qemu32</model> <model usable='no'>phenom</model> <model usable='yes'>pentium3</model> <model usable='yes'>pentium2</model> <model usable='yes'>pentium</model> <model usable='yes'>n270</model> <model usable='yes'>kvm64</model> <model usable='yes'>kvm32</model> <model usable='yes'>coreduo</model> <model usable='yes'>core2duo</model> <model usable='no'>athlon</model> <model usable='yes'>Westmere</model> <model usable='yes'>Skylake-Client</model> ... </mode> </cpu> ... </domainCapabilities>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 53 ++++++++++++++++++++++++++++++++++---------- src/qemu/qemu_capabilities.h | 6 +++-- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 27 ++++++++++++++++------ src/qemu/qemu_process.c | 2 +- tests/qemumonitorjsontest.c | 25 +++++++++++++++++---- tests/qemuxml2argvtest.c | 12 ++++++---- 7 files changed, 96 insertions(+), 30 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7a8202a..9fce7a6 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2306,7 +2306,8 @@ const char *virQEMUCapsGetPackage(virQEMUCapsPtr qemuCaps) int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, const char **name, - size_t count) + size_t count, + virDomainCapsCPUUsable usable) { size_t i;
@@ -2316,7 +2317,7 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps,
for (i = 0; i < count; i++) { if (virDomainCapsCPUModelsAdd(qemuCaps->cpuDefinitions, name[i], -1, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + usable) < 0) return -1; }
@@ -2327,10 +2328,12 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, char ***names, - size_t *count) + size_t *count, + bool usable) { size_t i; char **models = NULL; + size_t n = 0;
*count = 0; if (names) @@ -2344,17 +2347,21 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
for (i = 0; i < qemuCaps->cpuDefinitions->nmodels; i++) { virDomainCapsCPUModelPtr cpu = qemuCaps->cpuDefinitions->models + i; - if (models && VIR_STRDUP(models[i], cpu->name) < 0) - goto error; + if (!usable || + cpu->usable == VIR_DOMCAPS_CPU_USABLE_YES) { + if (models && VIR_STRDUP(models[n], cpu->name) < 0) + goto error; + n++; + }
This function is called only on one place and the argument *usable* is always false and it's not used in any of the following patches in this series so there is no need to modify this function at all.
}
if (names) *names = models; - *count = qemuCaps->cpuDefinitions->nmodels; + *count = n; return 0;
error: - virStringFreeListCount(models, i); + virStringFreeListCount(models, n); return -1; }
@@ -2713,9 +2720,15 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps, goto cleanup;
for (i = 0; i < ncpus; i++) { + virDomainCapsCPUUsable usable = VIR_DOMCAPS_CPU_USABLE_UNKNOWN; + + if (cpus[i]->usable == VIR_TRISTATE_BOOL_YES) + usable = VIR_DOMCAPS_CPU_USABLE_YES; + else if (cpus[i]->usable == VIR_TRISTATE_BOOL_NO) + usable = VIR_DOMCAPS_CPU_USABLE_NO; + if (virDomainCapsCPUModelsAddSteal(qemuCaps->cpuDefinitions, - &cpus[i]->name, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + &cpus[i]->name, usable) < 0) goto cleanup; }
@@ -3128,6 +3141,17 @@ virQEMUCapsLoadCache(virCapsPtr caps, goto cleanup;
for (i = 0; i < n; i++) { + int usable = VIR_DOMCAPS_CPU_USABLE_UNKNOWN; + + if ((str = virXMLPropString(nodes[i], "usable")) && + (usable = virDomainCapsCPUUsableTypeFromString(str)) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unknown value '%s' in attribute 'usable'"), + str); + goto cleanup; + } + VIR_FREE(str); + if (!(str = virXMLPropString(nodes[i], "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing cpu name in QEMU capabilities cache")); @@ -3135,8 +3159,7 @@ virQEMUCapsLoadCache(virCapsPtr caps, }
if (virDomainCapsCPUModelsAddSteal(qemuCaps->cpuDefinitions, - &str, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0) + &str, usable) < 0) goto cleanup; } } @@ -3301,7 +3324,13 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps, if (qemuCaps->cpuDefinitions) { for (i = 0; i < qemuCaps->cpuDefinitions->nmodels; i++) { virDomainCapsCPUModelPtr cpu = qemuCaps->cpuDefinitions->models + i; - virBufferEscapeString(&buf, "<cpu name='%s'/>\n", cpu->name); + virBufferEscapeString(&buf, "<cpu name='%s'", cpu->name); + if (cpu->usable) { + const char *usable; + usable = virDomainCapsCPUUsableTypeToString(cpu->usable); + virBufferAsprintf(&buf, " usable='%s'", usable); + } + virBufferAddLit(&buf, "/>\n"); } }
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6e7a855..c77ba13 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -428,10 +428,12 @@ const char *virQEMUCapsGetPackage(virQEMUCapsPtr qemuCaps); unsigned int virQEMUCapsGetKVMVersion(virQEMUCapsPtr qemuCaps); int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, const char **name, - size_t count); + size_t count, + virDomainCapsCPUUsable usable); int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, char ***names, - size_t *count); + size_t *count, + bool usable); virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps); bool virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps, virCapsPtr caps, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c3133c4..f81de68 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -913,6 +913,7 @@ typedef struct _qemuMonitorCPUDefInfo qemuMonitorCPUDefInfo; typedef qemuMonitorCPUDefInfo *qemuMonitorCPUDefInfoPtr;
struct _qemuMonitorCPUDefInfo { + virTristateBool usable; char *name; };
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 6c13832..e2dfb34 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4925,13 +4925,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("query-cpu-definitions reply was missing return data")); - goto cleanup; - } - - if ((n = virJSONValueArraySize(data)) < 0) { + if (!(data = virJSONValueObjectGetArray(reply, "return")) || + (n = virJSONValueArraySize(data)) < 0) {
This change is unrelated, it would be probably better to put in into separate patch.
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("query-cpu-definitions reply data was not an array")); goto cleanup; @@ -4958,6 +4953,24 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
if (VIR_STRDUP(cpu->name, tmp) < 0) goto cleanup; + + if (virJSONValueObjectHasKey(child, "unavailable-features")) { + virJSONValuePtr blockers; + + blockers = virJSONValueObjectGetArray(child, + "unavailable-features"); + if (!blockers) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("unavailable-features in query-cpu-definitions " + "reply data was not an array")); + goto cleanup; + } + + if (virJSONValueArraySize(blockers) > 0) + cpu->usable = VIR_TRISTATE_BOOL_NO; + else + cpu->usable = VIR_TRISTATE_BOOL_YES; + } }
ret = n; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1b67aee..50fb3de 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5057,7 +5057,7 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def, virQEMUCapsGetHostModel(qemuCaps)) < 0) goto cleanup;
- if (virQEMUCapsGetCPUDefinitions(qemuCaps, &models, &nmodels) < 0 || + if (virQEMUCapsGetCPUDefinitions(qemuCaps, &models, &nmodels, false) < 0 || virCPUTranslate(def->os.arch, def->cpu, models, nmodels) < 0) goto cleanup;
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index d8fd958..7111bc8 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -432,10 +432,12 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) " \"name\": \"qemu64\" " " }, " " { " - " \"name\": \"Opteron_G4\" " + " \"name\": \"Opteron_G4\", " + " \"unavailable-features\": [\"vme\"]" " }, " " { " - " \"name\": \"Westmere\" " + " \"name\": \"Westmere\", " + " \"unavailable-features\": []" " } " " ]" "}") < 0) @@ -452,6 +454,13 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) }
#define CHECK(i, wantname) \ + CHECK_FULL(i, wantname, VIR_TRISTATE_BOOL_ABSENT) + +#define CHECK_USABLE(i, wantname, usable) \ + CHECK_FULL(i, wantname, \ + usable ? VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO) +
The ordering of macros is strange. The above macros uses CHECK_FULL so I would rather move them after the CHECK_FULL macro. ACK with the issues fixed. Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 116 + tests/domaincapstest.c | 4 + .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 5239 ++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 260 + tests/qemucapabilitiestest.c | 1 + 5 files changed, 5620 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml new file mode 100644 index 0000000..3acb29f --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-i440fx-2.8</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='yes'>athlon</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Haswell</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Broadwell</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index e70fa05..9c518d5 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -419,6 +419,10 @@ mymain(void) "/usr/bin/qemu-system-x86_64", NULL, "x86_64", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("2.8.0", "caps_2.8.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("2.6.0", "caps_2.6.0-gicv2", "/usr/bin/qemu-system-aarch64", NULL, "aarch64", VIR_DOMAIN_VIRT_KVM); diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies new file mode 100644 index 0000000..d32e8b3 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies @@ -0,0 +1,5239 @@ +{ + "QMP": { + "version": { + "qemu": { + "micro": 50, + "minor": 7, + "major": 2 + }, + "package": " (v2.7.0-1292-g45b567d-dirty)" + }, + "capabilities": [ + ] + } +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 7, + "major": 2 + }, + "package": " (v2.7.0-1292-g45b567d-dirty)" + }, + "id": "libvirt-2" +} + +{ + "return": { + "arch": "x86_64" + }, + "id": "libvirt-3" +} + +{ + "return": [ + { + "name": "xen-set-global-dirty-log" + }, + { + "name": "xen-save-devices-state" + }, + { + "name": "xen-load-devices-state" + }, + { + "name": "x-blockdev-remove-medium" + }, + { + "name": "x-blockdev-insert-medium" + }, + { + "name": "x-blockdev-del" + }, + { + "name": "x-blockdev-change" + }, + { + "name": "transaction" + }, + { + "name": "trace-event-set-state" + }, + { + "name": "trace-event-get-state" + }, + { + "name": "system_wakeup" + }, + { + "name": "system_reset" + }, + { + "name": "system_powerdown" + }, + { + "name": "stop" + }, + { + "name": "set_password" + }, + { + "name": "set_link" + }, + { + "name": "send-key" + }, + { + "name": "screendump" + }, + { + "name": "rtc-reset-reinjection" + }, + { + "name": "ringbuf-write" + }, + { + "name": "ringbuf-read" + }, + { + "name": "remove-fd" + }, + { + "name": "quit" + }, + { + "name": "query-vnc-servers" + }, + { + "name": "query-vnc" + }, + { + "name": "query-version" + }, + { + "name": "query-uuid" + }, + { + "name": "query-tpm-types" + }, + { + "name": "query-tpm-models" + }, + { + "name": "query-tpm" + }, + { + "name": "query-target" + }, + { + "name": "query-status" + }, + { + "name": "query-spice" + }, + { + "name": "query-rx-filter" + }, + { + "name": "query-rocker-ports" + }, + { + "name": "query-rocker-of-dpa-groups" + }, + { + "name": "query-rocker-of-dpa-flows" + }, + { + "name": "query-rocker" + }, + { + "name": "query-pci" + }, + { + "name": "query-named-block-nodes" + }, + { + "name": "query-name" + }, + { + "name": "query-migrate-parameters" + }, + { + "name": "query-migrate-capabilities" + }, + { + "name": "query-migrate-cache-size" + }, + { + "name": "query-migrate" + }, + { + "name": "query-mice" + }, + { + "name": "query-memory-devices" + }, + { + "name": "query-memdev" + }, + { + "name": "query-machines" + }, + { + "name": "query-kvm" + }, + { + "name": "query-iothreads" + }, + { + "name": "query-hotpluggable-cpus" + }, + { + "name": "query-fdsets" + }, + { + "name": "query-events" + }, + { + "name": "query-dump-guest-memory-capability" + }, + { + "name": "query-dump" + }, + { + "name": "query-cpus" + }, + { + "name": "query-cpu-definitions" + }, + { + "name": "query-commands" + }, + { + "name": "query-command-line-options" + }, + { + "name": "query-chardev-backends" + }, + { + "name": "query-chardev" + }, + { + "name": "query-blockstats" + }, + { + "name": "query-block-jobs" + }, + { + "name": "query-block" + }, + { + "name": "query-balloon" + }, + { + "name": "query-acpi-ospm-status" + }, + { + "name": "qom-set" + }, + { + "name": "qom-list-types" + }, + { + "name": "qom-list" + }, + { + "name": "qom-get" + }, + { + "name": "qmp_capabilities" + }, + { + "name": "pmemsave" + }, + { + "name": "object-del" + }, + { + "name": "object-add" + }, + { + "name": "netdev_del" + }, + { + "name": "nbd-server-stop" + }, + { + "name": "nbd-server-start" + }, + { + "name": "nbd-server-add" + }, + { + "name": "migrate_set_speed" + }, + { + "name": "migrate_set_downtime" + }, + { + "name": "migrate_cancel" + }, + { + "name": "migrate-start-postcopy" + }, + { + "name": "migrate-set-parameters" + }, + { + "name": "migrate-set-capabilities" + }, + { + "name": "migrate-set-cache-size" + }, + { + "name": "migrate-incoming" + }, + { + "name": "migrate" + }, + { + "name": "memsave" + }, + { + "name": "input-send-event" + }, + { + "name": "inject-nmi" + }, + { + "name": "human-monitor-command" + }, + { + "name": "getfd" + }, + { + "name": "expire_password" + }, + { + "name": "eject" + }, + { + "name": "dump-guest-memory" + }, + { + "name": "drive-mirror" + }, + { + "name": "drive-backup" + }, + { + "name": "device_del" + }, + { + "name": "device-list-properties" + }, + { + "name": "cpu-add" + }, + { + "name": "cpu" + }, + { + "name": "cont" + }, + { + "name": "closefd" + }, + { + "name": "client_migrate_info" + }, + { + "name": "chardev-remove" + }, + { + "name": "chardev-add" + }, + { + "name": "change-vnc-password" + }, + { + "name": "change-backing-file" + }, + { + "name": "change" + }, + { + "name": "blockdev-snapshot-sync" + }, + { + "name": "blockdev-snapshot-internal-sync" + }, + { + "name": "blockdev-snapshot-delete-internal-sync" + }, + { + "name": "blockdev-snapshot" + }, + { + "name": "blockdev-open-tray" + }, + { + "name": "blockdev-mirror" + }, + { + "name": "blockdev-close-tray" + }, + { + "name": "blockdev-change-medium" + }, + { + "name": "blockdev-backup" + }, + { + "name": "blockdev-add" + }, + { + "name": "block_set_io_throttle" + }, + { + "name": "block_resize" + }, + { + "name": "block_passwd" + }, + { + "name": "block-stream" + }, + { + "name": "block-set-write-threshold" + }, + { + "name": "block-job-set-speed" + }, + { + "name": "block-job-resume" + }, + { + "name": "block-job-pause" + }, + { + "name": "block-job-complete" + }, + { + "name": "block-job-cancel" + }, + { + "name": "block-dirty-bitmap-remove" + }, + { + "name": "block-dirty-bitmap-clear" + }, + { + "name": "block-dirty-bitmap-add" + }, + { + "name": "block-commit" + }, + { + "name": "balloon" + }, + { + "name": "add_client" + }, + { + "name": "add-fd" + }, + { + "name": "netdev_add" + }, + { + "name": "device_add" + }, + { + "name": "query-qmp-schema" + } + ], + "id": "libvirt-4" +} + +{ + "return": { + "fd": 14, + "fdset-id": 0 + }, + "id": "libvirt-5" +} + +{ + "id": "libvirt-6", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'bogus' not found" + } +} + +{ + "return": [ + { + "name": "WATCHDOG" + }, + { + "name": "WAKEUP" + }, + { + "name": "VSERPORT_CHANGE" + }, + { + "name": "VNC_INITIALIZED" + }, + { + "name": "VNC_DISCONNECTED" + }, + { + "name": "VNC_CONNECTED" + }, + { + "name": "SUSPEND_DISK" + }, + { + "name": "SUSPEND" + }, + { + "name": "STOP" + }, + { + "name": "SPICE_MIGRATE_COMPLETED" + }, + { + "name": "SPICE_INITIALIZED" + }, + { + "name": "SPICE_DISCONNECTED" + }, + { + "name": "SPICE_CONNECTED" + }, + { + "name": "SHUTDOWN" + }, + { + "name": "RTC_CHANGE" + }, + { + "name": "RESUME" + }, + { + "name": "RESET" + }, + { + "name": "QUORUM_REPORT_BAD" + }, + { + "name": "QUORUM_FAILURE" + }, + { + "name": "POWERDOWN" + }, + { + "name": "NIC_RX_FILTER_CHANGED" + }, + { + "name": "MIGRATION_PASS" + }, + { + "name": "MIGRATION" + }, + { + "name": "MEM_UNPLUG_ERROR" + }, + { + "name": "GUEST_PANICKED" + }, + { + "name": "DUMP_COMPLETED" + }, + { + "name": "DEVICE_TRAY_MOVED" + }, + { + "name": "DEVICE_DELETED" + }, + { + "name": "BLOCK_WRITE_THRESHOLD" + }, + { + "name": "BLOCK_JOB_READY" + }, + { + "name": "BLOCK_JOB_ERROR" + }, + { + "name": "BLOCK_JOB_COMPLETED" + }, + { + "name": "BLOCK_JOB_CANCELLED" + }, + { + "name": "BLOCK_IO_ERROR" + }, + { + "name": "BLOCK_IMAGE_CORRUPTED" + }, + { + "name": "BALLOON_CHANGE" + }, + { + "name": "ACPI_DEVICE_OST" + } + ], + "id": "libvirt-7" +} + +{ + "return": [ + { + "name": "vhost-vsock-pci" + }, + { + "name": "virtio-tablet-pci" + }, + { + "name": "pc-0.13-machine" + }, + { + "name": "generic-sdhci" + }, + { + "name": "i82551" + }, + { + "name": "i82550" + }, + { + "name": "Westmere-x86_64-cpu" + }, + { + "name": "pci-serial-4x" + }, + { + "name": "Penryn-x86_64-cpu" + }, + { + "name": "Haswell-x86_64-cpu" + }, + { + "name": "iothread" + }, + { + "name": "cfi.pflash01" + }, + { + "name": "Skylake-Client-x86_64-cpu" + }, + { + "name": "virtio-gpu-device" + }, + { + "name": "Opteron_G3-x86_64-cpu" + }, + { + "name": "e1000e" + }, + { + "name": "Broadwell-x86_64-cpu" + }, + { + "name": "piix3-ide" + }, + { + "name": "isa-parallel" + }, + { + "name": "megasas" + }, + { + "name": "i2c-bus" + }, + { + "name": "pc-q35-2.4-machine" + }, + { + "name": "vhost-vsock-device" + }, + { + "name": "usb-braille" + }, + { + "name": "mptsas1068" + }, + { + "name": "vmware-svga" + }, + { + "name": "PIIX3-xen" + }, + { + "name": "ccid-bus" + }, + { + "name": "scsi-cd" + }, + { + "name": "pc-i440fx-2.0-machine" + }, + { + "name": "isa-serial" + }, + { + "name": "usb-ehci" + }, + { + "name": "user-creatable" + }, + { + "name": "container" + }, + { + "name": "host-x86_64-cpu" + }, + { + "name": "qemu64-x86_64-cpu" + }, + { + "name": "pci-serial-2x" + }, + { + "name": "piix4-ide" + }, + { + "name": "scsi-generic" + }, + { + "name": "pc-1.0-machine" + }, + { + "name": "virtio-net-pci" + }, + { + "name": "hyperv-testdev" + }, + { + "name": "pc-dimm" + }, + { + "name": "pc-q35-2.8-machine" + }, + { + "name": "Haswell-noTSX-x86_64-cpu" + }, + { + "name": "pc-i440fx-2.1-machine" + }, + { + "name": "virtio-mouse-device" + }, + { + "name": "virtio-mouse-pci" + }, + { + "name": "isa-debugcon" + }, + { + "name": "AMDVI-PCI" + }, + { + "name": "ide-hd" + }, + { + "name": "virtio-vga" + }, + { + "name": "isa-ipmi-bt" + }, + { + "name": "rng-egd" + }, + { + "name": "isa-pcspk" + }, + { + "name": "isa-pit" + }, + { + "name": "pc-1.1-machine" + }, + { + "name": "filter-buffer" + }, + { + "name": "ich9-usb-ehci1" + }, + { + "name": "ich9-usb-ehci2" + }, + { + "name": "pxb-host" + }, + { + "name": "intel-iommu" + }, + { + "name": "irq" + }, + { + "name": "ipmi-bmc-sim" + }, + { + "name": "cirrus-vga" + }, + { + "name": "virtconsole" + }, + { + "name": "virtio-rng-pci" + }, + { + "name": "PCIE" + }, + { + "name": "vfio-amd-xgbe" + }, + { + "name": "pentium3-x86_64-cpu" + }, + { + "name": "qxl-vga" + }, + { + "name": "ioapic" + }, + { + "name": "kvm-pit" + }, + { + "name": "pc-i440fx-2.5-machine" + }, + { + "name": "filter-rewriter" + }, + { + "name": "qio-channel-buffer" + }, + { + "name": "vhost-scsi-pci" + }, + { + "name": "usb-kbd" + }, + { + "name": "xen-apic" + }, + { + "name": "usb-host" + }, + { + "name": "usb-bus" + }, + { + "name": "pc-i440fx-1.4-machine" + }, + { + "name": "PIIX3" + }, + { + "name": "486-x86_64-cpu" + }, + { + "name": "ES1370" + }, + { + "name": "gus" + }, + { + "name": "kvm-pci-assign" + }, + { + "name": "isa-applesmc" + }, + { + "name": "pc-i440fx-2.6-machine" + }, + { + "name": "xen-pci-passthrough" + }, + { + "name": "i82559er" + }, + { + "name": "q35-pcihost" + }, + { + "name": "usb-bt-dongle" + }, + { + "name": "e1000-82545em" + }, + { + "name": "e1000-82544gc" + }, + { + "name": "ipmi-interface" + }, + { + "name": "pc-i440fx-1.5-machine" + }, + { + "name": "or-irq" + }, + { + "name": "pc-0.14-machine" + }, + { + "name": "i6300esb" + }, + { + "name": "mc146818rtc" + }, + { + "name": "AC97" + }, + { + "name": "PIIX4_PM" + }, + { + "name": "piix4-usb-uhci" + }, + { + "name": "sysbus-ahci" + }, + { + "name": "virtio-tablet-device" + }, + { + "name": "filter-redirector" + }, + { + "name": "kvm-ioapic" + }, + { + "name": "pvpanic" + }, + { + "name": "core2duo-x86_64-cpu" + }, + { + "name": "tls-creds-x509" + }, + { + "name": "virtio-9p-pci" + }, + { + "name": "scsi-disk" + }, + { + "name": "acpi-device-interface" + }, + { + "name": "vfio-pci-igd-lpc-bridge" + }, + { + "name": "sb16" + }, + { + "name": "qemu-console" + }, + { + "name": "pc-0.15-machine" + }, + { + "name": "usb-mouse" + }, + { + "name": "xenfv-machine" + }, + { + "name": "filter-dump" + }, + { + "name": "virtio-blk-pci" + }, + { + "name": "piix3-usb-uhci" + }, + { + "name": "vfio-calxeda-xgmac" + }, + { + "name": "virtio-scsi-device" + }, + { + "name": "tpci200" + }, + { + "name": "virtio-9p-device" + }, + { + "name": "pc-q35-2.5-machine" + }, + { + "name": "SUNW,fdtwo" + }, + { + "name": "hda-output" + }, + { + "name": "i8257" + }, + { + "name": "Opteron_G4-x86_64-cpu" + }, + { + "name": "qio-channel-file" + }, + { + "name": "filter-mirror" + }, + { + "name": "virtio-mmio" + }, + { + "name": "intctrl" + }, + { + "name": "isa-i8259" + }, + { + "name": "System" + }, + { + "name": "pvscsi" + }, + { + "name": "amd-iommu" + }, + { + "name": "virtio-net-device" + }, + { + "name": "colo-compare" + }, + { + "name": "sd-bus" + }, + { + "name": "ib700" + }, + { + "name": "usb-hub" + }, + { + "name": "IvyBridge-x86_64-cpu" + }, + { + "name": "hda-duplex" + }, + { + "name": "igd-passthrough-i440FX" + }, + { + "name": "virtio-keyboard-pci" + }, + { + "name": "igd-passthrough-isa-bridge" + }, + { + "name": "nec-usb-xhci" + }, + { + "name": "input-linux" + }, + { + "name": "megasas-gen2" + }, + { + "name": "pci-ohci" + }, + { + "name": "virtio-keyboard-device" + }, + { + "name": "xio3130-downstream" + }, + { + "name": "isapc-machine" + }, + { + "name": "ipoctal232" + }, + { + "name": "ide-cd" + }, + { + "name": "tls-creds-anon" + }, + { + "name": "pc-i440fx-2.2-machine" + }, + { + "name": "isabus-bridge" + }, + { + "name": "isa-ipmi-kcs" + }, + { + "name": "memory-backend-file" + }, + { + "name": "qemu:memory-region" + }, + { + "name": "isa-ide" + }, + { + "name": "isa-vga" + }, + { + "name": "rng-random" + }, + { + "name": "rocker" + }, + { + "name": "ipmi-bmc-extern" + }, + { + "name": "hotplug-handler" + }, + { + "name": "kvm-i8259" + }, + { + "name": "i440FX-pcihost" + }, + { + "name": "qemu32-x86_64-cpu" + }, + { + "name": "tpm-tis" + }, + { + "name": "tpm-passthrough" + }, + { + "name": "pc-1.2-machine" + }, + { + "name": "isa-debug-exit" + }, + { + "name": "Opteron_G1-x86_64-cpu" + }, + { + "name": "pc-testdev" + }, + { + "name": "pc-0.10-machine" + }, + { + "name": "pc-i440fx-2.3-machine" + }, + { + "name": "xen-pvdevice" + }, + { + "name": "sga" + }, + { + "name": "pcnet" + }, + { + "name": "apic" + }, + { + "name": "ivshmem" + }, + { + "name": "hpet" + }, + { + "name": "adlib" + }, + { + "name": "qio-channel-command" + }, + { + "name": "lsi53c895a" + }, + { + "name": "pxb-bus" + }, + { + "name": "usb-audio" + }, + { + "name": "usb-wacom-tablet" + }, + { + "name": "virtio-mmio-bus" + }, + { + "name": "pc-0.11-machine" + }, + { + "name": "kvm-apic" + }, + { + "name": "phenom-x86_64-cpu" + }, + { + "name": "xensysdev" + }, + { + "name": "fw_cfg_io" + }, + { + "name": "usb-net" + }, + { + "name": "ioh3420" + }, + { + "name": "cs4231a" + }, + { + "name": "dc390" + }, + { + "name": "nvme" + }, + { + "name": "i82801b11-bridge" + }, + { + "name": "kvmvapic" + }, + { + "name": "usb-tablet" + }, + { + "name": "fw-path-provider" + }, + { + "name": "usb-ccid" + }, + { + "name": "sdhci-bus" + }, + { + "name": "pci-bridge-seat" + }, + { + "name": "mch" + }, + { + "name": "pc-i440fx-2.7-machine" + }, + { + "name": "vhost-scsi" + }, + { + "name": "isa-dma" + }, + { + "name": "tcg-accel" + }, + { + "name": "ich9-usb-uhci2" + }, + { + "name": "isa-cirrus-vga" + }, + { + "name": "usb-bot" + }, + { + "name": "ICH9-LPC" + }, + { + "name": "edu" + }, + { + "name": "accel" + }, + { + "name": "pxb-pcie-bus" + }, + { + "name": "pc-i440fx-1.6-machine" + }, + { + "name": "lsi53c810" + }, + { + "name": "kvmclock" + }, + { + "name": "loader" + }, + { + "name": "pc-i440fx-2.8-machine" + }, + { + "name": "ich9-usb-uhci4" + }, + { + "name": "virtio-serial-bus" + }, + { + "name": "nvdimm" + }, + { + "name": "virtio-balloon-pci" + }, + { + "name": "SandyBridge-x86_64-cpu" + }, + { + "name": "esp" + }, + { + "name": "virtio-balloon-device" + }, + { + "name": "x3130-upstream" + }, + { + "name": "ich9-usb-uhci5" + }, + { + "name": "qxl" + }, + { + "name": "intel-hda" + }, + { + "name": "ich9-usb-uhci6" + }, + { + "name": "pc-i440fx-1.7-machine" + }, + { + "name": "virtio-serial-device" + }, + { + "name": "ich9-usb-uhci3" + }, + { + "name": "ICH9 SMB" + }, + { + "name": "pxb-pcie" + }, + { + "name": "piix3-ide-xen" + }, + { + "name": "xen-accel" + }, + { + "name": "virtio-input-host-device" + }, + { + "name": "vmxnet3" + }, + { + "name": "IDE" + }, + { + "name": "VGA" + }, + { + "name": "pci-testdev" + }, + { + "name": "ich9-usb-uhci1" + }, + { + "name": "xenpv-machine" + }, + { + "name": "pci-bridge" + }, + { + "name": "SCSI" + }, + { + "name": "none-machine" + }, + { + "name": "sysbus-fdc" + }, + { + "name": "allwinner-ahci" + }, + { + "name": "n270-x86_64-cpu" + }, + { + "name": "pci-serial" + }, + { + "name": "pc-q35-2.6-machine" + }, + { + "name": "athlon-x86_64-cpu" + }, + { + "name": "virtio-rng-device" + }, + { + "name": "am53c974" + }, + { + "name": "ISA" + }, + { + "name": "i8042" + }, + { + "name": "kvm-accel" + }, + { + "name": "secret" + }, + { + "name": "i82559c" + }, + { + "name": "i82559b" + }, + { + "name": "i82559a" + }, + { + "name": "scsi-hd" + }, + { + "name": "qtest-accel" + }, + { + "name": "virtio-scsi-pci" + }, + { + "name": "hda-micro" + }, + { + "name": "scsi-block" + }, + { + "name": "rtl8139" + }, + { + "name": "vmmouse" + }, + { + "name": "ich9-intel-hda" + }, + { + "name": "pc-q35-2.7-machine" + }, + { + "name": "usb-mtp" + }, + { + "name": "ide-drive" + }, + { + "name": "qio-channel-websock" + }, + { + "name": "fw_cfg_mem" + }, + { + "name": "PCI" + }, + { + "name": "Opteron_G5-x86_64-cpu" + }, + { + "name": "vmport" + }, + { + "name": "coreduo-x86_64-cpu" + }, + { + "name": "virtio-serial-pci" + }, + { + "name": "xen-platform" + }, + { + "name": "pentium2-x86_64-cpu" + }, + { + "name": "virtio-input-host-pci" + }, + { + "name": "nmi" + }, + { + "name": "i82558b" + }, + { + "name": "i82558a" + }, + { + "name": "qemu,register" + }, + { + "name": "ne2k_isa" + }, + { + "name": "sdhci-pci" + }, + { + "name": "virtio-pci-bus" + }, + { + "name": "pxb" + }, + { + "name": "port92" + }, + { + "name": "e1000" + }, + { + "name": "Conroe-x86_64-cpu" + }, + { + "name": "kvm64-x86_64-cpu" + }, + { + "name": "qio-channel-tls" + }, + { + "name": "vt82c686b-usb-uhci" + }, + { + "name": "HDA" + }, + { + "name": "usb-storage" + }, + { + "name": "pc-1.3-machine" + }, + { + "name": "usb-serial" + }, + { + "name": "usb-redir" + }, + { + "name": "sysbus-ohci" + }, + { + "name": "i82801" + }, + { + "name": "pc-i440fx-2.4-machine" + }, + { + "name": "i82557b" + }, + { + "name": "usb-uas" + }, + { + "name": "Broadwell-noTSX-x86_64-cpu" + }, + { + "name": "Nehalem-x86_64-cpu" + }, + { + "name": "i82557c" + }, + { + "name": "memory-backend-ram" + }, + { + "name": "i82557a" + }, + { + "name": "virtserialport" + }, + { + "name": "i440FX" + }, + { + "name": "ne2k_pci" + }, + { + "name": "smbus-eeprom" + }, + { + "name": "i82562" + }, + { + "name": "ich9-ahci" + }, + { + "name": "isa-fdc" + }, + { + "name": "sd-card" + }, + { + "name": "pc-0.12-machine" + }, + { + "name": "kvm32-x86_64-cpu" + }, + { + "name": "Opteron_G2-x86_64-cpu" + }, + { + "name": "vfio-pci" + }, + { + "name": "IndustryPack" + }, + { + "name": "virtio-gpu-pci" + }, + { + "name": "ivshmem-plain" + }, + { + "name": "secondary-vga" + }, + { + "name": "ivshmem-doorbell" + }, + { + "name": "qio-channel-socket" + }, + { + "name": "pentium-x86_64-cpu" + }, + { + "name": "virtio-blk-device" + } + ], + "id": "libvirt-8" +} + +{ + "return": [ + { + "name": "secs", + "type": "uint32" + }, + { + "name": "request-merging", + "description": "on/off", + "type": "bool" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "heads", + "type": "uint32" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "scsi", + "description": "on/off", + "type": "bool" + }, + { + "name": "cyls", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "iothread", + "type": "link<iothread>" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "class", + "type": "uint32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "virtio-backend", + "type": "child<virtio-blk-device>" + }, + { + "name": "config-wce", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "num-queues", + "type": "uint16" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-9" +} + +{ + "return": [ + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-txtimer", + "type": "uint32" + }, + { + "name": "guest_ufo", + "description": "on/off", + "type": "bool" + }, + { + "name": "mq", + "description": "on/off", + "type": "bool" + }, + { + "name": "status", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_ecn", + "description": "on/off", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "tx", + "type": "str" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "ctrl_rx_extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "mac", + "description": "Ethernet 6-byte MAC Address, example: 52:54:00:12:34:56", + "type": "str" + }, + { + "name": "rx_queue_size", + "type": "uint16" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_tso6", + "description": "on/off", + "type": "bool" + }, + { + "name": "gso", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_ecn", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_rx", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_tso4", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "guest_csum", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_announce", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-txburst", + "type": "int32" + }, + { + "name": "ctrl_vlan", + "description": "on/off", + "type": "bool" + }, + { + "name": "csum", + "description": "on/off", + "type": "bool" + }, + { + "name": "mrg_rxbuf", + "description": "on/off", + "type": "bool" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_guest_offloads", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_tso6", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "ctrl_mac_addr", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "vlan", + "description": "Integer VLAN id to connect to", + "type": "int32" + }, + { + "name": "host_tso4", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_ufo", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child<virtio-net-device>" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "netdev", + "description": "ID of a netdev to use as a backend", + "type": "str" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-10" +} + +{ + "return": [ + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "cmd_per_lun", + "type": "uint32" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "num_queues", + "type": "uint32" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "hotplug", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_sectors", + "type": "uint32" + }, + { + "name": "param_change", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "iothread", + "type": "link<iothread>" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "virtio-backend", + "type": "child<virtio-scsi-device>" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-11" +} + +{ + "id": "libvirt-12", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-blk-ccw' not found" + } +} + +{ + "id": "libvirt-13", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-net-ccw' not found" + } +} + +{ + "id": "libvirt-14", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-scsi-ccw' not found" + } +} + +{ + "id": "libvirt-15", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-blk-s390' not found" + } +} + +{ + "id": "libvirt-16", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-net-s390' not found" + } +} + +{ + "id": "libvirt-17", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'pci-assign' not found" + } +} + +{ + "return": [ + { + "name": "share_intx", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "host", + "description": "Address (bus/device/function) of the host device, example: 04:10.0", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "configfd", + "type": "str" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "prefer_msi", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-18" +} + +{ + "return": [ + { + "name": "x-pci-sub-device-id", + "type": "uint32" + }, + { + "name": "x-no-kvm-msi", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-igd-opregion", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-vga", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pci-vendor-id", + "type": "uint32" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "x-req", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-igd-gms", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "x-no-kvm-intx", + "type": "bool" + }, + { + "name": "x-pci-device-id", + "type": "uint32" + }, + { + "name": "host", + "description": "Address (bus/device/function) of the host device, example: 04:10.0", + "type": "str" + }, + { + "name": "x-no-kvm-msix", + "type": "bool" + }, + { + "name": "x-intx-mmap-timeout-ms", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "x-pci-sub-vendor-id", + "type": "uint32" + }, + { + "name": "sysfsdev", + "type": "str" + }, + { + "name": "x-no-mmap", + "type": "bool" + } + ], + "id": "libvirt-19" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "port_index", + "type": "uint16" + }, + { + "name": "dpofua", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "lun", + "type": "uint32" + }, + { + "name": "max_unmap_size", + "type": "uint64" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "port_wwn", + "type": "uint64" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "scsi-id", + "type": "uint32" + }, + { + "name": "channel", + "type": "uint32" + }, + { + "name": "vendor", + "type": "str" + }, + { + "name": "wwn", + "type": "uint64" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "removable", + "description": "on/off", + "type": "bool" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "ver", + "type": "str" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "max_io_size", + "type": "uint64" + } + ], + "id": "libvirt-20" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "unit", + "type": "uint32" + }, + { + "name": "wwn", + "type": "uint64" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "model", + "type": "str" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "ver", + "type": "str" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + } + ], + "id": "libvirt-21" +} + +{ + "return": [ + { + "name": "memory-hotplug-support", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "acpi-pci-hotplug-with-bridge-support", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "disable_s4", + "type": "uint8" + }, + { + "name": "disable_s3", + "type": "uint8" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "s4_val", + "type": "uint8" + }, + { + "name": "smb_io_base", + "type": "uint32" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-22" +} + +{ + "return": [ + { + "name": "filter", + "type": "str" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "debug", + "type": "uint8" + }, + { + "name": "streams", + "type": "bool" + }, + { + "name": "chardev", + "description": "ID of a chardev to use as a backend", + "type": "str" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "attached", + "type": "bool" + } + ], + "id": "libvirt-23" +} + +{ + "return": [ + { + "name": "isobufs", + "type": "uint32" + }, + { + "name": "hostaddr", + "type": "uint32" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "productid", + "type": "uint32" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "isobsize", + "type": "uint32" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "vendorid", + "type": "uint32" + }, + { + "name": "pipeline", + "description": "on/off", + "type": "bool" + }, + { + "name": "attached", + "type": "bool" + }, + { + "name": "hostport", + "type": "str" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "loglevel", + "type": "uint32" + }, + { + "name": "hostbus", + "type": "uint32" + } + ], + "id": "libvirt-24" +} + +{ + "return": [ + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "lun", + "type": "uint32" + }, + { + "name": "channel", + "type": "uint32" + }, + { + "name": "scsi-id", + "type": "uint32" + } + ], + "id": "libvirt-25" +} + +{ + "return": [ + { + "name": "short_root_bus", + "type": "uint32" + }, + { + "name": "pci-conf-idx[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pci-hole64-end", + "type": "int" + }, + { + "name": "pci-hole-end", + "type": "int" + }, + { + "name": "pci-hole-start", + "type": "int" + }, + { + "name": "pci-hole64-start", + "type": "int" + }, + { + "name": "pci-hole64-size", + "type": "size" + }, + { + "name": "pci-conf-data[0]", + "type": "child<qemu:memory-region>" + } + ], + "id": "libvirt-26" +} + +{ + "return": [ + { + "name": "short_root_bus", + "type": "uint32" + }, + { + "name": "system-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-conf-idx[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pcie-mmcfg-mmio[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pci-hole64-start", + "type": "int" + }, + { + "name": "io-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-hole64-end", + "type": "int" + }, + { + "name": "pci-hole-end", + "type": "int" + }, + { + "name": "above-4g-mem-size", + "type": "size" + }, + { + "name": "below-4g-mem-size", + "type": "size" + }, + { + "name": "ram-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-hole-start", + "type": "int" + }, + { + "name": "MCFG", + "type": "uint64" + }, + { + "name": "mch", + "type": "child<mch>" + }, + { + "name": "pci-hole64-size", + "type": "size" + }, + { + "name": "pci-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-conf-data[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "mcfg_size", + "type": "int" + } + ], + "id": "libvirt-27" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "attached", + "type": "bool" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "removable", + "description": "on/off", + "type": "bool" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + } + ], + "id": "libvirt-28" +} + +{ + "return": [ + { + "name": "iobase", + "type": "uint32" + }, + { + "name": "lost_tick_policy", + "type": "LostTickPolicy" + } + ], + "id": "libvirt-29" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "mmio", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "qemu-extended-regs", + "description": "on/off", + "type": "bool" + }, + { + "name": "big-endian-framebuffer", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-30" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-31" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "ram_size_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "debug", + "type": "uint32" + }, + { + "name": "vram_size_mb", + "type": "uint32" + }, + { + "name": "revision", + "type": "uint32" + }, + { + "name": "ram_size", + "type": "uint32" + }, + { + "name": "vram64_size_mb", + "type": "uint32" + }, + { + "name": "guestdebug", + "type": "uint32" + }, + { + "name": "vram_size", + "type": "uint64" + }, + { + "name": "surfaces", + "type": "int32" + }, + { + "name": "max_outputs", + "type": "uint16" + }, + { + "name": "cmdlog", + "type": "uint32" + } + ], + "id": "libvirt-32" +} + +{ + "return": [ + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "stats", + "description": "on/off", + "type": "bool" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "virgl", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "virtio-backend", + "type": "child<virtio-gpu-device>" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_outputs", + "type": "uint32" + }, + { + "name": "rombar", + "type": "uint32" + } + ], + "id": "libvirt-33" +} + +{ + "return": [ + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "stats", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_outputs", + "type": "uint32" + }, + { + "name": "virgl", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "memory-hotplug-support", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "sci_int", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "gpe0_blk_len", + "type": "uint32" + }, + { + "name": "pm_io_base", + "type": "uint32" + }, + { + "name": "noreboot", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable_s4", + "type": "uint8" + }, + { + "name": "acpi_disable_cmd", + "type": "uint8" + }, + { + "name": "cpu-hotplug-legacy", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "disable_s3", + "type": "uint8" + }, + { + "name": "s4_val", + "type": "uint8" + }, + { + "name": "acpi_enable_cmd", + "type": "uint8" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "enable_tco", + "type": "bool" + }, + { + "name": "gpe0_blk", + "type": "uint32" + } + ], + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "class", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats", + "type": "guest statistics" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "virtio-backend", + "type": "child<virtio-balloon-device>" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats-polling-interval", + "type": "int" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "deflate-on-oom", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + +{ + "id": "libvirt-37", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-balloon-ccw' not found" + } +} + +{ + "return": [ + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats", + "type": "guest statistics" + }, + { + "name": "guest-stats-polling-interval", + "type": "int" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "deflate-on-oom", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "intrs", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "msix", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "msi", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "superspeed-ports-first", + "description": "on/off", + "type": "bool" + }, + { + "name": "streams", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "force-pcie-endcap", + "description": "on/off", + "type": "bool" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "p3", + "type": "uint32" + }, + { + "name": "p2", + "type": "uint32" + }, + { + "name": "slots", + "type": "uint32" + } + ], + "id": "libvirt-39" +} + +{ + "return": [ + { + "hotpluggable-cpus": true, + "name": "pc-0.12", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.3", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": false, + "name": "none", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": false, + "name": "xenpv", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.8", + "is-default": true, + "cpu-max": 255, + "alias": "pc" + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.11", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.3", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.10", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.2", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.2", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "isapc", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "xenfv", + "cpu-max": 128 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.15", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.14", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.1", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.1", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.8", + "cpu-max": 255, + "alias": "q35" + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.0", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.0", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.13", + "cpu-max": 255 + } + ], + "id": "libvirt-40" +} + +{ + "return": [ + { + "name": "host", + "unavailable-features": [ + "kvm" + ], + "static": false + }, + { + "name": "qemu64", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "qemu32", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "phenom", + "unavailable-features": [ + "fxsr-opt", + "npt" + ], + "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": [ + ], + "static": false + }, + { + "name": "athlon", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Westmere", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Skylake-Client", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm", + "rdseed", + "3dnowprefetch", + "xsavec" + ], + "static": false + }, + { + "name": "SandyBridge", + "unavailable-features": [ + "x2apic", + "tsc-deadline", + "avx" + ], + "static": false + }, + { + "name": "Penryn", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Opteron_G5", + "unavailable-features": [ + "fma", + "avx", + "f16c", + "misalignsse", + "3dnowprefetch", + "xop", + "fma4", + "tbm" + ], + "static": false + }, + { + "name": "Opteron_G4", + "unavailable-features": [ + "avx", + "misalignsse", + "3dnowprefetch", + "xop", + "fma4" + ], + "static": false + }, + { + "name": "Opteron_G3", + "unavailable-features": [ + "misalignsse" + ], + "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": [ + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand" + ], + "static": false + }, + { + "name": "Haswell", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm" + ], + "static": false + }, + { + "name": "Haswell-noTSX", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "avx2", + "invpcid" + ], + "static": false + }, + { + "name": "Conroe", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Broadwell", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm", + "rdseed", + "3dnowprefetch" + ], + "static": false + }, + { + "name": "Broadwell-noTSX", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "avx2", + "invpcid", + "rdseed", + "3dnowprefetch" + ], + "static": false + }, + { + "name": "486", + "unavailable-features": [ + ], + "static": false + } + ], + "id": "libvirt-41" +} + +{ + "return": { + "enabled": false, + "present": true + }, + "id": "libvirt-42" +} + +{ + "return": [ + "tpm-tis" + ], + "id": "libvirt-43" +} + +{ + "return": [ + "passthrough" + ], + "id": "libvirt-44" +} + +{ + "return": [ + { + "parameters": [ + { + "name": "non-adaptive", + "type": "boolean" + }, + { + "name": "lossy", + "type": "boolean" + }, + { + "name": "acl", + "type": "boolean" + }, + { + "name": "x509verify", + "type": "string" + }, + { + "name": "tls", + "type": "boolean" + }, + { + "name": "sasl", + "type": "boolean" + }, + { + "name": "key-delay-ms", + "type": "number" + }, + { + "name": "lock-key-sync", + "type": "boolean" + }, + { + "name": "reverse", + "type": "boolean" + }, + { + "name": "password", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "to", + "type": "number" + }, + { + "name": "connections", + "type": "number" + }, + { + "name": "head", + "type": "number" + }, + { + "name": "display", + "type": "string" + }, + { + "name": "share", + "type": "string" + }, + { + "name": "x509", + "type": "string" + }, + { + "name": "tls-creds", + "type": "string" + }, + { + "name": "websocket", + "type": "string" + }, + { + "name": "vnc", + "type": "string" + } + ], + "option": "vnc" + }, + { + "parameters": [ + { + "name": "seamless-migration", + "type": "boolean" + }, + { + "name": "playback-compression", + "type": "boolean" + }, + { + "name": "agent-mouse", + "type": "boolean" + }, + { + "name": "streaming-video", + "type": "string" + }, + { + "name": "zlib-glz-wan-compression", + "type": "string" + }, + { + "name": "jpeg-wan-compression", + "type": "string" + }, + { + "name": "image-compression", + "type": "string" + }, + { + "name": "plaintext-channel", + "type": "string" + }, + { + "name": "tls-channel", + "type": "string" + }, + { + "name": "tls-ciphers", + "type": "string" + }, + { + "name": "x509-dh-key-file", + "type": "string" + }, + { + "name": "x509-cacert-file", + "type": "string" + }, + { + "name": "x509-cert-file", + "type": "string" + }, + { + "name": "x509-key-password", + "type": "string" + }, + { + "name": "x509-key-file", + "type": "string" + }, + { + "name": "x509-dir", + "type": "string" + }, + { + "name": "sasl", + "type": "boolean" + }, + { + "name": "disable-agent-file-xfer", + "type": "boolean" + }, + { + "name": "disable-copy-paste", + "type": "boolean" + }, + { + "name": "disable-ticketing", + "type": "boolean" + }, + { + "name": "password", + "type": "string" + }, + { + "name": "unix", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "addr", + "type": "string" + }, + { + "name": "tls-port", + "type": "number" + }, + { + "name": "port", + "type": "number" + } + ], + "option": "spice" + }, + { + "parameters": [ + ], + "option": "smbios" + }, + { + "parameters": [ + ], + "option": "acpi" + }, + { + "parameters": [ + { + "name": "sock_fd", + "type": "number" + }, + { + "name": "socket", + "type": "string" + }, + { + "name": "readonly", + "type": "boolean" + }, + { + "name": "writeout", + "type": "string" + }, + { + "name": "security_model", + "type": "string" + }, + { + "name": "mount_tag", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "fsdriver", + "type": "string" + } + ], + "option": "virtfs" + }, + { + "parameters": [ + { + "name": "sock_fd", + "type": "number" + }, + { + "name": "socket", + "type": "string" + }, + { + "name": "readonly", + "type": "boolean" + }, + { + "name": "writeout", + "type": "string" + }, + { + "name": "security_model", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "fsdriver", + "type": "string" + } + ], + "option": "fsdev" + }, + { + "parameters": [ + { + "name": "timeout", + "help": "Request timeout in seconds (default 0 = no timeout)", + "type": "number" + }, + { + "name": "initiator-name", + "help": "Initiator iqn name to use when connecting", + "type": "string" + }, + { + "name": "header-digest", + "help": "HeaderDigest setting. {CRC32C|CRC32C-NONE|NONE-CRC32C|NONE}", + "type": "string" + }, + { + "name": "password-secret", + "help": "ID of the secret providing password for CHAP authentication to target", + "type": "string" + }, + { + "name": "password", + "help": "password for CHAP authentication to target", + "type": "string" + }, + { + "name": "user", + "help": "username for CHAP authentication to target", + "type": "string" + } + ], + "option": "iscsi" + }, + { + "parameters": [ + { + "name": "string", + "help": "Sets content of the blob to be inserted from a string", + "type": "string" + }, + { + "name": "file", + "help": "Sets the name of the file from which\nthe fw_cfg blob will be loaded", + "type": "string" + }, + { + "name": "name", + "help": "Sets the fw_cfg name of the blob to be inserted", + "type": "string" + } + ], + "option": "fw_cfg" + }, + { + "parameters": [ + { + "name": "arg", + "type": "string" + }, + { + "name": "target", + "type": "string" + }, + { + "name": "enable", + "type": "boolean" + } + ], + "option": "semihosting-config" + }, + { + "parameters": [ + { + "name": "rrfile", + "type": "string" + }, + { + "name": "rr", + "type": "string" + }, + { + "name": "sleep", + "type": "boolean" + }, + { + "name": "align", + "type": "boolean" + }, + { + "name": "shift", + "type": "string" + } + ], + "option": "icount" + }, + { + "parameters": [ + ], + "option": "numa" + }, + { + "parameters": [ + { + "name": "debug-threads", + "help": "When enabled, name the individual threads; defaults off.\nNOTE: The thread names are for debugging and not a\nstable API.", + "type": "boolean" + }, + { + "name": "process", + "help": "Sets the name of the QEMU process, as shown in top etc", + "type": "string" + }, + { + "name": "guest", + "help": "Sets the name of the guest.\nThis name will be displayed in the SDL window caption.\nThe name will also be used for the VNC server", + "type": "string" + } + ], + "option": "name" + }, + { + "parameters": [ + { + "name": "timestamp", + "type": "boolean" + } + ], + "option": "msg" + }, + { + "parameters": [ + { + "name": "mlock", + "type": "boolean" + } + ], + "option": "realtime" + }, + { + "parameters": [ + ], + "option": "tpmdev" + }, + { + "parameters": [ + ], + "option": "object" + }, + { + "parameters": [ + { + "name": "opaque", + "help": "free-form string used to describe fd", + "type": "string" + }, + { + "name": "set", + "help": "ID of the fd set to add fd to", + "type": "number" + }, + { + "name": "fd", + "help": "file descriptor of which a duplicate is added to fd set", + "type": "number" + } + ], + "option": "add-fd" + }, + { + "parameters": [ + { + "name": "enable", + "type": "boolean" + } + ], + "option": "sandbox" + }, + { + "parameters": [ + { + "name": "strict", + "type": "boolean" + }, + { + "name": "reboot-timeout", + "type": "string" + }, + { + "name": "splash-time", + "type": "string" + }, + { + "name": "splash", + "type": "string" + }, + { + "name": "menu", + "type": "boolean" + }, + { + "name": "once", + "type": "string" + }, + { + "name": "order", + "type": "string" + } + ], + "option": "boot-opts" + }, + { + "parameters": [ + { + "name": "maxcpus", + "type": "number" + }, + { + "name": "threads", + "type": "number" + }, + { + "name": "cores", + "type": "number" + }, + { + "name": "sockets", + "type": "number" + }, + { + "name": "cpus", + "type": "number" + } + ], + "option": "smp-opts" + }, + { + "parameters": [ + { + "name": "maxmem", + "type": "size" + }, + { + "name": "slots", + "type": "number" + }, + { + "name": "size", + "type": "size" + } + ], + "option": "memory" + }, + { + "parameters": [ + { + "name": "dea-key-wrap", + "help": "enable/disable DEA key wrapping using the CPACF wrapping key", + "type": "boolean" + }, + { + "name": "aes-key-wrap", + "help": "enable/disable AES key wrapping using the CPACF wrapping key", + "type": "boolean" + }, + { + "name": "suppress-vmdesc", + "help": "Set on to disable self-describing migration", + "type": "boolean" + }, + { + "name": "iommu", + "help": "Set on/off to enable/disable Intel IOMMU (VT-d)", + "type": "boolean" + }, + { + "name": "firmware", + "help": "firmware image", + "type": "string" + }, + { + "name": "usb", + "help": "Set on/off to enable/disable usb", + "type": "boolean" + }, + { + "name": "mem-merge", + "help": "enable/disable memory merge support", + "type": "boolean" + }, + { + "name": "dump-guest-core", + "help": "Include guest memory in a core dump", + "type": "boolean" + }, + { + "name": "dt_compatible", + "help": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "phandle_start", + "help": "The first phandle ID we may generate dynamically", + "type": "number" + }, + { + "name": "dumpdtb", + "help": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "dtb", + "help": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "append", + "help": "Linux kernel command line", + "type": "string" + }, + { + "name": "initrd", + "help": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "kernel", + "help": "Linux kernel image file", + "type": "string" + }, + { + "name": "kvm_shadow_mem", + "help": "KVM shadow MMU size", + "type": "size" + }, + { + "name": "kernel_irqchip", + "help": "use KVM in-kernel irqchip", + "type": "boolean" + }, + { + "name": "accel", + "help": "accelerator list", + "type": "string" + }, + { + "name": "type", + "help": "emulated machine", + "type": "string" + } + ], + "option": "machine" + }, + { + "parameters": [ + { + "name": "romfile", + "type": "string" + }, + { + "name": "bootindex", + "type": "number" + } + ], + "option": "option-rom" + }, + { + "parameters": [ + { + "name": "file", + "type": "string" + }, + { + "name": "events", + "type": "string" + }, + { + "name": "enable", + "type": "string" + } + ], + "option": "trace" + }, + { + "parameters": [ + { + "name": "pretty", + "type": "boolean" + }, + { + "name": "default", + "type": "boolean" + }, + { + "name": "chardev", + "type": "string" + }, + { + "name": "mode", + "type": "string" + } + ], + "option": "mon" + }, + { + "parameters": [ + { + "name": "value", + "type": "string" + }, + { + "name": "property", + "type": "string" + }, + { + "name": "driver", + "type": "string" + } + ], + "option": "global" + }, + { + "parameters": [ + { + "name": "driftfix", + "type": "string" + }, + { + "name": "clock", + "type": "string" + }, + { + "name": "base", + "type": "string" + } + ], + "option": "rtc" + }, + { + "parameters": [ + ], + "option": "net" + }, + { + "parameters": [ + ], + "option": "netdev" + }, + { + "parameters": [ + ], + "option": "device" + }, + { + "parameters": [ + { + "name": "logappend", + "type": "boolean" + }, + { + "name": "logfile", + "type": "string" + }, + { + "name": "append", + "type": "boolean" + }, + { + "name": "chardev", + "type": "string" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "debug", + "type": "number" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "signal", + "type": "boolean" + }, + { + "name": "mux", + "type": "boolean" + }, + { + "name": "rows", + "type": "number" + }, + { + "name": "cols", + "type": "number" + }, + { + "name": "height", + "type": "number" + }, + { + "name": "width", + "type": "number" + }, + { + "name": "tls-creds", + "type": "string" + }, + { + "name": "telnet", + "type": "boolean" + }, + { + "name": "reconnect", + "type": "number" + }, + { + "name": "delay", + "type": "boolean" + }, + { + "name": "server", + "type": "boolean" + }, + { + "name": "wait", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "to", + "type": "number" + }, + { + "name": "localport", + "type": "string" + }, + { + "name": "localaddr", + "type": "string" + }, + { + "name": "port", + "type": "string" + }, + { + "name": "host", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "backend", + "type": "string" + } + ], + "option": "chardev" + }, + { + "parameters": [ + { + "name": "copy-on-read", + "help": "copy read data from backing file into image file", + "type": "boolean" + }, + { + "name": "werror", + "help": "write error action", + "type": "string" + }, + { + "name": "rerror", + "help": "read error action", + "type": "string" + }, + { + "name": "read-only", + "help": "open drive file as read-only", + "type": "boolean" + }, + { + "name": "file", + "help": "file name", + "type": "string" + }, + { + "name": "serial", + "help": "disk serial number", + "type": "string" + }, + { + "name": "addr", + "help": "pci address (virtio only)", + "type": "string" + }, + { + "name": "boot", + "help": "(deprecated, ignored)", + "type": "boolean" + }, + { + "name": "trans", + "help": "chs translation (auto, lba, none)", + "type": "string" + }, + { + "name": "secs", + "help": "number of sectors (ide disk geometry)", + "type": "number" + }, + { + "name": "heads", + "help": "number of heads (ide disk geometry)", + "type": "number" + }, + { + "name": "cyls", + "help": "number of cylinders (ide disk geometry)", + "type": "number" + }, + { + "name": "if", + "help": "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)", + "type": "string" + }, + { + "name": "media", + "help": "media type (disk, cdrom)", + "type": "string" + }, + { + "name": "index", + "help": "index number", + "type": "number" + }, + { + "name": "unit", + "help": "unit number (i.e. lun for scsi)", + "type": "number" + }, + { + "name": "bus", + "help": "bus number", + "type": "number" + }, + { + "name": "stats-account-failed", + "help": "whether to account for failed I/O operations in the statistics", + "type": "boolean" + }, + { + "name": "stats-account-invalid", + "help": "whether to account for invalid I/O operations in the statistics", + "type": "boolean" + }, + { + "name": "detect-zeroes", + "help": "try to optimize zero writes (off, on, unmap)", + "type": "string" + }, + { + "name": "throttling.group", + "help": "name of the block throttling group", + "type": "string" + }, + { + "name": "throttling.iops-size", + "help": "when limiting by iops max size of an I/O in bytes", + "type": "number" + }, + { + "name": "throttling.bps-write-max-length", + "help": "length of the bps-write-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-read-max-length", + "help": "length of the bps-read-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-total-max-length", + "help": "length of the bps-total-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-write-max-length", + "help": "length of the iops-write-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-read-max-length", + "help": "length of the iops-read-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-total-max-length", + "help": "length of the iops-total-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-write-max", + "help": "total bytes write burst", + "type": "number" + }, + { + "name": "throttling.bps-read-max", + "help": "total bytes read burst", + "type": "number" + }, + { + "name": "throttling.bps-total-max", + "help": "total bytes burst", + "type": "number" + }, + { + "name": "throttling.iops-write-max", + "help": "I/O operations write burst", + "type": "number" + }, + { + "name": "throttling.iops-read-max", + "help": "I/O operations read burst", + "type": "number" + }, + { + "name": "throttling.iops-total-max", + "help": "I/O operations burst", + "type": "number" + }, + { + "name": "throttling.bps-write", + "help": "limit write bytes per second", + "type": "number" + }, + { + "name": "throttling.bps-read", + "help": "limit read bytes per second", + "type": "number" + }, + { + "name": "throttling.bps-total", + "help": "limit total bytes per second", + "type": "number" + }, + { + "name": "throttling.iops-write", + "help": "limit write operations per second", + "type": "number" + }, + { + "name": "throttling.iops-read", + "help": "limit read operations per second", + "type": "number" + }, + { + "name": "throttling.iops-total", + "help": "limit total I/O operations per second", + "type": "number" + }, + { + "name": "werror", + "help": "write error action", + "type": "string" + }, + { + "name": "format", + "help": "disk format (raw, qcow2, ...)", + "type": "string" + }, + { + "name": "cache.writeback", + "help": "Enable writeback mode", + "type": "boolean" + }, + { + "name": "aio", + "help": "host AIO implementation (threads, native)", + "type": "string" + }, + { + "name": "snapshot", + "help": "enable/disable snapshot mode", + "type": "boolean" + }, + { + "name": "discard", + "help": "discard operation (ignore/off, unmap/on)", + "type": "string" + }, + { + "name": "read-only", + "help": "Node is opened in read-only mode", + "type": "boolean" + }, + { + "name": "cache.no-flush", + "help": "Ignore flush requests", + "type": "boolean" + }, + { + "name": "cache.direct", + "help": "Bypass software writeback cache on the host", + "type": "boolean" + }, + { + "name": "driver", + "help": "Block driver to use for the node", + "type": "string" + }, + { + "name": "node-name", + "help": "Node name of the block device node", + "type": "string" + } + ], + "option": "drive" + } + ], + "id": "libvirt-45" +} + +{ + "return": [ + { + "state": false, + "capability": "xbzrle" + }, + { + "state": false, + "capability": "rdma-pin-all" + }, + { + "state": false, + "capability": "auto-converge" + }, + { + "state": false, + "capability": "zero-blocks" + }, + { + "state": false, + "capability": "compress" + }, + { + "state": false, + "capability": "events" + }, + { + "state": false, + "capability": "postcopy-ram" + } + ], + "id": "libvirt-46" +} diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml new file mode 100644 index 0000000..117b2b0 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -0,0 +1,260 @@ +<qemuCaps> + <qemuctime>0</qemuctime> + <selfctime>0</selfctime> + <selfvers>0</selfvers> + <usedQMP/> + <flag name='mem-path'/> + <flag name='drive-serial'/> + <flag name='chardev'/> + <flag name='enable-kvm'/> + <flag name='monitor-json'/> + <flag name='sdl'/> + <flag name='netdev'/> + <flag name='rtc'/> + <flag name='vhost-net'/> + <flag name='no-hpet'/> + <flag name='no-kvm-pit'/> + <flag name='pci-configfd'/> + <flag name='nodefconfig'/> + <flag name='boot-menu'/> + <flag name='fsdev'/> + <flag name='name-process'/> + <flag name='smbios-type'/> + <flag name='spice'/> + <flag name='vga-none'/> + <flag name='boot-index'/> + <flag name='hda-duplex'/> + <flag name='drive-aio'/> + <flag name='pci-multibus'/> + <flag name='pci-bootindex'/> + <flag name='chardev-spicevmc'/> + <flag name='virtio-tx-alg'/> + <flag name='pci-multifunction'/> + <flag name='virtio-blk-pci.ioeventfd'/> + <flag name='sga'/> + <flag name='virtio-blk-pci.event_idx'/> + <flag name='virtio-net-pci.event_idx'/> + <flag name='cache-directsync'/> + <flag name='piix3-usb-uhci'/> + <flag name='piix4-usb-uhci'/> + <flag name='usb-ehci'/> + <flag name='ich9-usb-ehci1'/> + <flag name='vt82c686b-usb-uhci'/> + <flag name='pci-ohci'/> + <flag name='usb-redir'/> + <flag name='usb-hub'/> + <flag name='no-shutdown'/> + <flag name='cache-unsafe'/> + <flag name='ich9-ahci'/> + <flag name='no-acpi'/> + <flag name='fsdev-readonly'/> + <flag name='virtio-blk-pci.scsi'/> + <flag name='drive-copy-on-read'/> + <flag name='fsdev-writeout'/> + <flag name='drive-iotune'/> + <flag name='system_wakeup'/> + <flag name='scsi-disk.channel'/> + <flag name='scsi-block'/> + <flag name='transaction'/> + <flag name='block-job-async'/> + <flag name='scsi-cd'/> + <flag name='ide-cd'/> + <flag name='no-user-config'/> + <flag name='hda-micro'/> + <flag name='dump-guest-memory'/> + <flag name='nec-usb-xhci'/> + <flag name='balloon-event'/> + <flag name='bridge'/> + <flag name='lsi'/> + <flag name='virtio-scsi-pci'/> + <flag name='blockio'/> + <flag name='disable-s3'/> + <flag name='disable-s4'/> + <flag name='usb-redir.filter'/> + <flag name='ide-drive.wwn'/> + <flag name='scsi-disk.wwn'/> + <flag name='seccomp-sandbox'/> + <flag name='reboot-timeout'/> + <flag name='dump-guest-core'/> + <flag name='seamless-migration'/> + <flag name='block-commit'/> + <flag name='vnc'/> + <flag name='drive-mirror'/> + <flag name='usb-redir.bootindex'/> + <flag name='usb-host.bootindex'/> + <flag name='blockdev-snapshot-sync'/> + <flag name='qxl'/> + <flag name='VGA'/> + <flag name='cirrus-vga'/> + <flag name='vmware-svga'/> + <flag name='device-video-primary'/> + <flag name='usb-serial'/> + <flag name='usb-net'/> + <flag name='add-fd'/> + <flag name='nbd-server'/> + <flag name='virtio-rng'/> + <flag name='rng-random'/> + <flag name='rng-egd'/> + <flag name='dtb'/> + <flag name='megasas'/> + <flag name='ipv6-migration'/> + <flag name='machine-opt'/> + <flag name='machine-usb-opt'/> + <flag name='tpm-passthrough'/> + <flag name='tpm-tis'/> + <flag name='pci-bridge'/> + <flag name='vfio-pci'/> + <flag name='vfio-pci.bootindex'/> + <flag name='scsi-generic'/> + <flag name='scsi-generic.bootindex'/> + <flag name='mem-merge'/> + <flag name='vnc-websocket'/> + <flag name='drive-discard'/> + <flag name='mlock'/> + <flag name='vnc-share-policy'/> + <flag name='device-del-event'/> + <flag name='dmi-to-pci-bridge'/> + <flag name='i440fx-pci-hole64-size'/> + <flag name='q35-pci-hole64-size'/> + <flag name='usb-storage'/> + <flag name='usb-storage.removable'/> + <flag name='virtio-mmio'/> + <flag name='ich9-intel-hda'/> + <flag name='kvm-pit-lost-tick-policy'/> + <flag name='boot-strict'/> + <flag name='pvpanic'/> + <flag name='spice-file-xfer-disable'/> + <flag name='spiceport'/> + <flag name='usb-kbd'/> + <flag name='host-pci-multidomain'/> + <flag name='msg-timestamp'/> + <flag name='active-commit'/> + <flag name='change-backing-file'/> + <flag name='memory-backend-ram'/> + <flag name='numa'/> + <flag name='memory-backend-file'/> + <flag name='usb-audio'/> + <flag name='rtc-reset-reinjection'/> + <flag name='splash-timeout'/> + <flag name='iothread'/> + <flag name='migrate-rdma'/> + <flag name='ivshmem'/> + <flag name='drive-iotune-max'/> + <flag name='VGA.vgamem_mb'/> + <flag name='vmware-svga.vgamem_mb'/> + <flag name='qxl.vgamem_mb'/> + <flag name='pc-dimm'/> + <flag name='machine-vmport-opt'/> + <flag name='aes-key-wrap'/> + <flag name='dea-key-wrap'/> + <flag name='pci-serial'/> + <flag name='vhost-user-multiqueue'/> + <flag name='migration-event'/> + <flag name='ioh3420'/> + <flag name='x3130-upstream'/> + <flag name='xio3130-downstream'/> + <flag name='rtl8139'/> + <flag name='e1000'/> + <flag name='virtio-net'/> + <flag name='gic-version'/> + <flag name='incoming-defer'/> + <flag name='virtio-gpu'/> + <flag name='virtio-gpu.virgl'/> + <flag name='virtio-keyboard'/> + <flag name='virtio-mouse'/> + <flag name='virtio-tablet'/> + <flag name='virtio-input-host'/> + <flag name='chardev-file-append'/> + <flag name='ich9-disable-s3'/> + <flag name='ich9-disable-s4'/> + <flag name='vserport-change-event'/> + <flag name='virtio-balloon-pci.deflate-on-oom'/> + <flag name='mptsas1068'/> + <flag name='qxl.vram64_size_mb'/> + <flag name='chardev-logfile'/> + <flag name='debug-threads'/> + <flag name='secret'/> + <flag name='pxb'/> + <flag name='pxb-pcie'/> + <flag name='device-tray-moved-event'/> + <flag name='nec-usb-xhci-ports'/> + <flag name='virtio-scsi-pci.iothread'/> + <flag name='name-guest'/> + <flag name='qxl.max_outputs'/> + <flag name='spice-unix'/> + <flag name='drive-detect-zeroes'/> + <flag name='tls-creds-x509'/> + <flag name='display'/> + <flag name='intel-iommu'/> + <flag name='smm'/> + <flag name='virtio-pci-disable-legacy'/> + <flag name='query-hotpluggable-cpus'/> + <flag name='virtio-net.rx_queue_size'/> + <flag name='virtio-vga'/> + <flag name='drive-iotune-max-length'/> + <version>2007050</version> + <kvmVersion>0</kvmVersion> + <package> (v2.7.0-1292-g45b567d-dirty)</package> + <arch>x86_64</arch> + <cpu name='host' usable='no'/> + <cpu name='qemu64' usable='yes'/> + <cpu name='qemu32' usable='yes'/> + <cpu name='phenom' usable='no'/> + <cpu name='pentium3' usable='yes'/> + <cpu name='pentium2' usable='yes'/> + <cpu name='pentium' usable='yes'/> + <cpu name='n270' usable='yes'/> + <cpu name='kvm64' usable='yes'/> + <cpu name='kvm32' usable='yes'/> + <cpu name='coreduo' usable='yes'/> + <cpu name='core2duo' usable='yes'/> + <cpu name='athlon' usable='yes'/> + <cpu name='Westmere' usable='yes'/> + <cpu name='Skylake-Client' usable='no'/> + <cpu name='SandyBridge' usable='no'/> + <cpu name='Penryn' usable='yes'/> + <cpu name='Opteron_G5' usable='no'/> + <cpu name='Opteron_G4' usable='no'/> + <cpu name='Opteron_G3' usable='no'/> + <cpu name='Opteron_G2' usable='yes'/> + <cpu name='Opteron_G1' usable='yes'/> + <cpu name='Nehalem' usable='yes'/> + <cpu name='IvyBridge' usable='no'/> + <cpu name='Haswell' usable='no'/> + <cpu name='Haswell-noTSX' usable='no'/> + <cpu name='Conroe' usable='yes'/> + <cpu name='Broadwell' usable='no'/> + <cpu name='Broadwell-noTSX' usable='no'/> + <cpu name='486' usable='yes'/> + <machine name='pc-i440fx-2.8' alias='pc' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.12' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='xenpv' maxCpus='1'/> + <machine name='pc-i440fx-1.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.11' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.10' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='isapc' hotplugCpus='yes' maxCpus='1'/> + <machine name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='xenfv' hotplugCpus='yes' maxCpus='128'/> + <machine name='pc-0.15' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.14' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.8' alias='q35' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.13' hotplugCpus='yes' maxCpus='255'/> +</qemuCaps> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 10cfa43..c2bf844 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -163,6 +163,7 @@ mymain(void) DO_TEST("x86_64", "caps_2.5.0"); DO_TEST("x86_64", "caps_2.6.0"); DO_TEST("x86_64", "caps_2.7.0"); + DO_TEST("x86_64", "caps_2.8.0"); DO_TEST("aarch64", "caps_2.6.0-gicv2"); DO_TEST("aarch64", "caps_2.6.0-gicv3"); DO_TEST("ppc64le", "caps_2.6.0"); -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:31AM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 116 + tests/domaincapstest.c | 4 + .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 5239 ++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 260 + tests/qemucapabilitiestest.c | 1 + 5 files changed, 5620 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
ACK, but this needs to be updated, because of the ivshmem patches. Pavel

Currently qmpOnly is the only bool parameter of virQEMUCapsNewForBinaryInternal, but we will need to add more. Let's turn the bool parameter into flags. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 27 +++++++++++++++------------ src/qemu/qemu_capspriv.h | 6 +++++- tests/qemucapsprobe.c | 3 ++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9fce7a6..2df710a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3855,7 +3855,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, const char *libDir, uid_t runUid, gid_t runGid, - char **qmperr) + char **qmperr, + unsigned int flags) { int ret = -1; virCommandPtr cmd = NULL; @@ -3955,6 +3956,15 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, ret = 0; cleanup: + if (flags & VIR_QEMU_CAPS_NEW_FORCE_QMP && + ret == 0 && + !qemuCaps->usedQMP) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to probe QEMU binary with QMP: %s"), + *qmperr ? *qmperr : _("unknown error")); + ret = -1; + } + if (mon) virObjectUnlock(mon); qemuMonitorClose(mon); @@ -4013,7 +4023,7 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, const char *cacheDir, uid_t runUid, gid_t runGid, - bool qmpOnly) + unsigned int flags) { virQEMUCapsPtr qemuCaps; struct stat sb; @@ -4051,15 +4061,8 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, goto error; if (rv == 0) { - if (virQEMUCapsInitQMP(qemuCaps, libDir, runUid, runGid, &qmperr) < 0) { - virQEMUCapsLogProbeFailure(binary); - goto error; - } - - if (qmpOnly && !qemuCaps->usedQMP) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to probe QEMU binary with QMP: %s"), - qmperr ? qmperr : _("unknown error")); + if (virQEMUCapsInitQMP(qemuCaps, libDir, runUid, runGid, &qmperr, + flags) < 0) { virQEMUCapsLogProbeFailure(binary); goto error; } @@ -4096,7 +4099,7 @@ virQEMUCapsNewForBinary(virCapsPtr caps, gid_t runGid) { return virQEMUCapsNewForBinaryInternal(caps, binary, libDir, cacheDir, - runUid, runGid, false); + runUid, runGid, 0); } diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index fab2c2a..573cba6 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -39,6 +39,10 @@ struct _virQEMUCapsCache { virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps); +typedef enum { + VIR_QEMU_CAPS_NEW_FORCE_QMP = 1 << 0, +} virQEMUCapsNewFlags; + virQEMUCapsPtr virQEMUCapsNewForBinaryInternal(virCapsPtr caps, const char *binary, @@ -46,7 +50,7 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, const char *cacheDir, uid_t runUid, gid_t runGid, - bool qmpOnly); + unsigned int flags); int virQEMUCapsLoadCache(virCapsPtr caps, virQEMUCapsPtr qemuCaps, diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index fb9f3e9..0f59bb9 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -47,6 +47,7 @@ main(int argc, char **argv) { virThread thread; virQEMUCapsPtr caps; + unsigned int flags = VIR_QEMU_CAPS_NEW_FORCE_QMP; VIRT_TEST_PRELOAD(abs_builddir "/.libs/qemucapsprobemock.so"); @@ -71,7 +72,7 @@ main(int argc, char **argv) return EXIT_FAILURE; if (!(caps = virQEMUCapsNewForBinaryInternal(NULL, argv[1], "/tmp", NULL, - -1, -1, true))) + -1, -1, flags))) return EXIT_FAILURE; virObjectUnref(caps); -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:32AM +0100, Jiri Denemark wrote:
Currently qmpOnly is the only bool parameter of virQEMUCapsNewForBinaryInternal, but we will need to add more. Let's turn the bool parameter into flags.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 27 +++++++++++++++------------ src/qemu/qemu_capspriv.h | 6 +++++- tests/qemucapsprobe.c | 3 ++- 3 files changed, 22 insertions(+), 14 deletions(-)
ACK Pavel

CPU related capabilities may differ depending on accelerator used when probing. Let's use KVM if available and fall back to TCG. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Or should we perhaps start probing QEMU in both TCG and KVM mode since some capabilities may actually differ depending on the accelerator? Probing QEMU twice for both TCG and KVM would be cleaner and we could real capabilities for both QEMU and KVM domain types. And the two ugly patches at the end of this series would not be needed anymore. However running QEMU twice was always considered harmful, which is why I came up with this a bit ugly solution. src/qemu/qemu_capabilities.c | 10 ++- src/qemu/qemu_capspriv.h | 2 + tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 16 ++-- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 87 +++------------------- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 20 ++--- tests/qemucapsprobe.c | 15 +++- 6 files changed, 53 insertions(+), 97 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2df710a..b9e94dc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3869,6 +3869,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, pid_t pid = 0; virDomainObjPtr vm = NULL; virDomainXMLOptionPtr xmlopt = NULL; + const char *machine; /* the ".sock" sufix is important to avoid a possible clash with a qemu * domain called "capabilities" @@ -3896,6 +3897,13 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, VIR_DEBUG("Try to get caps via QMP qemuCaps=%p", qemuCaps); + if (flags & VIR_QEMU_CAPS_NEW_FORCE_KVM) + machine = "none,accel=kvm"; + else if (flags & VIR_QEMU_CAPS_NEW_FORCE_TCG) + machine = "none,accel=tcg"; + else + machine = "none,accel=kvm:tcg"; + /* * We explicitly need to use -daemonize here, rather than * virCommandDaemonize, because we need to synchronize @@ -3908,7 +3916,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, "-no-user-config", "-nodefaults", "-nographic", - "-M", "none", + "-machine", machine, "-qmp", monarg, "-pidfile", pidfile, "-daemonize", diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 573cba6..68b2d82 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -41,6 +41,8 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps); typedef enum { VIR_QEMU_CAPS_NEW_FORCE_QMP = 1 << 0, + VIR_QEMU_CAPS_NEW_FORCE_TCG = 1 << 1, + VIR_QEMU_CAPS_NEW_FORCE_KVM = 1 << 2, } virQEMUCapsNewFlags; virQEMUCapsPtr diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml index 3acb29f..4c5fffc 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -35,10 +35,10 @@ <model usable='yes'>kvm32</model> <model usable='yes'>coreduo</model> <model usable='yes'>core2duo</model> - <model usable='yes'>athlon</model> + <model usable='no'>athlon</model> <model usable='yes'>Westmere</model> - <model usable='no'>Skylake-Client</model> - <model usable='no'>SandyBridge</model> + <model usable='yes'>Skylake-Client</model> + <model usable='yes'>SandyBridge</model> <model usable='yes'>Penryn</model> <model usable='no'>Opteron_G5</model> <model usable='no'>Opteron_G4</model> @@ -46,12 +46,12 @@ <model usable='yes'>Opteron_G2</model> <model usable='yes'>Opteron_G1</model> <model usable='yes'>Nehalem</model> - <model usable='no'>IvyBridge</model> - <model usable='no'>Haswell</model> - <model usable='no'>Haswell-noTSX</model> + <model usable='yes'>IvyBridge</model> + <model usable='yes'>Haswell</model> + <model usable='yes'>Haswell-noTSX</model> <model usable='yes'>Conroe</model> - <model usable='no'>Broadwell</model> - <model usable='no'>Broadwell-noTSX</model> + <model usable='yes'>Broadwell</model> + <model usable='yes'>Broadwell-noTSX</model> <model usable='yes'>486</model> </mode> </cpu> diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies index d32e8b3..296e0ed 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies @@ -466,7 +466,7 @@ { "return": { - "fd": 14, + "fd": 16, "fdset-id": 0 }, "id": "libvirt-5" @@ -3799,7 +3799,6 @@ { "name": "host", "unavailable-features": [ - "kvm" ], "static": false }, @@ -3818,7 +3817,11 @@ { "name": "phenom", "unavailable-features": [ + "mmxext", "fxsr-opt", + "3dnowext", + "3dnow", + "sse4a", "npt" ], "static": false @@ -3874,6 +3877,9 @@ { "name": "athlon", "unavailable-features": [ + "mmxext", + "3dnowext", + "3dnow" ], "static": false }, @@ -3886,29 +3892,12 @@ { "name": "Skylake-Client", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm", - "rdseed", - "3dnowprefetch", - "xsavec" ], "static": false }, { "name": "SandyBridge", "unavailable-features": [ - "x2apic", - "tsc-deadline", - "avx" ], "static": false }, @@ -3921,11 +3910,8 @@ { "name": "Opteron_G5", "unavailable-features": [ - "fma", - "avx", - "f16c", + "sse4a", "misalignsse", - "3dnowprefetch", "xop", "fma4", "tbm" @@ -3935,9 +3921,8 @@ { "name": "Opteron_G4", "unavailable-features": [ - "avx", + "sse4a", "misalignsse", - "3dnowprefetch", "xop", "fma4" ], @@ -3946,6 +3931,7 @@ { "name": "Opteron_G3", "unavailable-features": [ + "sse4a", "misalignsse" ], "static": false @@ -3971,43 +3957,18 @@ { "name": "IvyBridge", "unavailable-features": [ - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand" ], "static": false }, { "name": "Haswell", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm" ], "static": false }, { "name": "Haswell-noTSX", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "avx2", - "invpcid" ], "static": false }, @@ -4020,36 +3981,12 @@ { "name": "Broadwell", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm", - "rdseed", - "3dnowprefetch" ], "static": false }, { "name": "Broadwell-noTSX", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "avx2", - "invpcid", - "rdseed", - "3dnowprefetch" ], "static": false }, @@ -4065,7 +4002,7 @@ { "return": { - "enabled": false, + "enabled": true, "present": true }, "id": "libvirt-42" diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml index 117b2b0..feb4cfa 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -3,10 +3,10 @@ <selfctime>0</selfctime> <selfvers>0</selfvers> <usedQMP/> + <flag name='kvm'/> <flag name='mem-path'/> <flag name='drive-serial'/> <flag name='chardev'/> - <flag name='enable-kvm'/> <flag name='monitor-json'/> <flag name='sdl'/> <flag name='netdev'/> @@ -196,7 +196,7 @@ <kvmVersion>0</kvmVersion> <package> (v2.7.0-1292-g45b567d-dirty)</package> <arch>x86_64</arch> - <cpu name='host' usable='no'/> + <cpu name='host' usable='yes'/> <cpu name='qemu64' usable='yes'/> <cpu name='qemu32' usable='yes'/> <cpu name='phenom' usable='no'/> @@ -208,10 +208,10 @@ <cpu name='kvm32' usable='yes'/> <cpu name='coreduo' usable='yes'/> <cpu name='core2duo' usable='yes'/> - <cpu name='athlon' usable='yes'/> + <cpu name='athlon' usable='no'/> <cpu name='Westmere' usable='yes'/> - <cpu name='Skylake-Client' usable='no'/> - <cpu name='SandyBridge' usable='no'/> + <cpu name='Skylake-Client' usable='yes'/> + <cpu name='SandyBridge' usable='yes'/> <cpu name='Penryn' usable='yes'/> <cpu name='Opteron_G5' usable='no'/> <cpu name='Opteron_G4' usable='no'/> @@ -219,12 +219,12 @@ <cpu name='Opteron_G2' usable='yes'/> <cpu name='Opteron_G1' usable='yes'/> <cpu name='Nehalem' usable='yes'/> - <cpu name='IvyBridge' usable='no'/> - <cpu name='Haswell' usable='no'/> - <cpu name='Haswell-noTSX' usable='no'/> + <cpu name='IvyBridge' usable='yes'/> + <cpu name='Haswell' usable='yes'/> + <cpu name='Haswell-noTSX' usable='yes'/> <cpu name='Conroe' usable='yes'/> - <cpu name='Broadwell' usable='no'/> - <cpu name='Broadwell-noTSX' usable='no'/> + <cpu name='Broadwell' usable='yes'/> + <cpu name='Broadwell-noTSX' usable='yes'/> <cpu name='486' usable='yes'/> <machine name='pc-i440fx-2.8' alias='pc' hotplugCpus='yes' maxCpus='255'/> <machine name='pc-0.12' hotplugCpus='yes' maxCpus='255'/> diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index 0f59bb9..63fa499 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -51,8 +51,17 @@ main(int argc, char **argv) VIRT_TEST_PRELOAD(abs_builddir "/.libs/qemucapsprobemock.so"); - if (argc != 2) { - fprintf(stderr, "%s QEMU_binary\n", argv[0]); + if (argc != 3) { + fprintf(stderr, "%s kvm|tcg QEMU_binary\n", argv[0]); + return EXIT_FAILURE; + } + + if (STREQ(argv[1], "tcg")) { + flags |= VIR_QEMU_CAPS_NEW_FORCE_TCG; + } else if (STREQ(argv[1], "kvm")) { + flags |= VIR_QEMU_CAPS_NEW_FORCE_KVM; + } else { + fprintf(stderr, "Invalid accelerator (kvm|tcg): '%s'\n", argv[1]); return EXIT_FAILURE; } @@ -71,7 +80,7 @@ main(int argc, char **argv) if (virThreadCreate(&thread, false, eventLoop, NULL) < 0) return EXIT_FAILURE; - if (!(caps = virQEMUCapsNewForBinaryInternal(NULL, argv[1], "/tmp", NULL, + if (!(caps = virQEMUCapsNewForBinaryInternal(NULL, argv[2], "/tmp", NULL, -1, -1, flags))) return EXIT_FAILURE; -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:33AM +0100, Jiri Denemark wrote:
CPU related capabilities may differ depending on accelerator used when probing. Let's use KVM if available and fall back to TCG.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Or should we perhaps start probing QEMU in both TCG and KVM mode since some capabilities may actually differ depending on the accelerator? Probing QEMU twice for both TCG and KVM would be cleaner and we could real capabilities for both QEMU and KVM domain types. And the two ugly patches at the end of this series would not be needed anymore. However running QEMU twice was always considered harmful, which is why I came up with this a bit ugly solution.
As we've discussed this outside of mailing list, QEMU is planing to rewrite the way how they initialize itself and we will be able to probe TCG and KVM differences no matter what accel was used to start the QEMU process. This means that we will have to store the difference somehow for both TCG and KVM. As you've mentioned it would be cleaner solution to have both capabilities available so I would say that we should go for it. To reduce the impact of probing twice (until QEMU rewrites the probing) we can probe only once for the best capabilities (KVM if available otherwise for TCG) and probe for the second one only when it is explicitly required by some guest. In most cases during libvirtd lifetime there are only KVM or TCG guests. Note: adding Dan to CC for his opinion. Pavel
src/qemu/qemu_capabilities.c | 10 ++- src/qemu/qemu_capspriv.h | 2 + tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 16 ++-- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 87 +++------------------- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 20 ++--- tests/qemucapsprobe.c | 15 +++- 6 files changed, 53 insertions(+), 97 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2df710a..b9e94dc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3869,6 +3869,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, pid_t pid = 0; virDomainObjPtr vm = NULL; virDomainXMLOptionPtr xmlopt = NULL; + const char *machine;
/* the ".sock" sufix is important to avoid a possible clash with a qemu * domain called "capabilities" @@ -3896,6 +3897,13 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
VIR_DEBUG("Try to get caps via QMP qemuCaps=%p", qemuCaps);
+ if (flags & VIR_QEMU_CAPS_NEW_FORCE_KVM) + machine = "none,accel=kvm"; + else if (flags & VIR_QEMU_CAPS_NEW_FORCE_TCG) + machine = "none,accel=tcg"; + else + machine = "none,accel=kvm:tcg"; + /* * We explicitly need to use -daemonize here, rather than * virCommandDaemonize, because we need to synchronize @@ -3908,7 +3916,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, "-no-user-config", "-nodefaults", "-nographic", - "-M", "none", + "-machine", machine, "-qmp", monarg, "-pidfile", pidfile, "-daemonize", diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 573cba6..68b2d82 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -41,6 +41,8 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps);
typedef enum { VIR_QEMU_CAPS_NEW_FORCE_QMP = 1 << 0, + VIR_QEMU_CAPS_NEW_FORCE_TCG = 1 << 1, + VIR_QEMU_CAPS_NEW_FORCE_KVM = 1 << 2, } virQEMUCapsNewFlags;
virQEMUCapsPtr diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml index 3acb29f..4c5fffc 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -35,10 +35,10 @@ <model usable='yes'>kvm32</model> <model usable='yes'>coreduo</model> <model usable='yes'>core2duo</model> - <model usable='yes'>athlon</model> + <model usable='no'>athlon</model> <model usable='yes'>Westmere</model> - <model usable='no'>Skylake-Client</model> - <model usable='no'>SandyBridge</model> + <model usable='yes'>Skylake-Client</model> + <model usable='yes'>SandyBridge</model> <model usable='yes'>Penryn</model> <model usable='no'>Opteron_G5</model> <model usable='no'>Opteron_G4</model> @@ -46,12 +46,12 @@ <model usable='yes'>Opteron_G2</model> <model usable='yes'>Opteron_G1</model> <model usable='yes'>Nehalem</model> - <model usable='no'>IvyBridge</model> - <model usable='no'>Haswell</model> - <model usable='no'>Haswell-noTSX</model> + <model usable='yes'>IvyBridge</model> + <model usable='yes'>Haswell</model> + <model usable='yes'>Haswell-noTSX</model> <model usable='yes'>Conroe</model> - <model usable='no'>Broadwell</model> - <model usable='no'>Broadwell-noTSX</model> + <model usable='yes'>Broadwell</model> + <model usable='yes'>Broadwell-noTSX</model> <model usable='yes'>486</model> </mode> </cpu> diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies index d32e8b3..296e0ed 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies @@ -466,7 +466,7 @@
{ "return": { - "fd": 14, + "fd": 16, "fdset-id": 0 }, "id": "libvirt-5" @@ -3799,7 +3799,6 @@ { "name": "host", "unavailable-features": [ - "kvm" ], "static": false }, @@ -3818,7 +3817,11 @@ { "name": "phenom", "unavailable-features": [ + "mmxext", "fxsr-opt", + "3dnowext", + "3dnow", + "sse4a", "npt" ], "static": false @@ -3874,6 +3877,9 @@ { "name": "athlon", "unavailable-features": [ + "mmxext", + "3dnowext", + "3dnow" ], "static": false }, @@ -3886,29 +3892,12 @@ { "name": "Skylake-Client", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm", - "rdseed", - "3dnowprefetch", - "xsavec" ], "static": false }, { "name": "SandyBridge", "unavailable-features": [ - "x2apic", - "tsc-deadline", - "avx" ], "static": false }, @@ -3921,11 +3910,8 @@ { "name": "Opteron_G5", "unavailable-features": [ - "fma", - "avx", - "f16c", + "sse4a", "misalignsse", - "3dnowprefetch", "xop", "fma4", "tbm" @@ -3935,9 +3921,8 @@ { "name": "Opteron_G4", "unavailable-features": [ - "avx", + "sse4a", "misalignsse", - "3dnowprefetch", "xop", "fma4" ], @@ -3946,6 +3931,7 @@ { "name": "Opteron_G3", "unavailable-features": [ + "sse4a", "misalignsse" ], "static": false @@ -3971,43 +3957,18 @@ { "name": "IvyBridge", "unavailable-features": [ - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand" ], "static": false }, { "name": "Haswell", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm" ], "static": false }, { "name": "Haswell-noTSX", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "avx2", - "invpcid" ], "static": false }, @@ -4020,36 +3981,12 @@ { "name": "Broadwell", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "hle", - "avx2", - "invpcid", - "rtm", - "rdseed", - "3dnowprefetch" ], "static": false }, { "name": "Broadwell-noTSX", "unavailable-features": [ - "fma", - "pcid", - "x2apic", - "tsc-deadline", - "avx", - "f16c", - "rdrand", - "avx2", - "invpcid", - "rdseed", - "3dnowprefetch" ], "static": false }, @@ -4065,7 +4002,7 @@
{ "return": { - "enabled": false, + "enabled": true, "present": true }, "id": "libvirt-42" diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml index 117b2b0..feb4cfa 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -3,10 +3,10 @@ <selfctime>0</selfctime> <selfvers>0</selfvers> <usedQMP/> + <flag name='kvm'/> <flag name='mem-path'/> <flag name='drive-serial'/> <flag name='chardev'/> - <flag name='enable-kvm'/> <flag name='monitor-json'/> <flag name='sdl'/> <flag name='netdev'/> @@ -196,7 +196,7 @@ <kvmVersion>0</kvmVersion> <package> (v2.7.0-1292-g45b567d-dirty)</package> <arch>x86_64</arch> - <cpu name='host' usable='no'/> + <cpu name='host' usable='yes'/> <cpu name='qemu64' usable='yes'/> <cpu name='qemu32' usable='yes'/> <cpu name='phenom' usable='no'/> @@ -208,10 +208,10 @@ <cpu name='kvm32' usable='yes'/> <cpu name='coreduo' usable='yes'/> <cpu name='core2duo' usable='yes'/> - <cpu name='athlon' usable='yes'/> + <cpu name='athlon' usable='no'/> <cpu name='Westmere' usable='yes'/> - <cpu name='Skylake-Client' usable='no'/> - <cpu name='SandyBridge' usable='no'/> + <cpu name='Skylake-Client' usable='yes'/> + <cpu name='SandyBridge' usable='yes'/> <cpu name='Penryn' usable='yes'/> <cpu name='Opteron_G5' usable='no'/> <cpu name='Opteron_G4' usable='no'/> @@ -219,12 +219,12 @@ <cpu name='Opteron_G2' usable='yes'/> <cpu name='Opteron_G1' usable='yes'/> <cpu name='Nehalem' usable='yes'/> - <cpu name='IvyBridge' usable='no'/> - <cpu name='Haswell' usable='no'/> - <cpu name='Haswell-noTSX' usable='no'/> + <cpu name='IvyBridge' usable='yes'/> + <cpu name='Haswell' usable='yes'/> + <cpu name='Haswell-noTSX' usable='yes'/> <cpu name='Conroe' usable='yes'/> - <cpu name='Broadwell' usable='no'/> - <cpu name='Broadwell-noTSX' usable='no'/> + <cpu name='Broadwell' usable='yes'/> + <cpu name='Broadwell-noTSX' usable='yes'/> <cpu name='486' usable='yes'/> <machine name='pc-i440fx-2.8' alias='pc' hotplugCpus='yes' maxCpus='255'/> <machine name='pc-0.12' hotplugCpus='yes' maxCpus='255'/> diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index 0f59bb9..63fa499 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -51,8 +51,17 @@ main(int argc, char **argv)
VIRT_TEST_PRELOAD(abs_builddir "/.libs/qemucapsprobemock.so");
- if (argc != 2) { - fprintf(stderr, "%s QEMU_binary\n", argv[0]); + if (argc != 3) { + fprintf(stderr, "%s kvm|tcg QEMU_binary\n", argv[0]); + return EXIT_FAILURE; + } + + if (STREQ(argv[1], "tcg")) { + flags |= VIR_QEMU_CAPS_NEW_FORCE_TCG; + } else if (STREQ(argv[1], "kvm")) { + flags |= VIR_QEMU_CAPS_NEW_FORCE_KVM; + } else { + fprintf(stderr, "Invalid accelerator (kvm|tcg): '%s'\n", argv[1]); return EXIT_FAILURE; }
@@ -71,7 +80,7 @@ main(int argc, char **argv) if (virThreadCreate(&thread, false, eventLoop, NULL) < 0) return EXIT_FAILURE;
- if (!(caps = virQEMUCapsNewForBinaryInternal(NULL, argv[1], "/tmp", NULL, + if (!(caps = virQEMUCapsNewForBinaryInternal(NULL, argv[2], "/tmp", NULL, -1, -1, flags))) return EXIT_FAILURE;
-- 2.10.2
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Nov 08, 2016 at 03:02:31PM +0100, Pavel Hrdina wrote:
On Wed, Nov 02, 2016 at 10:22:33AM +0100, Jiri Denemark wrote:
CPU related capabilities may differ depending on accelerator used when probing. Let's use KVM if available and fall back to TCG.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Or should we perhaps start probing QEMU in both TCG and KVM mode since some capabilities may actually differ depending on the accelerator? Probing QEMU twice for both TCG and KVM would be cleaner and we could real capabilities for both QEMU and KVM domain types. And the two ugly patches at the end of this series would not be needed anymore. However running QEMU twice was always considered harmful, which is why I came up with this a bit ugly solution.
As we've discussed this outside of mailing list, QEMU is planing to rewrite the way how they initialize itself and we will be able to probe TCG and KVM differences no matter what accel was used to start the QEMU process. This means that we will have to store the difference somehow for both TCG and KVM.
As you've mentioned it would be cleaner solution to have both capabilities available so I would say that we should go for it. To reduce the impact of probing twice (until QEMU rewrites the probing) we can probe only once for the best capabilities (KVM if available otherwise for TCG) and probe for the second one only when it is explicitly required by some guest. In most cases during libvirtd lifetime there are only KVM or TCG guests.
Note: adding Dan to CC for his opinion.
NB, the reason we don't want to run each QEMU binary more than once to probe features is that it quickly becomes non-scalable due to combinatorial expansion. We already have 28 system emulators, and so running QEMU twice would mean 56 invokations, three times gives 84 invokations, etc. KVM is a little bit special though. Out of those 28 binaries, at most 2 of them can be run in KVM mode - eg on x86_64 host, only the x86_64 and i686 system emulators can run KVM - all the others are 100% TCG based. So in the very special case of KVM, I think it is acceptable to run QEMU twice, as this is not creating a combinatorial expansion in number of emulators we must invoke - it adds at most 2 extra invokations. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|

virQEMUCapsLoadCache loads QEMU capabilities from a file, but strangely enough it returns the loaded QEMU binary ctime in qemuctime parameter instead of storing it in qemuCaps. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 10 +++++----- src/qemu/qemu_capspriv.h | 1 - tests/testutilsqemu.c | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b9e94dc..91e8b30 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3023,7 +3023,6 @@ int virQEMUCapsLoadCache(virCapsPtr caps, virQEMUCapsPtr qemuCaps, const char *filename, - time_t *qemuctime, time_t *selfctime, unsigned long *selfvers) { @@ -3060,7 +3059,7 @@ virQEMUCapsLoadCache(virCapsPtr caps, _("missing qemuctime in QEMU capabilities XML")); goto cleanup; } - *qemuctime = (time_t)l; + qemuCaps->ctime = (time_t)l; if (virXPathLongLong("string(./selfctime)", ctxt, &l) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -3477,7 +3476,7 @@ virQEMUCapsInitCached(virCapsPtr caps, int ret = -1; char *binaryhash = NULL; struct stat sb; - time_t qemuctime; + time_t qemuctime = qemuCaps->ctime; time_t selfctime; unsigned long selfvers; @@ -3513,7 +3512,7 @@ virQEMUCapsInitCached(virCapsPtr caps, } if (virQEMUCapsLoadCache(caps, qemuCaps, capsfile, - &qemuctime, &selfctime, &selfvers) < 0) { + &selfctime, &selfvers) < 0) { VIR_WARN("Failed to load cached caps from '%s' for '%s': %s", capsfile, qemuCaps->binary, virGetLastErrorMessage()); virResetLastError(); @@ -3529,7 +3528,7 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_DEBUG("Outdated cached capabilities '%s' for '%s' " "(%lld vs %lld, %lld vs %lld, %lu vs %lu)", capsfile, qemuCaps->binary, - (long long)qemuctime, (long long)qemuCaps->ctime, + (long long)qemuCaps->ctime, (long long)qemuctime, (long long)selfctime, (long long)virGetSelfLastChanged(), selfvers, (unsigned long)LIBVIR_VERSION_NUMBER); ignore_value(unlink(capsfile)); @@ -3544,6 +3543,7 @@ virQEMUCapsInitCached(virCapsPtr caps, ret = 1; cleanup: + qemuCaps->ctime = qemuctime; VIR_FREE(binaryhash); VIR_FREE(capsfile); VIR_FREE(capsdir); diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 68b2d82..e6489b4 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -57,7 +57,6 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, int virQEMUCapsLoadCache(virCapsPtr caps, virQEMUCapsPtr qemuCaps, const char *filename, - time_t *qemuctime, time_t *selfctime, unsigned long *selfvers); char *virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps, diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index e66903a..56a89c9 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -495,13 +495,12 @@ qemuTestParseCapabilities(virCapsPtr caps, const char *capsFile) { virQEMUCapsPtr qemuCaps = NULL; - time_t qemuctime; time_t selfctime; unsigned long version; if (!(qemuCaps = virQEMUCapsNew()) || virQEMUCapsLoadCache(caps, qemuCaps, capsFile, - &qemuctime, &selfctime, &version) < 0) + &selfctime, &version) < 0) goto error; return qemuCaps; -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:34AM +0100, Jiri Denemark wrote:
virQEMUCapsLoadCache loads QEMU capabilities from a file, but strangely enough it returns the loaded QEMU binary ctime in qemuctime parameter instead of storing it in qemuCaps.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 10 +++++----- src/qemu/qemu_capspriv.h | 1 - tests/testutilsqemu.c | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-)
ACK Pavel

On Thu, Nov 03, 2016 at 16:15:39 +0100, Pavel Hrdina wrote:
On Wed, Nov 02, 2016 at 10:22:34AM +0100, Jiri Denemark wrote:
virQEMUCapsLoadCache loads QEMU capabilities from a file, but strangely enough it returns the loaded QEMU binary ctime in qemuctime parameter instead of storing it in qemuCaps.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 10 +++++----- src/qemu/qemu_capspriv.h | 1 - tests/testutilsqemu.c | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-)
ACK
Thanks, pushed. Jirka

Let's keep all run time validation of cached QEMU capabilities in virQEMUCapsIsValid and call it whenever we access the cache. virQEMUCapsInitCached should keep only the checks which do not make sense once the cache is loaded in memory. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 59 ++++++++++++++++++++++++++++++-------------- src/qemu/qemu_capabilities.h | 3 ++- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 91e8b30..d1c31ad 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3516,25 +3516,21 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_WARN("Failed to load cached caps from '%s' for '%s': %s", capsfile, qemuCaps->binary, virGetLastErrorMessage()); virResetLastError(); - ret = 0; - virQEMUCapsReset(qemuCaps); - goto cleanup; + goto discard; } + if (!virQEMUCapsIsValid(qemuCaps, qemuctime)) + goto discard; + /* Discard cache if QEMU binary or libvirtd changed */ - if (qemuctime != qemuCaps->ctime || - selfctime != virGetSelfLastChanged() || + if (selfctime != virGetSelfLastChanged() || selfvers != LIBVIR_VERSION_NUMBER) { - VIR_DEBUG("Outdated cached capabilities '%s' for '%s' " - "(%lld vs %lld, %lld vs %lld, %lu vs %lu)", + VIR_DEBUG("Dropping cached capabilities '%s' for '%s': " + "libvirt changed (%lld vs %lld, %lu vs %lu)", capsfile, qemuCaps->binary, - (long long)qemuCaps->ctime, (long long)qemuctime, (long long)selfctime, (long long)virGetSelfLastChanged(), selfvers, (unsigned long)LIBVIR_VERSION_NUMBER); - ignore_value(unlink(capsfile)); - virQEMUCapsReset(qemuCaps); - ret = 0; - goto cleanup; + goto discard; } VIR_DEBUG("Loaded '%s' for '%s' ctime %lld usedQMP=%d", @@ -3548,6 +3544,12 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_FREE(capsfile); VIR_FREE(capsdir); return ret; + + discard: + ignore_value(unlink(capsfile)); + virQEMUCapsReset(qemuCaps); + ret = 0; + goto cleanup; } @@ -4111,17 +4113,36 @@ virQEMUCapsNewForBinary(virCapsPtr caps, } -bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps) +bool +virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, + time_t ctime) { - struct stat sb; - if (!qemuCaps->binary) return true; - if (stat(qemuCaps->binary, &sb) < 0) - return false; + if (!ctime) { + struct stat sb; - return sb.st_ctime == qemuCaps->ctime; + if (stat(qemuCaps->binary, &sb) < 0) { + char ebuf[1024]; + VIR_DEBUG("Dropping cached capabilities for '%s': " + "failed to stat QEMU binary: %s", + qemuCaps->binary, + virStrerror(errno, ebuf, sizeof(ebuf))); + return false; + } + ctime = sb.st_ctime; + } + + if (ctime != qemuCaps->ctime) { + VIR_DEBUG("Dropping cached capabilities for '%s': " + "binary is newer than cache (%lld vs %lld)", + qemuCaps->binary, + (long long) ctime, (long long) qemuCaps->ctime); + return false; + } + + return true; } @@ -4214,7 +4235,7 @@ virQEMUCapsCacheLookup(virCapsPtr caps, virMutexLock(&cache->lock); ret = virHashLookup(cache->binaries, binary); if (ret && - !virQEMUCapsIsValid(ret)) { + !virQEMUCapsIsValid(ret, 0)) { VIR_DEBUG("Cached capabilities %p no longer valid for %s", ret, binary); virHashRemoveEntry(cache->binaries, binary); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c77ba13..6c45a67 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -449,7 +449,8 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps, size_t *nmachines, virCapsGuestMachinePtr **machines); -bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps); +bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, + time_t ctime); void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps, const char *machineType); -- 2.10.2

On Wed, Nov 02, 2016 at 10:22:35AM +0100, Jiri Denemark wrote:
Let's keep all run time validation of cached QEMU capabilities in virQEMUCapsIsValid and call it whenever we access the cache. virQEMUCapsInitCached should keep only the checks which do not make sense once the cache is loaded in memory.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 59 ++++++++++++++++++++++++++++++-------------- src/qemu/qemu_capabilities.h | 3 ++- 2 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 91e8b30..d1c31ad 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3516,25 +3516,21 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_WARN("Failed to load cached caps from '%s' for '%s': %s", capsfile, qemuCaps->binary, virGetLastErrorMessage()); virResetLastError(); - ret = 0; - virQEMUCapsReset(qemuCaps); - goto cleanup; + goto discard; }
+ if (!virQEMUCapsIsValid(qemuCaps, qemuctime)) + goto discard; + /* Discard cache if QEMU binary or libvirtd changed */ - if (qemuctime != qemuCaps->ctime || - selfctime != virGetSelfLastChanged() || + if (selfctime != virGetSelfLastChanged() || selfvers != LIBVIR_VERSION_NUMBER) { - VIR_DEBUG("Outdated cached capabilities '%s' for '%s' " - "(%lld vs %lld, %lld vs %lld, %lu vs %lu)", + VIR_DEBUG("Dropping cached capabilities '%s' for '%s': " + "libvirt changed (%lld vs %lld, %lu vs %lu)",
Nice cleanup, the only thing that I would change is to split the DEBUG and move the "Dropping cached capabilities '%s' for '%s'" and put it ...
capsfile, qemuCaps->binary, - (long long)qemuCaps->ctime, (long long)qemuctime, (long long)selfctime, (long long)virGetSelfLastChanged(), selfvers, (unsigned long)LIBVIR_VERSION_NUMBER); - ignore_value(unlink(capsfile)); - virQEMUCapsReset(qemuCaps); - ret = 0; - goto cleanup; + goto discard; }
VIR_DEBUG("Loaded '%s' for '%s' ctime %lld usedQMP=%d", @@ -3548,6 +3544,12 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_FREE(capsfile); VIR_FREE(capsdir); return ret; + + discard:
... here where we actually drop the capability.
+ ignore_value(unlink(capsfile)); + virQEMUCapsReset(qemuCaps); + ret = 0; + goto cleanup; }
@@ -4111,17 +4113,36 @@ virQEMUCapsNewForBinary(virCapsPtr caps, }
-bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps) +bool +virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, + time_t ctime) { - struct stat sb; - if (!qemuCaps->binary) return true;
- if (stat(qemuCaps->binary, &sb) < 0) - return false; + if (!ctime) { + struct stat sb;
- return sb.st_ctime == qemuCaps->ctime; + if (stat(qemuCaps->binary, &sb) < 0) { + char ebuf[1024]; + VIR_DEBUG("Dropping cached capabilities for '%s': " + "failed to stat QEMU binary: %s", + qemuCaps->binary, + virStrerror(errno, ebuf, sizeof(ebuf)));
Same here, remove the "Dropping cached capabilities for '%s': " part and ...
+ return false; + } + ctime = sb.st_ctime; + } + + if (ctime != qemuCaps->ctime) { + VIR_DEBUG("Dropping cached capabilities for '%s': " + "binary is newer than cache (%lld vs %lld)", + qemuCaps->binary, + (long long) ctime, (long long) qemuCaps->ctime);
... same here. This function doesn't drop the capabilities. ACK, the suggested change is only for debug logs so I'll leave it up to you, but it would be cleaner :) Pavel
+ return false; + } + + return true; }
@@ -4214,7 +4235,7 @@ virQEMUCapsCacheLookup(virCapsPtr caps, virMutexLock(&cache->lock); ret = virHashLookup(cache->binaries, binary); if (ret && - !virQEMUCapsIsValid(ret)) { + !virQEMUCapsIsValid(ret, 0)) { VIR_DEBUG("Cached capabilities %p no longer valid for %s", ret, binary); virHashRemoveEntry(cache->binaries, binary); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c77ba13..6c45a67 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -449,7 +449,8 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps, size_t *nmachines, virCapsGuestMachinePtr **machines);
-bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps); +bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, + time_t ctime);
void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps, const char *machineType); -- 2.10.2
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Thu, Nov 03, 2016 at 16:37:59 +0100, Pavel Hrdina wrote:
On Wed, Nov 02, 2016 at 10:22:35AM +0100, Jiri Denemark wrote:
Let's keep all run time validation of cached QEMU capabilities in virQEMUCapsIsValid and call it whenever we access the cache. virQEMUCapsInitCached should keep only the checks which do not make sense once the cache is loaded in memory.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 59 ++++++++++++++++++++++++++++++-------------- src/qemu/qemu_capabilities.h | 3 ++- 2 files changed, 42 insertions(+), 20 deletions(-) .. + return false; + } + ctime = sb.st_ctime; + } + + if (ctime != qemuCaps->ctime) { + VIR_DEBUG("Dropping cached capabilities for '%s': " + "binary is newer than cache (%lld vs %lld)", + qemuCaps->binary, + (long long) ctime, (long long) qemuCaps->ctime);
... same here. This function doesn't drop the capabilities.
ACK, the suggested change is only for debug logs so I'll leave it up to you, but it would be cleaner :)
Yeah, the suggested changes make sense. I moved the "Dropping..." message to the place where we actually drop the cache and pushed the result. Thanks, Jirka

On Wed, Nov 02, 2016 at 10:22:35AM +0100, Jiri Denemark wrote:
Let's keep all run time validation of cached QEMU capabilities in virQEMUCapsIsValid and call it whenever we access the cache. virQEMUCapsInitCached should keep only the checks which do not make sense once the cache is loaded in memory.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 59 ++++++++++++++++++++++++++++++-------------- src/qemu/qemu_capabilities.h | 3 ++- 2 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 91e8b30..d1c31ad 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3516,25 +3516,21 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_WARN("Failed to load cached caps from '%s' for '%s': %s", capsfile, qemuCaps->binary, virGetLastErrorMessage()); virResetLastError(); - ret = 0; - virQEMUCapsReset(qemuCaps); - goto cleanup; + goto discard; }
+ if (!virQEMUCapsIsValid(qemuCaps, qemuctime)) + goto discard; + /* Discard cache if QEMU binary or libvirtd changed */ - if (qemuctime != qemuCaps->ctime || - selfctime != virGetSelfLastChanged() || + if (selfctime != virGetSelfLastChanged() || selfvers != LIBVIR_VERSION_NUMBER) { - VIR_DEBUG("Outdated cached capabilities '%s' for '%s' " - "(%lld vs %lld, %lld vs %lld, %lu vs %lu)", + VIR_DEBUG("Dropping cached capabilities '%s' for '%s': " + "libvirt changed (%lld vs %lld, %lu vs %lu)", capsfile, qemuCaps->binary, - (long long)qemuCaps->ctime, (long long)qemuctime, (long long)selfctime, (long long)virGetSelfLastChanged(), selfvers, (unsigned long)LIBVIR_VERSION_NUMBER); - ignore_value(unlink(capsfile)); - virQEMUCapsReset(qemuCaps); - ret = 0; - goto cleanup; + goto discard; }
VIR_DEBUG("Loaded '%s' for '%s' ctime %lld usedQMP=%d", @@ -3548,6 +3544,12 @@ virQEMUCapsInitCached(virCapsPtr caps, VIR_FREE(capsfile); VIR_FREE(capsdir); return ret; + + discard: + ignore_value(unlink(capsfile)); + virQEMUCapsReset(qemuCaps); + ret = 0; + goto cleanup; }
@@ -4111,17 +4113,36 @@ virQEMUCapsNewForBinary(virCapsPtr caps, }
-bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps) +bool +virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, + time_t ctime)
This broke the build on RHEL-6 c1: warnings being treated as errors ../../src/qemu/qemu_capabilities.c: In function 'virQEMUCapsIsValid': ../../src/qemu/qemu_capabilities.c:4085: error: declaration of 'ctime' shadows a global declaration [-Wshadow] /usr/include/time.h:258: error: shadowed declaration is here [-Wshadow] We should just call this qemuctime, as done elsewhere to avoid the clash. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|

Since CPU capabilities depend on accelerator used when probing QEMU the cache becomes invalid when KVM becomes available or if it is not available anymore. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_capabilities.c | 37 ++++++++++++++++++++++++++++++++----- src/qemu/qemu_capabilities.h | 4 +++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d1c31ad..9fe4363 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3469,7 +3469,9 @@ virQEMUCapsReset(virQEMUCapsPtr qemuCaps) static int virQEMUCapsInitCached(virCapsPtr caps, virQEMUCapsPtr qemuCaps, - const char *cacheDir) + const char *cacheDir, + uid_t runUid, + gid_t runGid) { char *capsdir = NULL; char *capsfile = NULL; @@ -3519,7 +3521,7 @@ virQEMUCapsInitCached(virCapsPtr caps, goto discard; } - if (!virQEMUCapsIsValid(qemuCaps, qemuctime)) + if (!virQEMUCapsIsValid(qemuCaps, qemuctime, runUid, runGid)) goto discard; /* Discard cache if QEMU binary or libvirtd changed */ @@ -4067,7 +4069,8 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, if (!cacheDir) rv = 0; - else if ((rv = virQEMUCapsInitCached(caps, qemuCaps, cacheDir)) < 0) + else if ((rv = virQEMUCapsInitCached(caps, qemuCaps, cacheDir, + runUid, runGid)) < 0) goto error; if (rv == 0) { @@ -4115,8 +4118,12 @@ virQEMUCapsNewForBinary(virCapsPtr caps, bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, - time_t ctime) + time_t ctime, + uid_t runUid, + gid_t runGid) { + bool kvmUsable; + if (!qemuCaps->binary) return true; @@ -4142,6 +4149,26 @@ virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, return false; } + kvmUsable = virFileAccessibleAs("/dev/kvm", R_OK | W_OK, + runUid, runGid) == 0; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM) && + kvmUsable) { + VIR_DEBUG("Dropping cached capabilities for '%s': KVM was not " + "enabled when probing, but it should be usable now", + qemuCaps->binary); + return false; + } + + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) && + !kvmUsable) { + VIR_DEBUG("Dropping cached capabilities for '%s': KVM was enabled " + "when probing, but it is not available now", + qemuCaps->binary); + return false; + } + return true; } @@ -4235,7 +4262,7 @@ virQEMUCapsCacheLookup(virCapsPtr caps, virMutexLock(&cache->lock); ret = virHashLookup(cache->binaries, binary); if (ret && - !virQEMUCapsIsValid(ret, 0)) { + !virQEMUCapsIsValid(ret, 0, cache->runUid, cache->runGid)) { VIR_DEBUG("Cached capabilities %p no longer valid for %s", ret, binary); virHashRemoveEntry(cache->binaries, binary); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6c45a67..5310416 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -450,7 +450,9 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps, virCapsGuestMachinePtr **machines); bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, - time_t ctime); + time_t ctime, + uid_t runUid, + gid_t runGid); void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps, const char *machineType); -- 2.10.2

CPU model usability differs with domain type (qemu vs. kvm). Thus when querying domain capabilities for a domain type which doesn't match machine accel={kvm|tcg} used when probing QEMU we need to ignore the usability data to avoid giving misleading results to users. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/conf/domain_capabilities.c | 11 +- src/conf/domain_capabilities.h | 3 +- src/qemu/qemu_capabilities.c | 10 +- .../qemu_2.8.0-kvm-on-tcg.x86_64.xml | 116 + .../qemu_2.8.0-tcg-on-kvm.x86_64.xml | 116 + .../domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 116 + tests/domaincapstest.c | 12 + .../caps_2.8.0-tcg.x86_64.replies | 5239 ++++++++++++++++++++ .../qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml | 260 + tests/qemucapabilitiestest.c | 1 + 10 files changed, 5880 insertions(+), 4 deletions(-) create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index beedd70..4d2a8d3 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -176,9 +176,11 @@ virDomainCapsCPUModelsCopy(virDomainCapsCPUModelsPtr old) virDomainCapsCPUModelsPtr virDomainCapsCPUModelsFilter(virDomainCapsCPUModelsPtr old, - const char **models) + const char **models, + bool resetUsable) { virDomainCapsCPUModelsPtr cpuModels; + virDomainCapsCPUUsable usable; size_t i; if (!(cpuModels = virDomainCapsCPUModelsNew(0))) @@ -188,9 +190,14 @@ virDomainCapsCPUModelsFilter(virDomainCapsCPUModelsPtr old, if (models && !virStringArrayHasString(models, old->models[i].name)) continue; + if (resetUsable) + usable = VIR_DOMCAPS_CPU_USABLE_UNKNOWN; + else + usable = old->models[i].usable; + if (virDomainCapsCPUModelsAdd(cpuModels, old->models[i].name, -1, - old->models[i].usable) < 0) + usable) < 0) goto error; } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 13a65e3..897d2b3 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -167,7 +167,8 @@ virDomainCapsPtr virDomainCapsNew(const char *path, virDomainCapsCPUModelsPtr virDomainCapsCPUModelsNew(size_t nmodels); virDomainCapsCPUModelsPtr virDomainCapsCPUModelsCopy(virDomainCapsCPUModelsPtr old); virDomainCapsCPUModelsPtr virDomainCapsCPUModelsFilter(virDomainCapsCPUModelsPtr old, - const char **models); + const char **models, + bool resetUsable); int virDomainCapsCPUModelsAddSteal(virDomainCapsCPUModelsPtr cpuModels, char **name, virDomainCapsCPUUsable usable); diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9fe4363..fe81743 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4507,10 +4507,18 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps, VIR_CPU_MODE_CUSTOM)) { virDomainCapsCPUModelsPtr filtered = NULL; char **models = NULL; + bool resetUsable = false; + + if ((domCaps->virttype == VIR_DOMAIN_VIRT_KVM && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) || + (domCaps->virttype == VIR_DOMAIN_VIRT_QEMU && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))) + resetUsable = true; if (cpuGetModels(domCaps->arch, &models) >= 0) { filtered = virDomainCapsCPUModelsFilter(qemuCaps->cpuDefinitions, - (const char **) models); + (const char **) models, + resetUsable); virStringFreeList(models); } domCaps->cpu.custom = filtered; diff --git a/tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml new file mode 100644 index 0000000..7b8f90e --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-i440fx-2.8</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='unknown'>qemu64</model> + <model usable='unknown'>qemu32</model> + <model usable='unknown'>phenom</model> + <model usable='unknown'>pentium3</model> + <model usable='unknown'>pentium2</model> + <model usable='unknown'>pentium</model> + <model usable='unknown'>n270</model> + <model usable='unknown'>kvm64</model> + <model usable='unknown'>kvm32</model> + <model usable='unknown'>coreduo</model> + <model usable='unknown'>core2duo</model> + <model usable='unknown'>athlon</model> + <model usable='unknown'>Westmere</model> + <model usable='unknown'>Skylake-Client</model> + <model usable='unknown'>SandyBridge</model> + <model usable='unknown'>Penryn</model> + <model usable='unknown'>Opteron_G5</model> + <model usable='unknown'>Opteron_G4</model> + <model usable='unknown'>Opteron_G3</model> + <model usable='unknown'>Opteron_G2</model> + <model usable='unknown'>Opteron_G1</model> + <model usable='unknown'>Nehalem</model> + <model usable='unknown'>IvyBridge</model> + <model usable='unknown'>Haswell</model> + <model usable='unknown'>Haswell-noTSX</model> + <model usable='unknown'>Conroe</model> + <model usable='unknown'>Broadwell</model> + <model usable='unknown'>Broadwell-noTSX</model> + <model usable='unknown'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml new file mode 100644 index 0000000..fe598e9 --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>qemu</domain> + <machine>pc-i440fx-2.8</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='no'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='unknown'>qemu64</model> + <model usable='unknown'>qemu32</model> + <model usable='unknown'>phenom</model> + <model usable='unknown'>pentium3</model> + <model usable='unknown'>pentium2</model> + <model usable='unknown'>pentium</model> + <model usable='unknown'>n270</model> + <model usable='unknown'>kvm64</model> + <model usable='unknown'>kvm32</model> + <model usable='unknown'>coreduo</model> + <model usable='unknown'>core2duo</model> + <model usable='unknown'>athlon</model> + <model usable='unknown'>Westmere</model> + <model usable='unknown'>Skylake-Client</model> + <model usable='unknown'>SandyBridge</model> + <model usable='unknown'>Penryn</model> + <model usable='unknown'>Opteron_G5</model> + <model usable='unknown'>Opteron_G4</model> + <model usable='unknown'>Opteron_G3</model> + <model usable='unknown'>Opteron_G2</model> + <model usable='unknown'>Opteron_G1</model> + <model usable='unknown'>Nehalem</model> + <model usable='unknown'>IvyBridge</model> + <model usable='unknown'>Haswell</model> + <model usable='unknown'>Haswell-noTSX</model> + <model usable='unknown'>Conroe</model> + <model usable='unknown'>Broadwell</model> + <model usable='unknown'>Broadwell-noTSX</model> + <model usable='unknown'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml new file mode 100644 index 0000000..dd92853 --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>qemu</domain> + <machine>pc-i440fx-2.8</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='no'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='yes'>athlon</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Haswell</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Broadwell</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 9c518d5..71ed1f2 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -423,6 +423,18 @@ mymain(void) "/usr/bin/qemu-system-x86_64", NULL, "x86_64", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("2.8.0-tcg", "caps_2.8.0-tcg", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_QEMU); + + DO_TEST_QEMU("2.8.0-tcg-on-kvm", "caps_2.8.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_QEMU); + + DO_TEST_QEMU("2.8.0-kvm-on-tcg", "caps_2.8.0-tcg", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("2.6.0", "caps_2.6.0-gicv2", "/usr/bin/qemu-system-aarch64", NULL, "aarch64", VIR_DOMAIN_VIRT_KVM); diff --git a/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies new file mode 100644 index 0000000..d32e8b3 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies @@ -0,0 +1,5239 @@ +{ + "QMP": { + "version": { + "qemu": { + "micro": 50, + "minor": 7, + "major": 2 + }, + "package": " (v2.7.0-1292-g45b567d-dirty)" + }, + "capabilities": [ + ] + } +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 7, + "major": 2 + }, + "package": " (v2.7.0-1292-g45b567d-dirty)" + }, + "id": "libvirt-2" +} + +{ + "return": { + "arch": "x86_64" + }, + "id": "libvirt-3" +} + +{ + "return": [ + { + "name": "xen-set-global-dirty-log" + }, + { + "name": "xen-save-devices-state" + }, + { + "name": "xen-load-devices-state" + }, + { + "name": "x-blockdev-remove-medium" + }, + { + "name": "x-blockdev-insert-medium" + }, + { + "name": "x-blockdev-del" + }, + { + "name": "x-blockdev-change" + }, + { + "name": "transaction" + }, + { + "name": "trace-event-set-state" + }, + { + "name": "trace-event-get-state" + }, + { + "name": "system_wakeup" + }, + { + "name": "system_reset" + }, + { + "name": "system_powerdown" + }, + { + "name": "stop" + }, + { + "name": "set_password" + }, + { + "name": "set_link" + }, + { + "name": "send-key" + }, + { + "name": "screendump" + }, + { + "name": "rtc-reset-reinjection" + }, + { + "name": "ringbuf-write" + }, + { + "name": "ringbuf-read" + }, + { + "name": "remove-fd" + }, + { + "name": "quit" + }, + { + "name": "query-vnc-servers" + }, + { + "name": "query-vnc" + }, + { + "name": "query-version" + }, + { + "name": "query-uuid" + }, + { + "name": "query-tpm-types" + }, + { + "name": "query-tpm-models" + }, + { + "name": "query-tpm" + }, + { + "name": "query-target" + }, + { + "name": "query-status" + }, + { + "name": "query-spice" + }, + { + "name": "query-rx-filter" + }, + { + "name": "query-rocker-ports" + }, + { + "name": "query-rocker-of-dpa-groups" + }, + { + "name": "query-rocker-of-dpa-flows" + }, + { + "name": "query-rocker" + }, + { + "name": "query-pci" + }, + { + "name": "query-named-block-nodes" + }, + { + "name": "query-name" + }, + { + "name": "query-migrate-parameters" + }, + { + "name": "query-migrate-capabilities" + }, + { + "name": "query-migrate-cache-size" + }, + { + "name": "query-migrate" + }, + { + "name": "query-mice" + }, + { + "name": "query-memory-devices" + }, + { + "name": "query-memdev" + }, + { + "name": "query-machines" + }, + { + "name": "query-kvm" + }, + { + "name": "query-iothreads" + }, + { + "name": "query-hotpluggable-cpus" + }, + { + "name": "query-fdsets" + }, + { + "name": "query-events" + }, + { + "name": "query-dump-guest-memory-capability" + }, + { + "name": "query-dump" + }, + { + "name": "query-cpus" + }, + { + "name": "query-cpu-definitions" + }, + { + "name": "query-commands" + }, + { + "name": "query-command-line-options" + }, + { + "name": "query-chardev-backends" + }, + { + "name": "query-chardev" + }, + { + "name": "query-blockstats" + }, + { + "name": "query-block-jobs" + }, + { + "name": "query-block" + }, + { + "name": "query-balloon" + }, + { + "name": "query-acpi-ospm-status" + }, + { + "name": "qom-set" + }, + { + "name": "qom-list-types" + }, + { + "name": "qom-list" + }, + { + "name": "qom-get" + }, + { + "name": "qmp_capabilities" + }, + { + "name": "pmemsave" + }, + { + "name": "object-del" + }, + { + "name": "object-add" + }, + { + "name": "netdev_del" + }, + { + "name": "nbd-server-stop" + }, + { + "name": "nbd-server-start" + }, + { + "name": "nbd-server-add" + }, + { + "name": "migrate_set_speed" + }, + { + "name": "migrate_set_downtime" + }, + { + "name": "migrate_cancel" + }, + { + "name": "migrate-start-postcopy" + }, + { + "name": "migrate-set-parameters" + }, + { + "name": "migrate-set-capabilities" + }, + { + "name": "migrate-set-cache-size" + }, + { + "name": "migrate-incoming" + }, + { + "name": "migrate" + }, + { + "name": "memsave" + }, + { + "name": "input-send-event" + }, + { + "name": "inject-nmi" + }, + { + "name": "human-monitor-command" + }, + { + "name": "getfd" + }, + { + "name": "expire_password" + }, + { + "name": "eject" + }, + { + "name": "dump-guest-memory" + }, + { + "name": "drive-mirror" + }, + { + "name": "drive-backup" + }, + { + "name": "device_del" + }, + { + "name": "device-list-properties" + }, + { + "name": "cpu-add" + }, + { + "name": "cpu" + }, + { + "name": "cont" + }, + { + "name": "closefd" + }, + { + "name": "client_migrate_info" + }, + { + "name": "chardev-remove" + }, + { + "name": "chardev-add" + }, + { + "name": "change-vnc-password" + }, + { + "name": "change-backing-file" + }, + { + "name": "change" + }, + { + "name": "blockdev-snapshot-sync" + }, + { + "name": "blockdev-snapshot-internal-sync" + }, + { + "name": "blockdev-snapshot-delete-internal-sync" + }, + { + "name": "blockdev-snapshot" + }, + { + "name": "blockdev-open-tray" + }, + { + "name": "blockdev-mirror" + }, + { + "name": "blockdev-close-tray" + }, + { + "name": "blockdev-change-medium" + }, + { + "name": "blockdev-backup" + }, + { + "name": "blockdev-add" + }, + { + "name": "block_set_io_throttle" + }, + { + "name": "block_resize" + }, + { + "name": "block_passwd" + }, + { + "name": "block-stream" + }, + { + "name": "block-set-write-threshold" + }, + { + "name": "block-job-set-speed" + }, + { + "name": "block-job-resume" + }, + { + "name": "block-job-pause" + }, + { + "name": "block-job-complete" + }, + { + "name": "block-job-cancel" + }, + { + "name": "block-dirty-bitmap-remove" + }, + { + "name": "block-dirty-bitmap-clear" + }, + { + "name": "block-dirty-bitmap-add" + }, + { + "name": "block-commit" + }, + { + "name": "balloon" + }, + { + "name": "add_client" + }, + { + "name": "add-fd" + }, + { + "name": "netdev_add" + }, + { + "name": "device_add" + }, + { + "name": "query-qmp-schema" + } + ], + "id": "libvirt-4" +} + +{ + "return": { + "fd": 14, + "fdset-id": 0 + }, + "id": "libvirt-5" +} + +{ + "id": "libvirt-6", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'bogus' not found" + } +} + +{ + "return": [ + { + "name": "WATCHDOG" + }, + { + "name": "WAKEUP" + }, + { + "name": "VSERPORT_CHANGE" + }, + { + "name": "VNC_INITIALIZED" + }, + { + "name": "VNC_DISCONNECTED" + }, + { + "name": "VNC_CONNECTED" + }, + { + "name": "SUSPEND_DISK" + }, + { + "name": "SUSPEND" + }, + { + "name": "STOP" + }, + { + "name": "SPICE_MIGRATE_COMPLETED" + }, + { + "name": "SPICE_INITIALIZED" + }, + { + "name": "SPICE_DISCONNECTED" + }, + { + "name": "SPICE_CONNECTED" + }, + { + "name": "SHUTDOWN" + }, + { + "name": "RTC_CHANGE" + }, + { + "name": "RESUME" + }, + { + "name": "RESET" + }, + { + "name": "QUORUM_REPORT_BAD" + }, + { + "name": "QUORUM_FAILURE" + }, + { + "name": "POWERDOWN" + }, + { + "name": "NIC_RX_FILTER_CHANGED" + }, + { + "name": "MIGRATION_PASS" + }, + { + "name": "MIGRATION" + }, + { + "name": "MEM_UNPLUG_ERROR" + }, + { + "name": "GUEST_PANICKED" + }, + { + "name": "DUMP_COMPLETED" + }, + { + "name": "DEVICE_TRAY_MOVED" + }, + { + "name": "DEVICE_DELETED" + }, + { + "name": "BLOCK_WRITE_THRESHOLD" + }, + { + "name": "BLOCK_JOB_READY" + }, + { + "name": "BLOCK_JOB_ERROR" + }, + { + "name": "BLOCK_JOB_COMPLETED" + }, + { + "name": "BLOCK_JOB_CANCELLED" + }, + { + "name": "BLOCK_IO_ERROR" + }, + { + "name": "BLOCK_IMAGE_CORRUPTED" + }, + { + "name": "BALLOON_CHANGE" + }, + { + "name": "ACPI_DEVICE_OST" + } + ], + "id": "libvirt-7" +} + +{ + "return": [ + { + "name": "vhost-vsock-pci" + }, + { + "name": "virtio-tablet-pci" + }, + { + "name": "pc-0.13-machine" + }, + { + "name": "generic-sdhci" + }, + { + "name": "i82551" + }, + { + "name": "i82550" + }, + { + "name": "Westmere-x86_64-cpu" + }, + { + "name": "pci-serial-4x" + }, + { + "name": "Penryn-x86_64-cpu" + }, + { + "name": "Haswell-x86_64-cpu" + }, + { + "name": "iothread" + }, + { + "name": "cfi.pflash01" + }, + { + "name": "Skylake-Client-x86_64-cpu" + }, + { + "name": "virtio-gpu-device" + }, + { + "name": "Opteron_G3-x86_64-cpu" + }, + { + "name": "e1000e" + }, + { + "name": "Broadwell-x86_64-cpu" + }, + { + "name": "piix3-ide" + }, + { + "name": "isa-parallel" + }, + { + "name": "megasas" + }, + { + "name": "i2c-bus" + }, + { + "name": "pc-q35-2.4-machine" + }, + { + "name": "vhost-vsock-device" + }, + { + "name": "usb-braille" + }, + { + "name": "mptsas1068" + }, + { + "name": "vmware-svga" + }, + { + "name": "PIIX3-xen" + }, + { + "name": "ccid-bus" + }, + { + "name": "scsi-cd" + }, + { + "name": "pc-i440fx-2.0-machine" + }, + { + "name": "isa-serial" + }, + { + "name": "usb-ehci" + }, + { + "name": "user-creatable" + }, + { + "name": "container" + }, + { + "name": "host-x86_64-cpu" + }, + { + "name": "qemu64-x86_64-cpu" + }, + { + "name": "pci-serial-2x" + }, + { + "name": "piix4-ide" + }, + { + "name": "scsi-generic" + }, + { + "name": "pc-1.0-machine" + }, + { + "name": "virtio-net-pci" + }, + { + "name": "hyperv-testdev" + }, + { + "name": "pc-dimm" + }, + { + "name": "pc-q35-2.8-machine" + }, + { + "name": "Haswell-noTSX-x86_64-cpu" + }, + { + "name": "pc-i440fx-2.1-machine" + }, + { + "name": "virtio-mouse-device" + }, + { + "name": "virtio-mouse-pci" + }, + { + "name": "isa-debugcon" + }, + { + "name": "AMDVI-PCI" + }, + { + "name": "ide-hd" + }, + { + "name": "virtio-vga" + }, + { + "name": "isa-ipmi-bt" + }, + { + "name": "rng-egd" + }, + { + "name": "isa-pcspk" + }, + { + "name": "isa-pit" + }, + { + "name": "pc-1.1-machine" + }, + { + "name": "filter-buffer" + }, + { + "name": "ich9-usb-ehci1" + }, + { + "name": "ich9-usb-ehci2" + }, + { + "name": "pxb-host" + }, + { + "name": "intel-iommu" + }, + { + "name": "irq" + }, + { + "name": "ipmi-bmc-sim" + }, + { + "name": "cirrus-vga" + }, + { + "name": "virtconsole" + }, + { + "name": "virtio-rng-pci" + }, + { + "name": "PCIE" + }, + { + "name": "vfio-amd-xgbe" + }, + { + "name": "pentium3-x86_64-cpu" + }, + { + "name": "qxl-vga" + }, + { + "name": "ioapic" + }, + { + "name": "kvm-pit" + }, + { + "name": "pc-i440fx-2.5-machine" + }, + { + "name": "filter-rewriter" + }, + { + "name": "qio-channel-buffer" + }, + { + "name": "vhost-scsi-pci" + }, + { + "name": "usb-kbd" + }, + { + "name": "xen-apic" + }, + { + "name": "usb-host" + }, + { + "name": "usb-bus" + }, + { + "name": "pc-i440fx-1.4-machine" + }, + { + "name": "PIIX3" + }, + { + "name": "486-x86_64-cpu" + }, + { + "name": "ES1370" + }, + { + "name": "gus" + }, + { + "name": "kvm-pci-assign" + }, + { + "name": "isa-applesmc" + }, + { + "name": "pc-i440fx-2.6-machine" + }, + { + "name": "xen-pci-passthrough" + }, + { + "name": "i82559er" + }, + { + "name": "q35-pcihost" + }, + { + "name": "usb-bt-dongle" + }, + { + "name": "e1000-82545em" + }, + { + "name": "e1000-82544gc" + }, + { + "name": "ipmi-interface" + }, + { + "name": "pc-i440fx-1.5-machine" + }, + { + "name": "or-irq" + }, + { + "name": "pc-0.14-machine" + }, + { + "name": "i6300esb" + }, + { + "name": "mc146818rtc" + }, + { + "name": "AC97" + }, + { + "name": "PIIX4_PM" + }, + { + "name": "piix4-usb-uhci" + }, + { + "name": "sysbus-ahci" + }, + { + "name": "virtio-tablet-device" + }, + { + "name": "filter-redirector" + }, + { + "name": "kvm-ioapic" + }, + { + "name": "pvpanic" + }, + { + "name": "core2duo-x86_64-cpu" + }, + { + "name": "tls-creds-x509" + }, + { + "name": "virtio-9p-pci" + }, + { + "name": "scsi-disk" + }, + { + "name": "acpi-device-interface" + }, + { + "name": "vfio-pci-igd-lpc-bridge" + }, + { + "name": "sb16" + }, + { + "name": "qemu-console" + }, + { + "name": "pc-0.15-machine" + }, + { + "name": "usb-mouse" + }, + { + "name": "xenfv-machine" + }, + { + "name": "filter-dump" + }, + { + "name": "virtio-blk-pci" + }, + { + "name": "piix3-usb-uhci" + }, + { + "name": "vfio-calxeda-xgmac" + }, + { + "name": "virtio-scsi-device" + }, + { + "name": "tpci200" + }, + { + "name": "virtio-9p-device" + }, + { + "name": "pc-q35-2.5-machine" + }, + { + "name": "SUNW,fdtwo" + }, + { + "name": "hda-output" + }, + { + "name": "i8257" + }, + { + "name": "Opteron_G4-x86_64-cpu" + }, + { + "name": "qio-channel-file" + }, + { + "name": "filter-mirror" + }, + { + "name": "virtio-mmio" + }, + { + "name": "intctrl" + }, + { + "name": "isa-i8259" + }, + { + "name": "System" + }, + { + "name": "pvscsi" + }, + { + "name": "amd-iommu" + }, + { + "name": "virtio-net-device" + }, + { + "name": "colo-compare" + }, + { + "name": "sd-bus" + }, + { + "name": "ib700" + }, + { + "name": "usb-hub" + }, + { + "name": "IvyBridge-x86_64-cpu" + }, + { + "name": "hda-duplex" + }, + { + "name": "igd-passthrough-i440FX" + }, + { + "name": "virtio-keyboard-pci" + }, + { + "name": "igd-passthrough-isa-bridge" + }, + { + "name": "nec-usb-xhci" + }, + { + "name": "input-linux" + }, + { + "name": "megasas-gen2" + }, + { + "name": "pci-ohci" + }, + { + "name": "virtio-keyboard-device" + }, + { + "name": "xio3130-downstream" + }, + { + "name": "isapc-machine" + }, + { + "name": "ipoctal232" + }, + { + "name": "ide-cd" + }, + { + "name": "tls-creds-anon" + }, + { + "name": "pc-i440fx-2.2-machine" + }, + { + "name": "isabus-bridge" + }, + { + "name": "isa-ipmi-kcs" + }, + { + "name": "memory-backend-file" + }, + { + "name": "qemu:memory-region" + }, + { + "name": "isa-ide" + }, + { + "name": "isa-vga" + }, + { + "name": "rng-random" + }, + { + "name": "rocker" + }, + { + "name": "ipmi-bmc-extern" + }, + { + "name": "hotplug-handler" + }, + { + "name": "kvm-i8259" + }, + { + "name": "i440FX-pcihost" + }, + { + "name": "qemu32-x86_64-cpu" + }, + { + "name": "tpm-tis" + }, + { + "name": "tpm-passthrough" + }, + { + "name": "pc-1.2-machine" + }, + { + "name": "isa-debug-exit" + }, + { + "name": "Opteron_G1-x86_64-cpu" + }, + { + "name": "pc-testdev" + }, + { + "name": "pc-0.10-machine" + }, + { + "name": "pc-i440fx-2.3-machine" + }, + { + "name": "xen-pvdevice" + }, + { + "name": "sga" + }, + { + "name": "pcnet" + }, + { + "name": "apic" + }, + { + "name": "ivshmem" + }, + { + "name": "hpet" + }, + { + "name": "adlib" + }, + { + "name": "qio-channel-command" + }, + { + "name": "lsi53c895a" + }, + { + "name": "pxb-bus" + }, + { + "name": "usb-audio" + }, + { + "name": "usb-wacom-tablet" + }, + { + "name": "virtio-mmio-bus" + }, + { + "name": "pc-0.11-machine" + }, + { + "name": "kvm-apic" + }, + { + "name": "phenom-x86_64-cpu" + }, + { + "name": "xensysdev" + }, + { + "name": "fw_cfg_io" + }, + { + "name": "usb-net" + }, + { + "name": "ioh3420" + }, + { + "name": "cs4231a" + }, + { + "name": "dc390" + }, + { + "name": "nvme" + }, + { + "name": "i82801b11-bridge" + }, + { + "name": "kvmvapic" + }, + { + "name": "usb-tablet" + }, + { + "name": "fw-path-provider" + }, + { + "name": "usb-ccid" + }, + { + "name": "sdhci-bus" + }, + { + "name": "pci-bridge-seat" + }, + { + "name": "mch" + }, + { + "name": "pc-i440fx-2.7-machine" + }, + { + "name": "vhost-scsi" + }, + { + "name": "isa-dma" + }, + { + "name": "tcg-accel" + }, + { + "name": "ich9-usb-uhci2" + }, + { + "name": "isa-cirrus-vga" + }, + { + "name": "usb-bot" + }, + { + "name": "ICH9-LPC" + }, + { + "name": "edu" + }, + { + "name": "accel" + }, + { + "name": "pxb-pcie-bus" + }, + { + "name": "pc-i440fx-1.6-machine" + }, + { + "name": "lsi53c810" + }, + { + "name": "kvmclock" + }, + { + "name": "loader" + }, + { + "name": "pc-i440fx-2.8-machine" + }, + { + "name": "ich9-usb-uhci4" + }, + { + "name": "virtio-serial-bus" + }, + { + "name": "nvdimm" + }, + { + "name": "virtio-balloon-pci" + }, + { + "name": "SandyBridge-x86_64-cpu" + }, + { + "name": "esp" + }, + { + "name": "virtio-balloon-device" + }, + { + "name": "x3130-upstream" + }, + { + "name": "ich9-usb-uhci5" + }, + { + "name": "qxl" + }, + { + "name": "intel-hda" + }, + { + "name": "ich9-usb-uhci6" + }, + { + "name": "pc-i440fx-1.7-machine" + }, + { + "name": "virtio-serial-device" + }, + { + "name": "ich9-usb-uhci3" + }, + { + "name": "ICH9 SMB" + }, + { + "name": "pxb-pcie" + }, + { + "name": "piix3-ide-xen" + }, + { + "name": "xen-accel" + }, + { + "name": "virtio-input-host-device" + }, + { + "name": "vmxnet3" + }, + { + "name": "IDE" + }, + { + "name": "VGA" + }, + { + "name": "pci-testdev" + }, + { + "name": "ich9-usb-uhci1" + }, + { + "name": "xenpv-machine" + }, + { + "name": "pci-bridge" + }, + { + "name": "SCSI" + }, + { + "name": "none-machine" + }, + { + "name": "sysbus-fdc" + }, + { + "name": "allwinner-ahci" + }, + { + "name": "n270-x86_64-cpu" + }, + { + "name": "pci-serial" + }, + { + "name": "pc-q35-2.6-machine" + }, + { + "name": "athlon-x86_64-cpu" + }, + { + "name": "virtio-rng-device" + }, + { + "name": "am53c974" + }, + { + "name": "ISA" + }, + { + "name": "i8042" + }, + { + "name": "kvm-accel" + }, + { + "name": "secret" + }, + { + "name": "i82559c" + }, + { + "name": "i82559b" + }, + { + "name": "i82559a" + }, + { + "name": "scsi-hd" + }, + { + "name": "qtest-accel" + }, + { + "name": "virtio-scsi-pci" + }, + { + "name": "hda-micro" + }, + { + "name": "scsi-block" + }, + { + "name": "rtl8139" + }, + { + "name": "vmmouse" + }, + { + "name": "ich9-intel-hda" + }, + { + "name": "pc-q35-2.7-machine" + }, + { + "name": "usb-mtp" + }, + { + "name": "ide-drive" + }, + { + "name": "qio-channel-websock" + }, + { + "name": "fw_cfg_mem" + }, + { + "name": "PCI" + }, + { + "name": "Opteron_G5-x86_64-cpu" + }, + { + "name": "vmport" + }, + { + "name": "coreduo-x86_64-cpu" + }, + { + "name": "virtio-serial-pci" + }, + { + "name": "xen-platform" + }, + { + "name": "pentium2-x86_64-cpu" + }, + { + "name": "virtio-input-host-pci" + }, + { + "name": "nmi" + }, + { + "name": "i82558b" + }, + { + "name": "i82558a" + }, + { + "name": "qemu,register" + }, + { + "name": "ne2k_isa" + }, + { + "name": "sdhci-pci" + }, + { + "name": "virtio-pci-bus" + }, + { + "name": "pxb" + }, + { + "name": "port92" + }, + { + "name": "e1000" + }, + { + "name": "Conroe-x86_64-cpu" + }, + { + "name": "kvm64-x86_64-cpu" + }, + { + "name": "qio-channel-tls" + }, + { + "name": "vt82c686b-usb-uhci" + }, + { + "name": "HDA" + }, + { + "name": "usb-storage" + }, + { + "name": "pc-1.3-machine" + }, + { + "name": "usb-serial" + }, + { + "name": "usb-redir" + }, + { + "name": "sysbus-ohci" + }, + { + "name": "i82801" + }, + { + "name": "pc-i440fx-2.4-machine" + }, + { + "name": "i82557b" + }, + { + "name": "usb-uas" + }, + { + "name": "Broadwell-noTSX-x86_64-cpu" + }, + { + "name": "Nehalem-x86_64-cpu" + }, + { + "name": "i82557c" + }, + { + "name": "memory-backend-ram" + }, + { + "name": "i82557a" + }, + { + "name": "virtserialport" + }, + { + "name": "i440FX" + }, + { + "name": "ne2k_pci" + }, + { + "name": "smbus-eeprom" + }, + { + "name": "i82562" + }, + { + "name": "ich9-ahci" + }, + { + "name": "isa-fdc" + }, + { + "name": "sd-card" + }, + { + "name": "pc-0.12-machine" + }, + { + "name": "kvm32-x86_64-cpu" + }, + { + "name": "Opteron_G2-x86_64-cpu" + }, + { + "name": "vfio-pci" + }, + { + "name": "IndustryPack" + }, + { + "name": "virtio-gpu-pci" + }, + { + "name": "ivshmem-plain" + }, + { + "name": "secondary-vga" + }, + { + "name": "ivshmem-doorbell" + }, + { + "name": "qio-channel-socket" + }, + { + "name": "pentium-x86_64-cpu" + }, + { + "name": "virtio-blk-device" + } + ], + "id": "libvirt-8" +} + +{ + "return": [ + { + "name": "secs", + "type": "uint32" + }, + { + "name": "request-merging", + "description": "on/off", + "type": "bool" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "heads", + "type": "uint32" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "scsi", + "description": "on/off", + "type": "bool" + }, + { + "name": "cyls", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "iothread", + "type": "link<iothread>" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "class", + "type": "uint32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "virtio-backend", + "type": "child<virtio-blk-device>" + }, + { + "name": "config-wce", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "num-queues", + "type": "uint16" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-9" +} + +{ + "return": [ + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-txtimer", + "type": "uint32" + }, + { + "name": "guest_ufo", + "description": "on/off", + "type": "bool" + }, + { + "name": "mq", + "description": "on/off", + "type": "bool" + }, + { + "name": "status", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_ecn", + "description": "on/off", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "tx", + "type": "str" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "ctrl_rx_extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "mac", + "description": "Ethernet 6-byte MAC Address, example: 52:54:00:12:34:56", + "type": "str" + }, + { + "name": "rx_queue_size", + "type": "uint16" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_tso6", + "description": "on/off", + "type": "bool" + }, + { + "name": "gso", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_ecn", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_rx", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_tso4", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "guest_csum", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest_announce", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-txburst", + "type": "int32" + }, + { + "name": "ctrl_vlan", + "description": "on/off", + "type": "bool" + }, + { + "name": "csum", + "description": "on/off", + "type": "bool" + }, + { + "name": "mrg_rxbuf", + "description": "on/off", + "type": "bool" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "ctrl_guest_offloads", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_tso6", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "ctrl_mac_addr", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "vlan", + "description": "Integer VLAN id to connect to", + "type": "int32" + }, + { + "name": "host_tso4", + "description": "on/off", + "type": "bool" + }, + { + "name": "host_ufo", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child<virtio-net-device>" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "netdev", + "description": "ID of a netdev to use as a backend", + "type": "str" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-10" +} + +{ + "return": [ + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "cmd_per_lun", + "type": "uint32" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "num_queues", + "type": "uint32" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "hotplug", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_sectors", + "type": "uint32" + }, + { + "name": "param_change", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "iothread", + "type": "link<iothread>" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "virtio-backend", + "type": "child<virtio-scsi-device>" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + } + ], + "id": "libvirt-11" +} + +{ + "id": "libvirt-12", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-blk-ccw' not found" + } +} + +{ + "id": "libvirt-13", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-net-ccw' not found" + } +} + +{ + "id": "libvirt-14", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-scsi-ccw' not found" + } +} + +{ + "id": "libvirt-15", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-blk-s390' not found" + } +} + +{ + "id": "libvirt-16", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-net-s390' not found" + } +} + +{ + "id": "libvirt-17", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'pci-assign' not found" + } +} + +{ + "return": [ + { + "name": "share_intx", + "description": "on/off", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "host", + "description": "Address (bus/device/function) of the host device, example: 04:10.0", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "configfd", + "type": "str" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "prefer_msi", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-18" +} + +{ + "return": [ + { + "name": "x-pci-sub-device-id", + "type": "uint32" + }, + { + "name": "x-no-kvm-msi", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-igd-opregion", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-vga", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pci-vendor-id", + "type": "uint32" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "x-req", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-igd-gms", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "x-no-kvm-intx", + "type": "bool" + }, + { + "name": "x-pci-device-id", + "type": "uint32" + }, + { + "name": "host", + "description": "Address (bus/device/function) of the host device, example: 04:10.0", + "type": "str" + }, + { + "name": "x-no-kvm-msix", + "type": "bool" + }, + { + "name": "x-intx-mmap-timeout-ms", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "x-pci-sub-vendor-id", + "type": "uint32" + }, + { + "name": "sysfsdev", + "type": "str" + }, + { + "name": "x-no-mmap", + "type": "bool" + } + ], + "id": "libvirt-19" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "port_index", + "type": "uint16" + }, + { + "name": "dpofua", + "description": "on/off", + "type": "bool" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "lun", + "type": "uint32" + }, + { + "name": "max_unmap_size", + "type": "uint64" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "port_wwn", + "type": "uint64" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "scsi-id", + "type": "uint32" + }, + { + "name": "channel", + "type": "uint32" + }, + { + "name": "vendor", + "type": "str" + }, + { + "name": "wwn", + "type": "uint64" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "removable", + "description": "on/off", + "type": "bool" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "ver", + "type": "str" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "max_io_size", + "type": "uint64" + } + ], + "id": "libvirt-20" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "unit", + "type": "uint32" + }, + { + "name": "wwn", + "type": "uint64" + }, + { + "name": "werror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "model", + "type": "str" + }, + { + "name": "rerror", + "description": "Error handling policy, report/ignore/enospc/stop/auto", + "type": "BlockdevOnError" + }, + { + "name": "ver", + "type": "str" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + } + ], + "id": "libvirt-21" +} + +{ + "return": [ + { + "name": "memory-hotplug-support", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "acpi-pci-hotplug-with-bridge-support", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "disable_s4", + "type": "uint8" + }, + { + "name": "disable_s3", + "type": "uint8" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "s4_val", + "type": "uint8" + }, + { + "name": "smb_io_base", + "type": "uint32" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-22" +} + +{ + "return": [ + { + "name": "filter", + "type": "str" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "debug", + "type": "uint8" + }, + { + "name": "streams", + "type": "bool" + }, + { + "name": "chardev", + "description": "ID of a chardev to use as a backend", + "type": "str" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "attached", + "type": "bool" + } + ], + "id": "libvirt-23" +} + +{ + "return": [ + { + "name": "isobufs", + "type": "uint32" + }, + { + "name": "hostaddr", + "type": "uint32" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "productid", + "type": "uint32" + }, + { + "name": "serial", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "isobsize", + "type": "uint32" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "vendorid", + "type": "uint32" + }, + { + "name": "pipeline", + "description": "on/off", + "type": "bool" + }, + { + "name": "attached", + "type": "bool" + }, + { + "name": "hostport", + "type": "str" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "loglevel", + "type": "uint32" + }, + { + "name": "hostbus", + "type": "uint32" + } + ], + "id": "libvirt-24" +} + +{ + "return": [ + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "lun", + "type": "uint32" + }, + { + "name": "channel", + "type": "uint32" + }, + { + "name": "scsi-id", + "type": "uint32" + } + ], + "id": "libvirt-25" +} + +{ + "return": [ + { + "name": "short_root_bus", + "type": "uint32" + }, + { + "name": "pci-conf-idx[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pci-hole64-end", + "type": "int" + }, + { + "name": "pci-hole-end", + "type": "int" + }, + { + "name": "pci-hole-start", + "type": "int" + }, + { + "name": "pci-hole64-start", + "type": "int" + }, + { + "name": "pci-hole64-size", + "type": "size" + }, + { + "name": "pci-conf-data[0]", + "type": "child<qemu:memory-region>" + } + ], + "id": "libvirt-26" +} + +{ + "return": [ + { + "name": "short_root_bus", + "type": "uint32" + }, + { + "name": "system-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-conf-idx[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pcie-mmcfg-mmio[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "pci-hole64-start", + "type": "int" + }, + { + "name": "io-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-hole64-end", + "type": "int" + }, + { + "name": "pci-hole-end", + "type": "int" + }, + { + "name": "above-4g-mem-size", + "type": "size" + }, + { + "name": "below-4g-mem-size", + "type": "size" + }, + { + "name": "ram-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-hole-start", + "type": "int" + }, + { + "name": "MCFG", + "type": "uint64" + }, + { + "name": "mch", + "type": "child<mch>" + }, + { + "name": "pci-hole64-size", + "type": "size" + }, + { + "name": "pci-mem", + "type": "link<qemu:memory-region>" + }, + { + "name": "pci-conf-data[0]", + "type": "child<qemu:memory-region>" + }, + { + "name": "mcfg_size", + "type": "int" + } + ], + "id": "libvirt-27" +} + +{ + "return": [ + { + "name": "serial", + "type": "str" + }, + { + "name": "msos-desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "logical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + }, + { + "name": "discard_granularity", + "type": "uint32" + }, + { + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" + }, + { + "name": "bootindex", + "type": "int32" + }, + { + "name": "write-cache", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "opt_io_size", + "type": "uint32" + }, + { + "name": "min_io_size", + "type": "uint16" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "attached", + "type": "bool" + }, + { + "name": "full-path", + "description": "on/off", + "type": "bool" + }, + { + "name": "removable", + "description": "on/off", + "type": "bool" + }, + { + "name": "physical_block_size", + "description": "A power of two between 512 and 32768", + "type": "uint16" + } + ], + "id": "libvirt-28" +} + +{ + "return": [ + { + "name": "iobase", + "type": "uint32" + }, + { + "name": "lost_tick_policy", + "type": "LostTickPolicy" + } + ], + "id": "libvirt-29" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "mmio", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "qemu-extended-regs", + "description": "on/off", + "type": "bool" + }, + { + "name": "big-endian-framebuffer", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-30" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + } + ], + "id": "libvirt-31" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "ram_size_mb", + "type": "uint32" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "vgamem_mb", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "debug", + "type": "uint32" + }, + { + "name": "vram_size_mb", + "type": "uint32" + }, + { + "name": "revision", + "type": "uint32" + }, + { + "name": "ram_size", + "type": "uint32" + }, + { + "name": "vram64_size_mb", + "type": "uint32" + }, + { + "name": "guestdebug", + "type": "uint32" + }, + { + "name": "vram_size", + "type": "uint64" + }, + { + "name": "surfaces", + "type": "int32" + }, + { + "name": "max_outputs", + "type": "uint16" + }, + { + "name": "cmdlog", + "type": "uint32" + } + ], + "id": "libvirt-32" +} + +{ + "return": [ + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "stats", + "description": "on/off", + "type": "bool" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "virgl", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "virtio-backend", + "type": "child<virtio-gpu-device>" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "vectors", + "type": "uint32" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_outputs", + "type": "uint32" + }, + { + "name": "rombar", + "type": "uint32" + } + ], + "id": "libvirt-33" +} + +{ + "return": [ + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "stats", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_outputs", + "type": "uint32" + }, + { + "name": "virgl", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "memory-hotplug-support", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "sci_int", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "gpe0_blk_len", + "type": "uint32" + }, + { + "name": "pm_io_base", + "type": "uint32" + }, + { + "name": "noreboot", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "disable_s4", + "type": "uint8" + }, + { + "name": "acpi_disable_cmd", + "type": "uint8" + }, + { + "name": "cpu-hotplug-legacy", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "disable_s3", + "type": "uint8" + }, + { + "name": "s4_val", + "type": "uint8" + }, + { + "name": "acpi_enable_cmd", + "type": "uint8" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "enable_tco", + "type": "bool" + }, + { + "name": "gpe0_blk", + "type": "uint32" + } + ], + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "disable-modern", + "type": "bool" + }, + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "name": "class", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats", + "type": "guest statistics" + }, + { + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "virtio-backend", + "type": "child<virtio-balloon-device>" + }, + { + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats-polling-interval", + "type": "int" + }, + { + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "deflate-on-oom", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + +{ + "id": "libvirt-37", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'virtio-balloon-ccw' not found" + } +} + +{ + "return": [ + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "guest-stats", + "type": "guest statistics" + }, + { + "name": "guest-stats-polling-interval", + "type": "int" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "deflate-on-oom", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "rombar", + "type": "uint32" + }, + { + "name": "intrs", + "type": "uint32" + }, + { + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "name": "msix", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "name": "msi", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "superspeed-ports-first", + "description": "on/off", + "type": "bool" + }, + { + "name": "streams", + "description": "on/off", + "type": "bool" + }, + { + "name": "romfile", + "type": "str" + }, + { + "name": "force-pcie-endcap", + "description": "on/off", + "type": "bool" + }, + { + "name": "command_serr_enable", + "description": "on/off", + "type": "bool" + }, + { + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "p3", + "type": "uint32" + }, + { + "name": "p2", + "type": "uint32" + }, + { + "name": "slots", + "type": "uint32" + } + ], + "id": "libvirt-39" +} + +{ + "return": [ + { + "hotpluggable-cpus": true, + "name": "pc-0.12", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.3", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": false, + "name": "none", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": false, + "name": "xenpv", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.8", + "is-default": true, + "cpu-max": 255, + "alias": "pc" + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.7", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.11", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.3", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.10", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.2", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.2", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "isapc", + "cpu-max": 1 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "xenfv", + "cpu-max": 128 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.15", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.14", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.6", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-1.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.5", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.1", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.1", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.8", + "cpu-max": 255, + "alias": "q35" + }, + { + "hotpluggable-cpus": true, + "name": "pc-1.0", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-i440fx-2.0", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-q35-2.4", + "cpu-max": 255 + }, + { + "hotpluggable-cpus": true, + "name": "pc-0.13", + "cpu-max": 255 + } + ], + "id": "libvirt-40" +} + +{ + "return": [ + { + "name": "host", + "unavailable-features": [ + "kvm" + ], + "static": false + }, + { + "name": "qemu64", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "qemu32", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "phenom", + "unavailable-features": [ + "fxsr-opt", + "npt" + ], + "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": [ + ], + "static": false + }, + { + "name": "athlon", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Westmere", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Skylake-Client", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm", + "rdseed", + "3dnowprefetch", + "xsavec" + ], + "static": false + }, + { + "name": "SandyBridge", + "unavailable-features": [ + "x2apic", + "tsc-deadline", + "avx" + ], + "static": false + }, + { + "name": "Penryn", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Opteron_G5", + "unavailable-features": [ + "fma", + "avx", + "f16c", + "misalignsse", + "3dnowprefetch", + "xop", + "fma4", + "tbm" + ], + "static": false + }, + { + "name": "Opteron_G4", + "unavailable-features": [ + "avx", + "misalignsse", + "3dnowprefetch", + "xop", + "fma4" + ], + "static": false + }, + { + "name": "Opteron_G3", + "unavailable-features": [ + "misalignsse" + ], + "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": [ + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand" + ], + "static": false + }, + { + "name": "Haswell", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm" + ], + "static": false + }, + { + "name": "Haswell-noTSX", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "avx2", + "invpcid" + ], + "static": false + }, + { + "name": "Conroe", + "unavailable-features": [ + ], + "static": false + }, + { + "name": "Broadwell", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "hle", + "avx2", + "invpcid", + "rtm", + "rdseed", + "3dnowprefetch" + ], + "static": false + }, + { + "name": "Broadwell-noTSX", + "unavailable-features": [ + "fma", + "pcid", + "x2apic", + "tsc-deadline", + "avx", + "f16c", + "rdrand", + "avx2", + "invpcid", + "rdseed", + "3dnowprefetch" + ], + "static": false + }, + { + "name": "486", + "unavailable-features": [ + ], + "static": false + } + ], + "id": "libvirt-41" +} + +{ + "return": { + "enabled": false, + "present": true + }, + "id": "libvirt-42" +} + +{ + "return": [ + "tpm-tis" + ], + "id": "libvirt-43" +} + +{ + "return": [ + "passthrough" + ], + "id": "libvirt-44" +} + +{ + "return": [ + { + "parameters": [ + { + "name": "non-adaptive", + "type": "boolean" + }, + { + "name": "lossy", + "type": "boolean" + }, + { + "name": "acl", + "type": "boolean" + }, + { + "name": "x509verify", + "type": "string" + }, + { + "name": "tls", + "type": "boolean" + }, + { + "name": "sasl", + "type": "boolean" + }, + { + "name": "key-delay-ms", + "type": "number" + }, + { + "name": "lock-key-sync", + "type": "boolean" + }, + { + "name": "reverse", + "type": "boolean" + }, + { + "name": "password", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "to", + "type": "number" + }, + { + "name": "connections", + "type": "number" + }, + { + "name": "head", + "type": "number" + }, + { + "name": "display", + "type": "string" + }, + { + "name": "share", + "type": "string" + }, + { + "name": "x509", + "type": "string" + }, + { + "name": "tls-creds", + "type": "string" + }, + { + "name": "websocket", + "type": "string" + }, + { + "name": "vnc", + "type": "string" + } + ], + "option": "vnc" + }, + { + "parameters": [ + { + "name": "seamless-migration", + "type": "boolean" + }, + { + "name": "playback-compression", + "type": "boolean" + }, + { + "name": "agent-mouse", + "type": "boolean" + }, + { + "name": "streaming-video", + "type": "string" + }, + { + "name": "zlib-glz-wan-compression", + "type": "string" + }, + { + "name": "jpeg-wan-compression", + "type": "string" + }, + { + "name": "image-compression", + "type": "string" + }, + { + "name": "plaintext-channel", + "type": "string" + }, + { + "name": "tls-channel", + "type": "string" + }, + { + "name": "tls-ciphers", + "type": "string" + }, + { + "name": "x509-dh-key-file", + "type": "string" + }, + { + "name": "x509-cacert-file", + "type": "string" + }, + { + "name": "x509-cert-file", + "type": "string" + }, + { + "name": "x509-key-password", + "type": "string" + }, + { + "name": "x509-key-file", + "type": "string" + }, + { + "name": "x509-dir", + "type": "string" + }, + { + "name": "sasl", + "type": "boolean" + }, + { + "name": "disable-agent-file-xfer", + "type": "boolean" + }, + { + "name": "disable-copy-paste", + "type": "boolean" + }, + { + "name": "disable-ticketing", + "type": "boolean" + }, + { + "name": "password", + "type": "string" + }, + { + "name": "unix", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "addr", + "type": "string" + }, + { + "name": "tls-port", + "type": "number" + }, + { + "name": "port", + "type": "number" + } + ], + "option": "spice" + }, + { + "parameters": [ + ], + "option": "smbios" + }, + { + "parameters": [ + ], + "option": "acpi" + }, + { + "parameters": [ + { + "name": "sock_fd", + "type": "number" + }, + { + "name": "socket", + "type": "string" + }, + { + "name": "readonly", + "type": "boolean" + }, + { + "name": "writeout", + "type": "string" + }, + { + "name": "security_model", + "type": "string" + }, + { + "name": "mount_tag", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "fsdriver", + "type": "string" + } + ], + "option": "virtfs" + }, + { + "parameters": [ + { + "name": "sock_fd", + "type": "number" + }, + { + "name": "socket", + "type": "string" + }, + { + "name": "readonly", + "type": "boolean" + }, + { + "name": "writeout", + "type": "string" + }, + { + "name": "security_model", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "fsdriver", + "type": "string" + } + ], + "option": "fsdev" + }, + { + "parameters": [ + { + "name": "timeout", + "help": "Request timeout in seconds (default 0 = no timeout)", + "type": "number" + }, + { + "name": "initiator-name", + "help": "Initiator iqn name to use when connecting", + "type": "string" + }, + { + "name": "header-digest", + "help": "HeaderDigest setting. {CRC32C|CRC32C-NONE|NONE-CRC32C|NONE}", + "type": "string" + }, + { + "name": "password-secret", + "help": "ID of the secret providing password for CHAP authentication to target", + "type": "string" + }, + { + "name": "password", + "help": "password for CHAP authentication to target", + "type": "string" + }, + { + "name": "user", + "help": "username for CHAP authentication to target", + "type": "string" + } + ], + "option": "iscsi" + }, + { + "parameters": [ + { + "name": "string", + "help": "Sets content of the blob to be inserted from a string", + "type": "string" + }, + { + "name": "file", + "help": "Sets the name of the file from which\nthe fw_cfg blob will be loaded", + "type": "string" + }, + { + "name": "name", + "help": "Sets the fw_cfg name of the blob to be inserted", + "type": "string" + } + ], + "option": "fw_cfg" + }, + { + "parameters": [ + { + "name": "arg", + "type": "string" + }, + { + "name": "target", + "type": "string" + }, + { + "name": "enable", + "type": "boolean" + } + ], + "option": "semihosting-config" + }, + { + "parameters": [ + { + "name": "rrfile", + "type": "string" + }, + { + "name": "rr", + "type": "string" + }, + { + "name": "sleep", + "type": "boolean" + }, + { + "name": "align", + "type": "boolean" + }, + { + "name": "shift", + "type": "string" + } + ], + "option": "icount" + }, + { + "parameters": [ + ], + "option": "numa" + }, + { + "parameters": [ + { + "name": "debug-threads", + "help": "When enabled, name the individual threads; defaults off.\nNOTE: The thread names are for debugging and not a\nstable API.", + "type": "boolean" + }, + { + "name": "process", + "help": "Sets the name of the QEMU process, as shown in top etc", + "type": "string" + }, + { + "name": "guest", + "help": "Sets the name of the guest.\nThis name will be displayed in the SDL window caption.\nThe name will also be used for the VNC server", + "type": "string" + } + ], + "option": "name" + }, + { + "parameters": [ + { + "name": "timestamp", + "type": "boolean" + } + ], + "option": "msg" + }, + { + "parameters": [ + { + "name": "mlock", + "type": "boolean" + } + ], + "option": "realtime" + }, + { + "parameters": [ + ], + "option": "tpmdev" + }, + { + "parameters": [ + ], + "option": "object" + }, + { + "parameters": [ + { + "name": "opaque", + "help": "free-form string used to describe fd", + "type": "string" + }, + { + "name": "set", + "help": "ID of the fd set to add fd to", + "type": "number" + }, + { + "name": "fd", + "help": "file descriptor of which a duplicate is added to fd set", + "type": "number" + } + ], + "option": "add-fd" + }, + { + "parameters": [ + { + "name": "enable", + "type": "boolean" + } + ], + "option": "sandbox" + }, + { + "parameters": [ + { + "name": "strict", + "type": "boolean" + }, + { + "name": "reboot-timeout", + "type": "string" + }, + { + "name": "splash-time", + "type": "string" + }, + { + "name": "splash", + "type": "string" + }, + { + "name": "menu", + "type": "boolean" + }, + { + "name": "once", + "type": "string" + }, + { + "name": "order", + "type": "string" + } + ], + "option": "boot-opts" + }, + { + "parameters": [ + { + "name": "maxcpus", + "type": "number" + }, + { + "name": "threads", + "type": "number" + }, + { + "name": "cores", + "type": "number" + }, + { + "name": "sockets", + "type": "number" + }, + { + "name": "cpus", + "type": "number" + } + ], + "option": "smp-opts" + }, + { + "parameters": [ + { + "name": "maxmem", + "type": "size" + }, + { + "name": "slots", + "type": "number" + }, + { + "name": "size", + "type": "size" + } + ], + "option": "memory" + }, + { + "parameters": [ + { + "name": "dea-key-wrap", + "help": "enable/disable DEA key wrapping using the CPACF wrapping key", + "type": "boolean" + }, + { + "name": "aes-key-wrap", + "help": "enable/disable AES key wrapping using the CPACF wrapping key", + "type": "boolean" + }, + { + "name": "suppress-vmdesc", + "help": "Set on to disable self-describing migration", + "type": "boolean" + }, + { + "name": "iommu", + "help": "Set on/off to enable/disable Intel IOMMU (VT-d)", + "type": "boolean" + }, + { + "name": "firmware", + "help": "firmware image", + "type": "string" + }, + { + "name": "usb", + "help": "Set on/off to enable/disable usb", + "type": "boolean" + }, + { + "name": "mem-merge", + "help": "enable/disable memory merge support", + "type": "boolean" + }, + { + "name": "dump-guest-core", + "help": "Include guest memory in a core dump", + "type": "boolean" + }, + { + "name": "dt_compatible", + "help": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "phandle_start", + "help": "The first phandle ID we may generate dynamically", + "type": "number" + }, + { + "name": "dumpdtb", + "help": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "dtb", + "help": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "append", + "help": "Linux kernel command line", + "type": "string" + }, + { + "name": "initrd", + "help": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "kernel", + "help": "Linux kernel image file", + "type": "string" + }, + { + "name": "kvm_shadow_mem", + "help": "KVM shadow MMU size", + "type": "size" + }, + { + "name": "kernel_irqchip", + "help": "use KVM in-kernel irqchip", + "type": "boolean" + }, + { + "name": "accel", + "help": "accelerator list", + "type": "string" + }, + { + "name": "type", + "help": "emulated machine", + "type": "string" + } + ], + "option": "machine" + }, + { + "parameters": [ + { + "name": "romfile", + "type": "string" + }, + { + "name": "bootindex", + "type": "number" + } + ], + "option": "option-rom" + }, + { + "parameters": [ + { + "name": "file", + "type": "string" + }, + { + "name": "events", + "type": "string" + }, + { + "name": "enable", + "type": "string" + } + ], + "option": "trace" + }, + { + "parameters": [ + { + "name": "pretty", + "type": "boolean" + }, + { + "name": "default", + "type": "boolean" + }, + { + "name": "chardev", + "type": "string" + }, + { + "name": "mode", + "type": "string" + } + ], + "option": "mon" + }, + { + "parameters": [ + { + "name": "value", + "type": "string" + }, + { + "name": "property", + "type": "string" + }, + { + "name": "driver", + "type": "string" + } + ], + "option": "global" + }, + { + "parameters": [ + { + "name": "driftfix", + "type": "string" + }, + { + "name": "clock", + "type": "string" + }, + { + "name": "base", + "type": "string" + } + ], + "option": "rtc" + }, + { + "parameters": [ + ], + "option": "net" + }, + { + "parameters": [ + ], + "option": "netdev" + }, + { + "parameters": [ + ], + "option": "device" + }, + { + "parameters": [ + { + "name": "logappend", + "type": "boolean" + }, + { + "name": "logfile", + "type": "string" + }, + { + "name": "append", + "type": "boolean" + }, + { + "name": "chardev", + "type": "string" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "debug", + "type": "number" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "signal", + "type": "boolean" + }, + { + "name": "mux", + "type": "boolean" + }, + { + "name": "rows", + "type": "number" + }, + { + "name": "cols", + "type": "number" + }, + { + "name": "height", + "type": "number" + }, + { + "name": "width", + "type": "number" + }, + { + "name": "tls-creds", + "type": "string" + }, + { + "name": "telnet", + "type": "boolean" + }, + { + "name": "reconnect", + "type": "number" + }, + { + "name": "delay", + "type": "boolean" + }, + { + "name": "server", + "type": "boolean" + }, + { + "name": "wait", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "to", + "type": "number" + }, + { + "name": "localport", + "type": "string" + }, + { + "name": "localaddr", + "type": "string" + }, + { + "name": "port", + "type": "string" + }, + { + "name": "host", + "type": "string" + }, + { + "name": "path", + "type": "string" + }, + { + "name": "backend", + "type": "string" + } + ], + "option": "chardev" + }, + { + "parameters": [ + { + "name": "copy-on-read", + "help": "copy read data from backing file into image file", + "type": "boolean" + }, + { + "name": "werror", + "help": "write error action", + "type": "string" + }, + { + "name": "rerror", + "help": "read error action", + "type": "string" + }, + { + "name": "read-only", + "help": "open drive file as read-only", + "type": "boolean" + }, + { + "name": "file", + "help": "file name", + "type": "string" + }, + { + "name": "serial", + "help": "disk serial number", + "type": "string" + }, + { + "name": "addr", + "help": "pci address (virtio only)", + "type": "string" + }, + { + "name": "boot", + "help": "(deprecated, ignored)", + "type": "boolean" + }, + { + "name": "trans", + "help": "chs translation (auto, lba, none)", + "type": "string" + }, + { + "name": "secs", + "help": "number of sectors (ide disk geometry)", + "type": "number" + }, + { + "name": "heads", + "help": "number of heads (ide disk geometry)", + "type": "number" + }, + { + "name": "cyls", + "help": "number of cylinders (ide disk geometry)", + "type": "number" + }, + { + "name": "if", + "help": "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)", + "type": "string" + }, + { + "name": "media", + "help": "media type (disk, cdrom)", + "type": "string" + }, + { + "name": "index", + "help": "index number", + "type": "number" + }, + { + "name": "unit", + "help": "unit number (i.e. lun for scsi)", + "type": "number" + }, + { + "name": "bus", + "help": "bus number", + "type": "number" + }, + { + "name": "stats-account-failed", + "help": "whether to account for failed I/O operations in the statistics", + "type": "boolean" + }, + { + "name": "stats-account-invalid", + "help": "whether to account for invalid I/O operations in the statistics", + "type": "boolean" + }, + { + "name": "detect-zeroes", + "help": "try to optimize zero writes (off, on, unmap)", + "type": "string" + }, + { + "name": "throttling.group", + "help": "name of the block throttling group", + "type": "string" + }, + { + "name": "throttling.iops-size", + "help": "when limiting by iops max size of an I/O in bytes", + "type": "number" + }, + { + "name": "throttling.bps-write-max-length", + "help": "length of the bps-write-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-read-max-length", + "help": "length of the bps-read-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-total-max-length", + "help": "length of the bps-total-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-write-max-length", + "help": "length of the iops-write-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-read-max-length", + "help": "length of the iops-read-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.iops-total-max-length", + "help": "length of the iops-total-max burst period, in seconds", + "type": "number" + }, + { + "name": "throttling.bps-write-max", + "help": "total bytes write burst", + "type": "number" + }, + { + "name": "throttling.bps-read-max", + "help": "total bytes read burst", + "type": "number" + }, + { + "name": "throttling.bps-total-max", + "help": "total bytes burst", + "type": "number" + }, + { + "name": "throttling.iops-write-max", + "help": "I/O operations write burst", + "type": "number" + }, + { + "name": "throttling.iops-read-max", + "help": "I/O operations read burst", + "type": "number" + }, + { + "name": "throttling.iops-total-max", + "help": "I/O operations burst", + "type": "number" + }, + { + "name": "throttling.bps-write", + "help": "limit write bytes per second", + "type": "number" + }, + { + "name": "throttling.bps-read", + "help": "limit read bytes per second", + "type": "number" + }, + { + "name": "throttling.bps-total", + "help": "limit total bytes per second", + "type": "number" + }, + { + "name": "throttling.iops-write", + "help": "limit write operations per second", + "type": "number" + }, + { + "name": "throttling.iops-read", + "help": "limit read operations per second", + "type": "number" + }, + { + "name": "throttling.iops-total", + "help": "limit total I/O operations per second", + "type": "number" + }, + { + "name": "werror", + "help": "write error action", + "type": "string" + }, + { + "name": "format", + "help": "disk format (raw, qcow2, ...)", + "type": "string" + }, + { + "name": "cache.writeback", + "help": "Enable writeback mode", + "type": "boolean" + }, + { + "name": "aio", + "help": "host AIO implementation (threads, native)", + "type": "string" + }, + { + "name": "snapshot", + "help": "enable/disable snapshot mode", + "type": "boolean" + }, + { + "name": "discard", + "help": "discard operation (ignore/off, unmap/on)", + "type": "string" + }, + { + "name": "read-only", + "help": "Node is opened in read-only mode", + "type": "boolean" + }, + { + "name": "cache.no-flush", + "help": "Ignore flush requests", + "type": "boolean" + }, + { + "name": "cache.direct", + "help": "Bypass software writeback cache on the host", + "type": "boolean" + }, + { + "name": "driver", + "help": "Block driver to use for the node", + "type": "string" + }, + { + "name": "node-name", + "help": "Node name of the block device node", + "type": "string" + } + ], + "option": "drive" + } + ], + "id": "libvirt-45" +} + +{ + "return": [ + { + "state": false, + "capability": "xbzrle" + }, + { + "state": false, + "capability": "rdma-pin-all" + }, + { + "state": false, + "capability": "auto-converge" + }, + { + "state": false, + "capability": "zero-blocks" + }, + { + "state": false, + "capability": "compress" + }, + { + "state": false, + "capability": "events" + }, + { + "state": false, + "capability": "postcopy-ram" + } + ], + "id": "libvirt-46" +} diff --git a/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml new file mode 100644 index 0000000..117b2b0 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml @@ -0,0 +1,260 @@ +<qemuCaps> + <qemuctime>0</qemuctime> + <selfctime>0</selfctime> + <selfvers>0</selfvers> + <usedQMP/> + <flag name='mem-path'/> + <flag name='drive-serial'/> + <flag name='chardev'/> + <flag name='enable-kvm'/> + <flag name='monitor-json'/> + <flag name='sdl'/> + <flag name='netdev'/> + <flag name='rtc'/> + <flag name='vhost-net'/> + <flag name='no-hpet'/> + <flag name='no-kvm-pit'/> + <flag name='pci-configfd'/> + <flag name='nodefconfig'/> + <flag name='boot-menu'/> + <flag name='fsdev'/> + <flag name='name-process'/> + <flag name='smbios-type'/> + <flag name='spice'/> + <flag name='vga-none'/> + <flag name='boot-index'/> + <flag name='hda-duplex'/> + <flag name='drive-aio'/> + <flag name='pci-multibus'/> + <flag name='pci-bootindex'/> + <flag name='chardev-spicevmc'/> + <flag name='virtio-tx-alg'/> + <flag name='pci-multifunction'/> + <flag name='virtio-blk-pci.ioeventfd'/> + <flag name='sga'/> + <flag name='virtio-blk-pci.event_idx'/> + <flag name='virtio-net-pci.event_idx'/> + <flag name='cache-directsync'/> + <flag name='piix3-usb-uhci'/> + <flag name='piix4-usb-uhci'/> + <flag name='usb-ehci'/> + <flag name='ich9-usb-ehci1'/> + <flag name='vt82c686b-usb-uhci'/> + <flag name='pci-ohci'/> + <flag name='usb-redir'/> + <flag name='usb-hub'/> + <flag name='no-shutdown'/> + <flag name='cache-unsafe'/> + <flag name='ich9-ahci'/> + <flag name='no-acpi'/> + <flag name='fsdev-readonly'/> + <flag name='virtio-blk-pci.scsi'/> + <flag name='drive-copy-on-read'/> + <flag name='fsdev-writeout'/> + <flag name='drive-iotune'/> + <flag name='system_wakeup'/> + <flag name='scsi-disk.channel'/> + <flag name='scsi-block'/> + <flag name='transaction'/> + <flag name='block-job-async'/> + <flag name='scsi-cd'/> + <flag name='ide-cd'/> + <flag name='no-user-config'/> + <flag name='hda-micro'/> + <flag name='dump-guest-memory'/> + <flag name='nec-usb-xhci'/> + <flag name='balloon-event'/> + <flag name='bridge'/> + <flag name='lsi'/> + <flag name='virtio-scsi-pci'/> + <flag name='blockio'/> + <flag name='disable-s3'/> + <flag name='disable-s4'/> + <flag name='usb-redir.filter'/> + <flag name='ide-drive.wwn'/> + <flag name='scsi-disk.wwn'/> + <flag name='seccomp-sandbox'/> + <flag name='reboot-timeout'/> + <flag name='dump-guest-core'/> + <flag name='seamless-migration'/> + <flag name='block-commit'/> + <flag name='vnc'/> + <flag name='drive-mirror'/> + <flag name='usb-redir.bootindex'/> + <flag name='usb-host.bootindex'/> + <flag name='blockdev-snapshot-sync'/> + <flag name='qxl'/> + <flag name='VGA'/> + <flag name='cirrus-vga'/> + <flag name='vmware-svga'/> + <flag name='device-video-primary'/> + <flag name='usb-serial'/> + <flag name='usb-net'/> + <flag name='add-fd'/> + <flag name='nbd-server'/> + <flag name='virtio-rng'/> + <flag name='rng-random'/> + <flag name='rng-egd'/> + <flag name='dtb'/> + <flag name='megasas'/> + <flag name='ipv6-migration'/> + <flag name='machine-opt'/> + <flag name='machine-usb-opt'/> + <flag name='tpm-passthrough'/> + <flag name='tpm-tis'/> + <flag name='pci-bridge'/> + <flag name='vfio-pci'/> + <flag name='vfio-pci.bootindex'/> + <flag name='scsi-generic'/> + <flag name='scsi-generic.bootindex'/> + <flag name='mem-merge'/> + <flag name='vnc-websocket'/> + <flag name='drive-discard'/> + <flag name='mlock'/> + <flag name='vnc-share-policy'/> + <flag name='device-del-event'/> + <flag name='dmi-to-pci-bridge'/> + <flag name='i440fx-pci-hole64-size'/> + <flag name='q35-pci-hole64-size'/> + <flag name='usb-storage'/> + <flag name='usb-storage.removable'/> + <flag name='virtio-mmio'/> + <flag name='ich9-intel-hda'/> + <flag name='kvm-pit-lost-tick-policy'/> + <flag name='boot-strict'/> + <flag name='pvpanic'/> + <flag name='spice-file-xfer-disable'/> + <flag name='spiceport'/> + <flag name='usb-kbd'/> + <flag name='host-pci-multidomain'/> + <flag name='msg-timestamp'/> + <flag name='active-commit'/> + <flag name='change-backing-file'/> + <flag name='memory-backend-ram'/> + <flag name='numa'/> + <flag name='memory-backend-file'/> + <flag name='usb-audio'/> + <flag name='rtc-reset-reinjection'/> + <flag name='splash-timeout'/> + <flag name='iothread'/> + <flag name='migrate-rdma'/> + <flag name='ivshmem'/> + <flag name='drive-iotune-max'/> + <flag name='VGA.vgamem_mb'/> + <flag name='vmware-svga.vgamem_mb'/> + <flag name='qxl.vgamem_mb'/> + <flag name='pc-dimm'/> + <flag name='machine-vmport-opt'/> + <flag name='aes-key-wrap'/> + <flag name='dea-key-wrap'/> + <flag name='pci-serial'/> + <flag name='vhost-user-multiqueue'/> + <flag name='migration-event'/> + <flag name='ioh3420'/> + <flag name='x3130-upstream'/> + <flag name='xio3130-downstream'/> + <flag name='rtl8139'/> + <flag name='e1000'/> + <flag name='virtio-net'/> + <flag name='gic-version'/> + <flag name='incoming-defer'/> + <flag name='virtio-gpu'/> + <flag name='virtio-gpu.virgl'/> + <flag name='virtio-keyboard'/> + <flag name='virtio-mouse'/> + <flag name='virtio-tablet'/> + <flag name='virtio-input-host'/> + <flag name='chardev-file-append'/> + <flag name='ich9-disable-s3'/> + <flag name='ich9-disable-s4'/> + <flag name='vserport-change-event'/> + <flag name='virtio-balloon-pci.deflate-on-oom'/> + <flag name='mptsas1068'/> + <flag name='qxl.vram64_size_mb'/> + <flag name='chardev-logfile'/> + <flag name='debug-threads'/> + <flag name='secret'/> + <flag name='pxb'/> + <flag name='pxb-pcie'/> + <flag name='device-tray-moved-event'/> + <flag name='nec-usb-xhci-ports'/> + <flag name='virtio-scsi-pci.iothread'/> + <flag name='name-guest'/> + <flag name='qxl.max_outputs'/> + <flag name='spice-unix'/> + <flag name='drive-detect-zeroes'/> + <flag name='tls-creds-x509'/> + <flag name='display'/> + <flag name='intel-iommu'/> + <flag name='smm'/> + <flag name='virtio-pci-disable-legacy'/> + <flag name='query-hotpluggable-cpus'/> + <flag name='virtio-net.rx_queue_size'/> + <flag name='virtio-vga'/> + <flag name='drive-iotune-max-length'/> + <version>2007050</version> + <kvmVersion>0</kvmVersion> + <package> (v2.7.0-1292-g45b567d-dirty)</package> + <arch>x86_64</arch> + <cpu name='host' usable='no'/> + <cpu name='qemu64' usable='yes'/> + <cpu name='qemu32' usable='yes'/> + <cpu name='phenom' usable='no'/> + <cpu name='pentium3' usable='yes'/> + <cpu name='pentium2' usable='yes'/> + <cpu name='pentium' usable='yes'/> + <cpu name='n270' usable='yes'/> + <cpu name='kvm64' usable='yes'/> + <cpu name='kvm32' usable='yes'/> + <cpu name='coreduo' usable='yes'/> + <cpu name='core2duo' usable='yes'/> + <cpu name='athlon' usable='yes'/> + <cpu name='Westmere' usable='yes'/> + <cpu name='Skylake-Client' usable='no'/> + <cpu name='SandyBridge' usable='no'/> + <cpu name='Penryn' usable='yes'/> + <cpu name='Opteron_G5' usable='no'/> + <cpu name='Opteron_G4' usable='no'/> + <cpu name='Opteron_G3' usable='no'/> + <cpu name='Opteron_G2' usable='yes'/> + <cpu name='Opteron_G1' usable='yes'/> + <cpu name='Nehalem' usable='yes'/> + <cpu name='IvyBridge' usable='no'/> + <cpu name='Haswell' usable='no'/> + <cpu name='Haswell-noTSX' usable='no'/> + <cpu name='Conroe' usable='yes'/> + <cpu name='Broadwell' usable='no'/> + <cpu name='Broadwell-noTSX' usable='no'/> + <cpu name='486' usable='yes'/> + <machine name='pc-i440fx-2.8' alias='pc' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.12' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='xenpv' maxCpus='1'/> + <machine name='pc-i440fx-1.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.11' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.10' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='isapc' hotplugCpus='yes' maxCpus='1'/> + <machine name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='xenfv' hotplugCpus='yes' maxCpus='128'/> + <machine name='pc-0.15' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.14' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.8' alias='q35' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.13' hotplugCpus='yes' maxCpus='255'/> +</qemuCaps> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index c2bf844..a189b86 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -164,6 +164,7 @@ mymain(void) DO_TEST("x86_64", "caps_2.6.0"); DO_TEST("x86_64", "caps_2.7.0"); DO_TEST("x86_64", "caps_2.8.0"); + DO_TEST("x86_64", "caps_2.8.0-tcg"); DO_TEST("aarch64", "caps_2.6.0-gicv2"); DO_TEST("aarch64", "caps_2.6.0-gicv3"); DO_TEST("ppc64le", "caps_2.6.0"); -- 2.10.2
participants (3)
-
Daniel P. Berrange
-
Jiri Denemark
-
Pavel Hrdina