mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Probe "max" CPU model in TCG
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
2fc215dd2a
commit
d7f054a512
@ -401,13 +401,15 @@ struct _virQEMUCaps {
|
||||
size_t ngicCapabilities;
|
||||
virGICCapability *gicCapabilities;
|
||||
|
||||
qemuMonitorCPUModelInfoPtr hostCPUModelInfo;
|
||||
qemuMonitorCPUModelInfoPtr kvmCPUModelInfo;
|
||||
qemuMonitorCPUModelInfoPtr tcgCPUModelInfo;
|
||||
|
||||
/* Anything below is not stored in the cache since the values are
|
||||
* re-computed from the other fields or external data sources every
|
||||
* time we probe QEMU or load the results from the cache.
|
||||
*/
|
||||
virCPUDefPtr hostCPUModel;
|
||||
virCPUDefPtr kvmCPUModel;
|
||||
virCPUDefPtr tcgCPUModel;
|
||||
};
|
||||
|
||||
struct virQEMUCapsSearchData {
|
||||
@ -2162,12 +2164,20 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (qemuCaps->hostCPUModel &&
|
||||
!(ret->hostCPUModel = virCPUDefCopy(qemuCaps->hostCPUModel)))
|
||||
if (qemuCaps->kvmCPUModel &&
|
||||
!(ret->kvmCPUModel = virCPUDefCopy(qemuCaps->kvmCPUModel)))
|
||||
goto error;
|
||||
|
||||
if (qemuCaps->hostCPUModelInfo &&
|
||||
!(ret->hostCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->hostCPUModelInfo)))
|
||||
if (qemuCaps->tcgCPUModel &&
|
||||
!(ret->tcgCPUModel = virCPUDefCopy(qemuCaps->tcgCPUModel)))
|
||||
goto error;
|
||||
|
||||
if (qemuCaps->kvmCPUModelInfo &&
|
||||
!(ret->kvmCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->kvmCPUModelInfo)))
|
||||
goto error;
|
||||
|
||||
if (qemuCaps->tcgCPUModelInfo &&
|
||||
!(ret->tcgCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->tcgCPUModelInfo)))
|
||||
goto error;
|
||||
|
||||
if (VIR_ALLOC_N(ret->machineTypes, qemuCaps->nmachineTypes) < 0)
|
||||
@ -2216,8 +2226,10 @@ void virQEMUCapsDispose(void *obj)
|
||||
|
||||
VIR_FREE(qemuCaps->gicCapabilities);
|
||||
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo);
|
||||
virCPUDefFree(qemuCaps->hostCPUModel);
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->kvmCPUModelInfo);
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->tcgCPUModelInfo);
|
||||
virCPUDefFree(qemuCaps->kvmCPUModel);
|
||||
virCPUDefFree(qemuCaps->tcgCPUModel);
|
||||
}
|
||||
|
||||
void
|
||||
@ -2442,9 +2454,13 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
|
||||
virCPUDefPtr
|
||||
virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps)
|
||||
virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type)
|
||||
{
|
||||
return qemuCaps->hostCPUModel;
|
||||
if (type == VIR_DOMAIN_VIRT_KVM)
|
||||
return qemuCaps->kvmCPUModel;
|
||||
else
|
||||
return qemuCaps->tcgCPUModel;
|
||||
}
|
||||
|
||||
|
||||
@ -2462,7 +2478,7 @@ virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps,
|
||||
virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch);
|
||||
|
||||
case VIR_CPU_MODE_HOST_MODEL:
|
||||
return !!qemuCaps->hostCPUModel;
|
||||
return !!virQEMUCapsGetHostModel(qemuCaps, type);
|
||||
|
||||
case VIR_CPU_MODE_CUSTOM:
|
||||
if (type == VIR_DOMAIN_VIRT_KVM)
|
||||
@ -2829,14 +2845,24 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
static int
|
||||
virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps,
|
||||
qemuMonitorPtr mon)
|
||||
qemuMonitorPtr mon,
|
||||
bool tcg)
|
||||
{
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION) ||
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
|
||||
qemuMonitorCPUModelInfoPtr *modelInfo;
|
||||
const char *model;
|
||||
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION))
|
||||
return 0;
|
||||
|
||||
return qemuMonitorGetCPUModelExpansion(mon, "static", "host",
|
||||
&qemuCaps->hostCPUModelInfo);
|
||||
if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
|
||||
modelInfo = &qemuCaps->tcgCPUModelInfo;
|
||||
model = "max";
|
||||
} else {
|
||||
modelInfo = &qemuCaps->kvmCPUModelInfo;
|
||||
model = "host";
|
||||
}
|
||||
|
||||
return qemuMonitorGetCPUModelExpansion(mon, "static", model, modelInfo);
|
||||
}
|
||||
|
||||
struct tpmTypeToCaps {
|
||||
@ -3061,11 +3087,17 @@ virQEMUCapsCPUFilterFeatures(const char *name,
|
||||
*/
|
||||
static int
|
||||
virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type,
|
||||
virCPUDefPtr cpu)
|
||||
{
|
||||
qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo;
|
||||
qemuMonitorCPUModelInfoPtr modelInfo;
|
||||
size_t i;
|
||||
|
||||
if (type == VIR_DOMAIN_VIRT_KVM)
|
||||
modelInfo = qemuCaps->kvmCPUModelInfo;
|
||||
else
|
||||
modelInfo = qemuCaps->tcgCPUModelInfo;
|
||||
|
||||
if (!modelInfo) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("missing host CPU model info from QEMU capabilities "
|
||||
@ -3106,12 +3138,13 @@ virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps,
|
||||
*/
|
||||
static int
|
||||
virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type,
|
||||
virCPUDefPtr cpu)
|
||||
{
|
||||
int ret = 1;
|
||||
|
||||
if (ARCH_IS_S390(qemuCaps->arch))
|
||||
ret = virQEMUCapsInitCPUModelS390(qemuCaps, cpu);
|
||||
ret = virQEMUCapsInitCPUModelS390(qemuCaps, type, cpu);
|
||||
|
||||
if (ret == 0)
|
||||
cpu->fallback = VIR_CPU_FALLBACK_FORBID;
|
||||
@ -3122,7 +3155,8 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
void
|
||||
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
virCapsPtr caps)
|
||||
virCapsPtr caps,
|
||||
virDomainVirtType type)
|
||||
{
|
||||
virCPUDefPtr cpu = NULL;
|
||||
int rc;
|
||||
@ -3138,7 +3172,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
cpu->match = VIR_CPU_MATCH_EXACT;
|
||||
cpu->fallback = VIR_CPU_FALLBACK_ALLOW;
|
||||
|
||||
if ((rc = virQEMUCapsInitCPUModel(qemuCaps, cpu)) < 0) {
|
||||
if ((rc = virQEMUCapsInitCPUModel(qemuCaps, type, cpu)) < 0) {
|
||||
goto error;
|
||||
} else if (rc == 1) {
|
||||
VIR_DEBUG("No host CPU model info from QEMU; using host capabilities");
|
||||
@ -3151,7 +3185,11 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
goto error;
|
||||
}
|
||||
|
||||
qemuCaps->hostCPUModel = cpu;
|
||||
if (type == VIR_DOMAIN_VIRT_KVM)
|
||||
qemuCaps->kvmCPUModel = cpu;
|
||||
else
|
||||
qemuCaps->tcgCPUModel = cpu;
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
@ -3162,7 +3200,8 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
static int
|
||||
virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
|
||||
xmlXPathContextPtr ctxt)
|
||||
xmlXPathContextPtr ctxt,
|
||||
virDomainVirtType virtType)
|
||||
{
|
||||
char *str = NULL;
|
||||
xmlNodePtr hostCPUNode;
|
||||
@ -3173,7 +3212,12 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
|
||||
size_t i;
|
||||
int n;
|
||||
|
||||
if (!(hostCPUNode = virXPathNode("./hostCPU", ctxt))) {
|
||||
if (virtType == VIR_DOMAIN_VIRT_KVM)
|
||||
hostCPUNode = virXPathNode("./hostCPU[@type='kvm']", ctxt);
|
||||
else
|
||||
hostCPUNode = virXPathNode("./hostCPU[@type='tcg']", ctxt);
|
||||
|
||||
if (!hostCPUNode) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -3253,7 +3297,10 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
|
||||
}
|
||||
}
|
||||
|
||||
qemuCaps->hostCPUModelInfo = hostCPU;
|
||||
if (virtType == VIR_DOMAIN_VIRT_KVM)
|
||||
qemuCaps->kvmCPUModelInfo = hostCPU;
|
||||
else
|
||||
qemuCaps->tcgCPUModelInfo = hostCPU;
|
||||
hostCPU = NULL;
|
||||
ret = 0;
|
||||
|
||||
@ -3460,7 +3507,8 @@ virQEMUCapsLoadCache(virCapsPtr caps,
|
||||
}
|
||||
VIR_FREE(str);
|
||||
|
||||
if (virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt) < 0)
|
||||
if (virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt, VIR_DOMAIN_VIRT_KVM) < 0 ||
|
||||
virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt, VIR_DOMAIN_VIRT_QEMU) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsLoadCPUModels(qemuCaps, ctxt, VIR_DOMAIN_VIRT_KVM) < 0 ||
|
||||
@ -3568,7 +3616,8 @@ virQEMUCapsLoadCache(virCapsPtr caps,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps);
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_KVM);
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU);
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
@ -3582,12 +3631,26 @@ virQEMUCapsLoadCache(virCapsPtr caps,
|
||||
|
||||
static void
|
||||
virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
|
||||
virBufferPtr buf)
|
||||
virBufferPtr buf,
|
||||
virDomainVirtType type)
|
||||
{
|
||||
qemuMonitorCPUModelInfoPtr model = qemuCaps->hostCPUModelInfo;
|
||||
qemuMonitorCPUModelInfoPtr model;
|
||||
const char *typeStr;
|
||||
size_t i;
|
||||
|
||||
virBufferAsprintf(buf, "<hostCPU model='%s'>\n", model->name);
|
||||
if (type == VIR_DOMAIN_VIRT_KVM) {
|
||||
typeStr = "kvm";
|
||||
model = qemuCaps->kvmCPUModelInfo;
|
||||
} else {
|
||||
typeStr = "tcg";
|
||||
model = qemuCaps->tcgCPUModelInfo;
|
||||
}
|
||||
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
virBufferAsprintf(buf, "<hostCPU type='%s' model='%s'>\n",
|
||||
typeStr, model->name);
|
||||
virBufferAdjustIndent(buf, 2);
|
||||
|
||||
for (i = 0; i < model->nprops; i++) {
|
||||
@ -3698,8 +3761,8 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps,
|
||||
virBufferAsprintf(&buf, "<arch>%s</arch>\n",
|
||||
virArchToString(qemuCaps->arch));
|
||||
|
||||
if (qemuCaps->hostCPUModelInfo)
|
||||
virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf);
|
||||
virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf, VIR_DOMAIN_VIRT_KVM);
|
||||
virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf, VIR_DOMAIN_VIRT_QEMU);
|
||||
|
||||
virQEMUCapsFormatCPUModels(qemuCaps, &buf, VIR_DOMAIN_VIRT_KVM);
|
||||
virQEMUCapsFormatCPUModels(qemuCaps, &buf, VIR_DOMAIN_VIRT_QEMU);
|
||||
@ -3834,11 +3897,15 @@ virQEMUCapsReset(virQEMUCapsPtr qemuCaps)
|
||||
VIR_FREE(qemuCaps->gicCapabilities);
|
||||
qemuCaps->ngicCapabilities = 0;
|
||||
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo);
|
||||
qemuCaps->hostCPUModelInfo = NULL;
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->kvmCPUModelInfo);
|
||||
qemuMonitorCPUModelInfoFree(qemuCaps->tcgCPUModelInfo);
|
||||
qemuCaps->kvmCPUModelInfo = NULL;
|
||||
qemuCaps->tcgCPUModelInfo = NULL;
|
||||
|
||||
virCPUDefFree(qemuCaps->hostCPUModel);
|
||||
qemuCaps->hostCPUModel = NULL;
|
||||
virCPUDefFree(qemuCaps->kvmCPUModel);
|
||||
virCPUDefFree(qemuCaps->tcgCPUModel);
|
||||
qemuCaps->kvmCPUModel = NULL;
|
||||
qemuCaps->tcgCPUModel = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -4374,7 +4441,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA) &&
|
||||
virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0)
|
||||
goto cleanup;
|
||||
if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon) < 0)
|
||||
if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, false) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* 'intel-iommu' shows up as a device since 2.2.0, but can
|
||||
@ -4416,6 +4483,9 @@ virQEMUCapsInitQMPMonitorTCG(virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
|
||||
if (virQEMUCapsProbeQMPCPUDefinitions(qemuCaps, mon, true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
return ret;
|
||||
@ -4760,7 +4830,8 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps,
|
||||
virQEMUCapsRememberCached(qemuCaps, cacheDir) < 0)
|
||||
goto error;
|
||||
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps);
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_KVM);
|
||||
virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@ -5206,8 +5277,10 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps,
|
||||
domCaps->cpu.hostPassthrough = true;
|
||||
|
||||
if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype,
|
||||
VIR_CPU_MODE_HOST_MODEL))
|
||||
domCaps->cpu.hostModel = virCPUDefCopy(qemuCaps->hostCPUModel);
|
||||
VIR_CPU_MODE_HOST_MODEL)) {
|
||||
virCPUDefPtr cpu = virQEMUCapsGetHostModel(qemuCaps, domCaps->virttype);
|
||||
domCaps->cpu.hostModel = virCPUDefCopy(cpu);
|
||||
}
|
||||
|
||||
if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype,
|
||||
VIR_CPU_MODE_CUSTOM)) {
|
||||
|
@ -442,7 +442,8 @@ int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type,
|
||||
char ***names,
|
||||
size_t *count);
|
||||
virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps);
|
||||
virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type);
|
||||
bool virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps,
|
||||
virCapsPtr caps,
|
||||
virDomainVirtType type,
|
||||
|
@ -75,5 +75,6 @@ virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
void
|
||||
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
virCapsPtr caps);
|
||||
virCapsPtr caps,
|
||||
virDomainVirtType type);
|
||||
#endif
|
||||
|
@ -6666,7 +6666,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
||||
if (def->cpu->mode == VIR_CPU_MODE_CUSTOM)
|
||||
cpuDef = def->cpu;
|
||||
else if (def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
|
||||
cpuDef = virQEMUCapsGetHostModel(qemuCaps);
|
||||
cpuDef = virQEMUCapsGetHostModel(qemuCaps, def->virtType);
|
||||
|
||||
if (cpuDef) {
|
||||
int svm = virCPUCheckFeature(def->os.arch, cpuDef, "svm");
|
||||
|
@ -5181,13 +5181,14 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
|
||||
/* custom CPUs in TCG mode don't need to be compared to host CPU */
|
||||
if (def->virtType != VIR_DOMAIN_VIRT_QEMU ||
|
||||
def->cpu->mode != VIR_CPU_MODE_CUSTOM) {
|
||||
if (virCPUCompare(caps->host.arch, virQEMUCapsGetHostModel(qemuCaps),
|
||||
if (virCPUCompare(caps->host.arch,
|
||||
virQEMUCapsGetHostModel(qemuCaps, def->virtType),
|
||||
def->cpu, true) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virCPUUpdate(def->os.arch, def->cpu,
|
||||
virQEMUCapsGetHostModel(qemuCaps)) < 0)
|
||||
virQEMUCapsGetHostModel(qemuCaps, def->virtType)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsGetCPUDefinitions(qemuCaps, def->virtType,
|
||||
|
@ -13378,3 +13378,11 @@
|
||||
],
|
||||
"id": "libvirt-2"
|
||||
}
|
||||
|
||||
{
|
||||
"id": "libvirt-3",
|
||||
"error": {
|
||||
"class": "GenericError",
|
||||
"desc": "The CPU definition 'max' is unknown."
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<package></package>
|
||||
<arch>s390x</arch>
|
||||
<hostCPU model='zEC12.2-base'>
|
||||
<hostCPU type='kvm' model='zEC12.2-base'>
|
||||
<property name='aefsi' type='boolean' value='true'/>
|
||||
<property name='msa5' type='boolean' value='true'/>
|
||||
<property name='msa4' type='boolean' value='true'/>
|
||||
|
@ -14889,3 +14889,182 @@
|
||||
],
|
||||
"id": "libvirt-2"
|
||||
}
|
||||
|
||||
{
|
||||
"return": {
|
||||
"model": {
|
||||
"name": "base",
|
||||
"props": {
|
||||
"cmov": true,
|
||||
"ia64": false,
|
||||
"aes": true,
|
||||
"mmx": true,
|
||||
"rdpid": false,
|
||||
"arat": true,
|
||||
"pause-filter": false,
|
||||
"xsavec": false,
|
||||
"osxsave": false,
|
||||
"kvm-asyncpf": false,
|
||||
"perfctr-core": false,
|
||||
"mpx": true,
|
||||
"pbe": false,
|
||||
"avx512cd": false,
|
||||
"decodeassists": false,
|
||||
"sse4.1": true,
|
||||
"family": 6,
|
||||
"avx512f": false,
|
||||
"msr": true,
|
||||
"mce": true,
|
||||
"mca": true,
|
||||
"xcrypt": false,
|
||||
"min-level": 13,
|
||||
"xgetbv1": true,
|
||||
"cid": false,
|
||||
"ds": false,
|
||||
"fxsr": true,
|
||||
"xsaveopt": true,
|
||||
"xtpr": false,
|
||||
"avx512vl": false,
|
||||
"avx512-vpopcntdq": false,
|
||||
"phe": false,
|
||||
"extapic": false,
|
||||
"3dnowprefetch": false,
|
||||
"cr8legacy": true,
|
||||
"xcrypt-en": false,
|
||||
"pn": false,
|
||||
"dca": false,
|
||||
"vendor": "AuthenticAMD",
|
||||
"pku": true,
|
||||
"smx": false,
|
||||
"cmp-legacy": false,
|
||||
"avx512-4fmaps": false,
|
||||
"vmcb-clean": false,
|
||||
"hle": false,
|
||||
"3dnowext": true,
|
||||
"npt": false,
|
||||
"clwb": true,
|
||||
"lbrv": false,
|
||||
"adx": true,
|
||||
"ss": true,
|
||||
"pni": true,
|
||||
"svm-lock": false,
|
||||
"smep": true,
|
||||
"smap": true,
|
||||
"pfthreshold": false,
|
||||
"x2apic": false,
|
||||
"avx512vbmi": false,
|
||||
"flushbyasid": false,
|
||||
"f16c": false,
|
||||
"ace2-en": false,
|
||||
"pae": true,
|
||||
"pat": true,
|
||||
"sse": true,
|
||||
"phe-en": false,
|
||||
"kvm-nopiodelay": false,
|
||||
"tm": false,
|
||||
"kvmclock-stable-bit": false,
|
||||
"hypervisor": true,
|
||||
"pcommit": true,
|
||||
"syscall": true,
|
||||
"avx512dq": false,
|
||||
"svm": true,
|
||||
"invtsc": false,
|
||||
"sse2": true,
|
||||
"est": false,
|
||||
"avx512ifma": false,
|
||||
"tm2": false,
|
||||
"kvm-pv-eoi": false,
|
||||
"cx8": true,
|
||||
"kvm-mmu": false,
|
||||
"sse4.2": true,
|
||||
"pge": true,
|
||||
"pdcm": false,
|
||||
"model": 6,
|
||||
"movbe": true,
|
||||
"nrip-save": false,
|
||||
"ssse3": true,
|
||||
"sse4a": true,
|
||||
"invpcid": false,
|
||||
"pdpe1gb": true,
|
||||
"tsc-deadline": false,
|
||||
"fma": false,
|
||||
"cx16": true,
|
||||
"de": true,
|
||||
"stepping": 3,
|
||||
"xsave": true,
|
||||
"clflush": true,
|
||||
"skinit": false,
|
||||
"tsc": true,
|
||||
"tce": false,
|
||||
"fpu": true,
|
||||
"ds-cpl": false,
|
||||
"ibs": false,
|
||||
"fma4": false,
|
||||
"la57": true,
|
||||
"osvw": false,
|
||||
"apic": true,
|
||||
"pmm": false,
|
||||
"tsc-adjust": false,
|
||||
"kvm-steal-time": false,
|
||||
"kvmclock": false,
|
||||
"lwp": false,
|
||||
"xop": false,
|
||||
"avx": false,
|
||||
"ospke": true,
|
||||
"acpi": true,
|
||||
"avx512bw": false,
|
||||
"ace2": false,
|
||||
"fsgsbase": true,
|
||||
"ht": false,
|
||||
"nx": true,
|
||||
"pclmulqdq": true,
|
||||
"mmxext": true,
|
||||
"popcnt": true,
|
||||
"xsaves": false,
|
||||
"lm": true,
|
||||
"umip": false,
|
||||
"pse": true,
|
||||
"avx2": false,
|
||||
"sep": true,
|
||||
"nodeid-msr": false,
|
||||
"misalignsse": false,
|
||||
"min-xlevel": 2147483658,
|
||||
"bmi1": true,
|
||||
"bmi2": true,
|
||||
"kvm-pv-unhalt": false,
|
||||
"tsc-scale": false,
|
||||
"topoext": false,
|
||||
"clflushopt": true,
|
||||
"monitor": true,
|
||||
"avx512er": false,
|
||||
"pmm-en": false,
|
||||
"pcid": false,
|
||||
"3dnow": true,
|
||||
"erms": true,
|
||||
"lahf-lm": true,
|
||||
"fxsr-opt": false,
|
||||
"xstore": false,
|
||||
"rtm": false,
|
||||
"lmce": false,
|
||||
"perfctr-nb": false,
|
||||
"rdrand": false,
|
||||
"rdseed": false,
|
||||
"avx512-4vnniw": false,
|
||||
"vme": false,
|
||||
"vmx": false,
|
||||
"dtes64": false,
|
||||
"mtrr": true,
|
||||
"rdtscp": true,
|
||||
"pse36": true,
|
||||
"tbm": false,
|
||||
"wdt": false,
|
||||
"model-id": "QEMU TCG CPU version 2.5+",
|
||||
"sha-ni": false,
|
||||
"abm": true,
|
||||
"avx512pf": false,
|
||||
"xstore-en": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "libvirt-3"
|
||||
}
|
||||
|
@ -206,7 +206,7 @@
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<package> (v2.8.0-1961-g5b10b94bd5)</package>
|
||||
<arch>x86_64</arch>
|
||||
<hostCPU model='base'>
|
||||
<hostCPU type='kvm' model='base'>
|
||||
<property name='cmov' type='boolean' value='true'/>
|
||||
<property name='ia64' type='boolean' value='false'/>
|
||||
<property name='aes' type='boolean' value='true'/>
|
||||
@ -376,6 +376,176 @@
|
||||
<property name='avx512pf' type='boolean' value='false'/>
|
||||
<property name='xstore-en' type='boolean' value='false'/>
|
||||
</hostCPU>
|
||||
<hostCPU type='tcg' model='base'>
|
||||
<property name='cmov' type='boolean' value='true'/>
|
||||
<property name='ia64' type='boolean' value='false'/>
|
||||
<property name='aes' type='boolean' value='true'/>
|
||||
<property name='mmx' type='boolean' value='true'/>
|
||||
<property name='rdpid' type='boolean' value='false'/>
|
||||
<property name='arat' type='boolean' value='true'/>
|
||||
<property name='pause-filter' type='boolean' value='false'/>
|
||||
<property name='xsavec' type='boolean' value='false'/>
|
||||
<property name='osxsave' type='boolean' value='false'/>
|
||||
<property name='kvm-asyncpf' type='boolean' value='false'/>
|
||||
<property name='perfctr-core' type='boolean' value='false'/>
|
||||
<property name='mpx' type='boolean' value='true'/>
|
||||
<property name='pbe' type='boolean' value='false'/>
|
||||
<property name='avx512cd' type='boolean' value='false'/>
|
||||
<property name='decodeassists' type='boolean' value='false'/>
|
||||
<property name='sse4.1' type='boolean' value='true'/>
|
||||
<property name='family' type='number' value='6'/>
|
||||
<property name='avx512f' type='boolean' value='false'/>
|
||||
<property name='msr' type='boolean' value='true'/>
|
||||
<property name='mce' type='boolean' value='true'/>
|
||||
<property name='mca' type='boolean' value='true'/>
|
||||
<property name='xcrypt' type='boolean' value='false'/>
|
||||
<property name='min-level' type='number' value='13'/>
|
||||
<property name='xgetbv1' type='boolean' value='true'/>
|
||||
<property name='cid' type='boolean' value='false'/>
|
||||
<property name='ds' type='boolean' value='false'/>
|
||||
<property name='fxsr' type='boolean' value='true'/>
|
||||
<property name='xsaveopt' type='boolean' value='true'/>
|
||||
<property name='xtpr' type='boolean' value='false'/>
|
||||
<property name='avx512vl' type='boolean' value='false'/>
|
||||
<property name='avx512-vpopcntdq' type='boolean' value='false'/>
|
||||
<property name='phe' type='boolean' value='false'/>
|
||||
<property name='extapic' type='boolean' value='false'/>
|
||||
<property name='3dnowprefetch' type='boolean' value='false'/>
|
||||
<property name='cr8legacy' type='boolean' value='true'/>
|
||||
<property name='xcrypt-en' type='boolean' value='false'/>
|
||||
<property name='pn' type='boolean' value='false'/>
|
||||
<property name='dca' type='boolean' value='false'/>
|
||||
<property name='vendor' type='string' value='AuthenticAMD'/>
|
||||
<property name='pku' type='boolean' value='true'/>
|
||||
<property name='smx' type='boolean' value='false'/>
|
||||
<property name='cmp-legacy' type='boolean' value='false'/>
|
||||
<property name='avx512-4fmaps' type='boolean' value='false'/>
|
||||
<property name='vmcb-clean' type='boolean' value='false'/>
|
||||
<property name='hle' type='boolean' value='false'/>
|
||||
<property name='3dnowext' type='boolean' value='true'/>
|
||||
<property name='npt' type='boolean' value='false'/>
|
||||
<property name='clwb' type='boolean' value='true'/>
|
||||
<property name='lbrv' type='boolean' value='false'/>
|
||||
<property name='adx' type='boolean' value='true'/>
|
||||
<property name='ss' type='boolean' value='true'/>
|
||||
<property name='pni' type='boolean' value='true'/>
|
||||
<property name='svm-lock' type='boolean' value='false'/>
|
||||
<property name='smep' type='boolean' value='true'/>
|
||||
<property name='smap' type='boolean' value='true'/>
|
||||
<property name='pfthreshold' type='boolean' value='false'/>
|
||||
<property name='x2apic' type='boolean' value='false'/>
|
||||
<property name='avx512vbmi' type='boolean' value='false'/>
|
||||
<property name='flushbyasid' type='boolean' value='false'/>
|
||||
<property name='f16c' type='boolean' value='false'/>
|
||||
<property name='ace2-en' type='boolean' value='false'/>
|
||||
<property name='pae' type='boolean' value='true'/>
|
||||
<property name='pat' type='boolean' value='true'/>
|
||||
<property name='sse' type='boolean' value='true'/>
|
||||
<property name='phe-en' type='boolean' value='false'/>
|
||||
<property name='kvm-nopiodelay' type='boolean' value='false'/>
|
||||
<property name='tm' type='boolean' value='false'/>
|
||||
<property name='kvmclock-stable-bit' type='boolean' value='false'/>
|
||||
<property name='hypervisor' type='boolean' value='true'/>
|
||||
<property name='pcommit' type='boolean' value='true'/>
|
||||
<property name='syscall' type='boolean' value='true'/>
|
||||
<property name='avx512dq' type='boolean' value='false'/>
|
||||
<property name='svm' type='boolean' value='true'/>
|
||||
<property name='invtsc' type='boolean' value='false'/>
|
||||
<property name='sse2' type='boolean' value='true'/>
|
||||
<property name='est' type='boolean' value='false'/>
|
||||
<property name='avx512ifma' type='boolean' value='false'/>
|
||||
<property name='tm2' type='boolean' value='false'/>
|
||||
<property name='kvm-pv-eoi' type='boolean' value='false'/>
|
||||
<property name='cx8' type='boolean' value='true'/>
|
||||
<property name='kvm-mmu' type='boolean' value='false'/>
|
||||
<property name='sse4.2' type='boolean' value='true'/>
|
||||
<property name='pge' type='boolean' value='true'/>
|
||||
<property name='pdcm' type='boolean' value='false'/>
|
||||
<property name='model' type='number' value='6'/>
|
||||
<property name='movbe' type='boolean' value='true'/>
|
||||
<property name='nrip-save' type='boolean' value='false'/>
|
||||
<property name='ssse3' type='boolean' value='true'/>
|
||||
<property name='sse4a' type='boolean' value='true'/>
|
||||
<property name='invpcid' type='boolean' value='false'/>
|
||||
<property name='pdpe1gb' type='boolean' value='true'/>
|
||||
<property name='tsc-deadline' type='boolean' value='false'/>
|
||||
<property name='fma' type='boolean' value='false'/>
|
||||
<property name='cx16' type='boolean' value='true'/>
|
||||
<property name='de' type='boolean' value='true'/>
|
||||
<property name='stepping' type='number' value='3'/>
|
||||
<property name='xsave' type='boolean' value='true'/>
|
||||
<property name='clflush' type='boolean' value='true'/>
|
||||
<property name='skinit' type='boolean' value='false'/>
|
||||
<property name='tsc' type='boolean' value='true'/>
|
||||
<property name='tce' type='boolean' value='false'/>
|
||||
<property name='fpu' type='boolean' value='true'/>
|
||||
<property name='ds-cpl' type='boolean' value='false'/>
|
||||
<property name='ibs' type='boolean' value='false'/>
|
||||
<property name='fma4' type='boolean' value='false'/>
|
||||
<property name='la57' type='boolean' value='true'/>
|
||||
<property name='osvw' type='boolean' value='false'/>
|
||||
<property name='apic' type='boolean' value='true'/>
|
||||
<property name='pmm' type='boolean' value='false'/>
|
||||
<property name='tsc-adjust' type='boolean' value='false'/>
|
||||
<property name='kvm-steal-time' type='boolean' value='false'/>
|
||||
<property name='kvmclock' type='boolean' value='false'/>
|
||||
<property name='lwp' type='boolean' value='false'/>
|
||||
<property name='xop' type='boolean' value='false'/>
|
||||
<property name='avx' type='boolean' value='false'/>
|
||||
<property name='ospke' type='boolean' value='true'/>
|
||||
<property name='acpi' type='boolean' value='true'/>
|
||||
<property name='avx512bw' type='boolean' value='false'/>
|
||||
<property name='ace2' type='boolean' value='false'/>
|
||||
<property name='fsgsbase' type='boolean' value='true'/>
|
||||
<property name='ht' type='boolean' value='false'/>
|
||||
<property name='nx' type='boolean' value='true'/>
|
||||
<property name='pclmulqdq' type='boolean' value='true'/>
|
||||
<property name='mmxext' type='boolean' value='true'/>
|
||||
<property name='popcnt' type='boolean' value='true'/>
|
||||
<property name='xsaves' type='boolean' value='false'/>
|
||||
<property name='lm' type='boolean' value='true'/>
|
||||
<property name='umip' type='boolean' value='false'/>
|
||||
<property name='pse' type='boolean' value='true'/>
|
||||
<property name='avx2' type='boolean' value='false'/>
|
||||
<property name='sep' type='boolean' value='true'/>
|
||||
<property name='nodeid-msr' type='boolean' value='false'/>
|
||||
<property name='misalignsse' type='boolean' value='false'/>
|
||||
<property name='min-xlevel' type='number' value='2147483658'/>
|
||||
<property name='bmi1' type='boolean' value='true'/>
|
||||
<property name='bmi2' type='boolean' value='true'/>
|
||||
<property name='kvm-pv-unhalt' type='boolean' value='false'/>
|
||||
<property name='tsc-scale' type='boolean' value='false'/>
|
||||
<property name='topoext' type='boolean' value='false'/>
|
||||
<property name='clflushopt' type='boolean' value='true'/>
|
||||
<property name='monitor' type='boolean' value='true'/>
|
||||
<property name='avx512er' type='boolean' value='false'/>
|
||||
<property name='pmm-en' type='boolean' value='false'/>
|
||||
<property name='pcid' type='boolean' value='false'/>
|
||||
<property name='3dnow' type='boolean' value='true'/>
|
||||
<property name='erms' type='boolean' value='true'/>
|
||||
<property name='lahf-lm' type='boolean' value='true'/>
|
||||
<property name='fxsr-opt' type='boolean' value='false'/>
|
||||
<property name='xstore' type='boolean' value='false'/>
|
||||
<property name='rtm' type='boolean' value='false'/>
|
||||
<property name='lmce' type='boolean' value='false'/>
|
||||
<property name='perfctr-nb' type='boolean' value='false'/>
|
||||
<property name='rdrand' type='boolean' value='false'/>
|
||||
<property name='rdseed' type='boolean' value='false'/>
|
||||
<property name='avx512-4vnniw' type='boolean' value='false'/>
|
||||
<property name='vme' type='boolean' value='false'/>
|
||||
<property name='vmx' type='boolean' value='false'/>
|
||||
<property name='dtes64' type='boolean' value='false'/>
|
||||
<property name='mtrr' type='boolean' value='true'/>
|
||||
<property name='rdtscp' type='boolean' value='true'/>
|
||||
<property name='pse36' type='boolean' value='true'/>
|
||||
<property name='tbm' type='boolean' value='false'/>
|
||||
<property name='wdt' type='boolean' value='false'/>
|
||||
<property name='model-id' type='string' value='QEMU TCG CPU version 2.5+'/>
|
||||
<property name='sha-ni' type='boolean' value='false'/>
|
||||
<property name='abm' type='boolean' value='true'/>
|
||||
<property name='avx512pf' type='boolean' value='false'/>
|
||||
<property name='xstore-en' type='boolean' value='false'/>
|
||||
</hostCPU>
|
||||
<cpu type='kvm' name='max' usable='yes'/>
|
||||
<cpu type='kvm' name='host' usable='yes'/>
|
||||
<cpu type='kvm' name='base' usable='yes'/>
|
||||
|
@ -389,7 +389,8 @@ testUpdateQEMUCaps(const struct testInfo *info,
|
||||
if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0)
|
||||
goto cleanup;
|
||||
|
||||
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps);
|
||||
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps, VIR_DOMAIN_VIRT_KVM);
|
||||
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU);
|
||||
|
||||
virQEMUCapsFilterByMachineType(info->qemuCaps, vm->def->os.machine);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user