<feature policy='require' name='vmx'/>
</mode>
<mode name='custom' supported='yes'>
- <model usable='no' deprecated='no' vendor='Intel'>Broadwell</model>
+ <model usable='no' deprecated='no' vendor='Intel' canonical='Broadwell-v1'>Broadwell</model>
<blockers model='Broadwell'>
<feature name='hle'/>
<feature name='rtm'/>
</blockers>
- <model usable='yes' deprecated='no' vendor='Intel'>Broadwell-noTSX</model>
+ <model usable='yes' deprecated='no' vendor='Intel' canonical='Broadwell-v2'>Broadwell-noTSX</model>
<model usable='no' deprecated='no' vendor='AMD'>EPYC-Milan</model>
<blockers model='EPYC-Milan'>
<feature name='clzero'/>
the hypervisor's policy on usage of this model :since:`(since 7.1.0)`. The
``vendor`` attribute :since:`(since 8.9.0)` contains the vendor of the CPU
model for users who want to use CPU models with specific vendors only. CPU
- models with undefined vendor will be listed with ``vendor='unkwnown'``.
+ models with undefined vendor will be listed with ``vendor='unkwnown'``. The
+ ``canonical`` attribute :since:`(since 10.10.0)` contains a canonical name of
+ the CPU model if the model is actually an alias to another one.
I/O Threads
~~~~~~~~~~~
g_free(cpuModels->models[i].name);
g_strfreev(cpuModels->models[i].blockers);
g_free(cpuModels->models[i].vendor);
+ g_free(cpuModels->models[i].canonical);
}
g_free(cpuModels->models);
old->models[i].usable,
old->models[i].blockers,
old->models[i].deprecated,
- old->models[i].vendor);
+ old->models[i].vendor,
+ old->models[i].canonical);
}
return cpuModels;
virDomainCapsCPUUsable usable,
char **blockers,
bool deprecated,
- const char *vendor)
+ const char *vendor,
+ const char *canonical)
{
virDomainCapsCPUModel *cpu;
cpu->blockers = g_strdupv(blockers);
cpu->deprecated = deprecated;
cpu->vendor = g_strdup(vendor);
+ cpu->canonical = g_strdup(canonical);
}
else
virBufferAddLit(buf, " vendor='unknown'");
+ if (model->canonical)
+ virBufferAsprintf(buf, " canonical='%s'", model->canonical);
+
virBufferAsprintf(buf, ">%s</model>\n", model->name);
if (model->blockers) {
char **blockers; /* NULL-terminated list of usability blockers */
bool deprecated;
char *vendor;
+ char *canonical;
};
typedef struct _virDomainCapsCPUModels virDomainCapsCPUModels;
virDomainCapsCPUUsable usable,
char **blockers,
bool deprecated,
- const char *vendor);
+ const char *vendor,
+ const char *canonical);
virDomainCapsCPUModel *
virDomainCapsCPUModelsGet(virDomainCapsCPUModels *cpuModels,
const char *name);
qemuMonitorCPUDefs *defs,
const char **modelAllowed,
const char **modelForbidden,
- bool vendors)
+ bool extraInfo)
{
virDomainCapsCPUModels *cpuModels = NULL;
size_t i;
for (i = 0; i < defs->ncpus; i++) {
qemuMonitorCPUDefInfo *cpu = defs->cpus + i;
const char *vendor = NULL;
+ const char *canonical = NULL;
if (modelAllowed && !g_strv_contains(modelAllowed, cpu->name))
continue;
if (modelForbidden && g_strv_contains(modelForbidden, cpu->name))
continue;
- if (vendors)
+ if (extraInfo) {
vendor = virCPUGetVendorForModel(arch, cpu->name);
+ canonical = virCPUGetCanonicalModel(arch, cpu->name);
+ }
virDomainCapsCPUModelsAdd(cpuModels, cpu->name, cpu->usable,
- cpu->blockers, cpu->deprecated, vendor);
+ cpu->blockers, cpu->deprecated,
+ vendor, canonical);
}
virDomainCapsCPUModelsSort(cpuModels);
}
virDomainCapsCPUModelsAdd(models, expected->model,
- usable, blockers, false, expected->vendor);
+ usable, blockers, false,
+ expected->vendor, NULL);
cpu->fallback = VIR_CPU_FALLBACK_ALLOW;
ignore_value(virCPUTranslate(data->arch, cpu, models));
for (model = list; *model; model++) {
virDomainCapsCPUModelsAdd(cpus, *model,
VIR_DOMCAPS_CPU_USABLE_UNKNOWN,
- NULL, false, NULL);
+ NULL, false, NULL, NULL);
}
return cpus;