mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
cpu_ppc64: Implement virCPUGetVendorForModel
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
311e21ad32
commit
e8efe42409
@ -780,6 +780,25 @@ virCPUppc64DriverGetModels(char ***models)
|
|||||||
return map->nmodels;
|
return map->nmodels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
virCPUppc64GetVendorForModel(const char *modelName)
|
||||||
|
{
|
||||||
|
virCPUppc64Map *map = NULL;
|
||||||
|
virCPUppc64Model *model;
|
||||||
|
|
||||||
|
if (!(map = virCPUppc64GetMap()))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
model = ppc64ModelFind(map, modelName);
|
||||||
|
|
||||||
|
if (!model || !model->vendor)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return model->vendor->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct cpuArchDriver cpuDriverPPC64 = {
|
struct cpuArchDriver cpuDriverPPC64 = {
|
||||||
.name = "ppc64",
|
.name = "ppc64",
|
||||||
.arch = archs,
|
.arch = archs,
|
||||||
@ -793,6 +812,7 @@ struct cpuArchDriver cpuDriverPPC64 = {
|
|||||||
.baseline = virCPUppc64Baseline,
|
.baseline = virCPUppc64Baseline,
|
||||||
.update = virCPUppc64Update,
|
.update = virCPUppc64Update,
|
||||||
.getModels = virCPUppc64DriverGetModels,
|
.getModels = virCPUppc64DriverGetModels,
|
||||||
|
.getVendorForModel = virCPUppc64GetVendorForModel,
|
||||||
.convertLegacy = virCPUppc64ConvertLegacy,
|
.convertLegacy = virCPUppc64ConvertLegacy,
|
||||||
.dataIsIdentical = virCPUppc64DataIsIdentical,
|
.dataIsIdentical = virCPUppc64DataIsIdentical,
|
||||||
};
|
};
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
<model fallback='allow'>POWER8</model>
|
<model fallback='allow'>POWER8</model>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name='custom' supported='yes'>
|
<mode name='custom' supported='yes'>
|
||||||
<model usable='unknown' vendor='unknown'>POWER9</model>
|
<model usable='unknown' vendor='IBM'>POWER9</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER8</model>
|
<model usable='unknown' vendor='IBM'>POWER8</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER7</model>
|
<model usable='unknown' vendor='IBM'>POWER7</model>
|
||||||
</mode>
|
</mode>
|
||||||
</cpu>
|
</cpu>
|
||||||
<memoryBacking supported='yes'>
|
<memoryBacking supported='yes'>
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
<model fallback='allow'>POWER8</model>
|
<model fallback='allow'>POWER8</model>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name='custom' supported='yes'>
|
<mode name='custom' supported='yes'>
|
||||||
<model usable='unknown' vendor='unknown'>POWER10</model>
|
<model usable='unknown' vendor='IBM'>POWER10</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER9</model>
|
<model usable='unknown' vendor='IBM'>POWER9</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER8</model>
|
<model usable='unknown' vendor='IBM'>POWER8</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER7</model>
|
<model usable='unknown' vendor='IBM'>POWER7</model>
|
||||||
</mode>
|
</mode>
|
||||||
</cpu>
|
</cpu>
|
||||||
<memoryBacking supported='yes'>
|
<memoryBacking supported='yes'>
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
<model fallback='allow'>POWER8</model>
|
<model fallback='allow'>POWER8</model>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name='custom' supported='yes'>
|
<mode name='custom' supported='yes'>
|
||||||
<model usable='unknown' vendor='unknown'>POWER10</model>
|
<model usable='unknown' vendor='IBM'>POWER10</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER9</model>
|
<model usable='unknown' vendor='IBM'>POWER9</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER8</model>
|
<model usable='unknown' vendor='IBM'>POWER8</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER7</model>
|
<model usable='unknown' vendor='IBM'>POWER7</model>
|
||||||
</mode>
|
</mode>
|
||||||
</cpu>
|
</cpu>
|
||||||
<memoryBacking supported='yes'>
|
<memoryBacking supported='yes'>
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
<model fallback='allow'>POWER8</model>
|
<model fallback='allow'>POWER8</model>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name='custom' supported='yes'>
|
<mode name='custom' supported='yes'>
|
||||||
<model usable='unknown' vendor='unknown'>POWER10</model>
|
<model usable='unknown' vendor='IBM'>POWER10</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER9</model>
|
<model usable='unknown' vendor='IBM'>POWER9</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER8</model>
|
<model usable='unknown' vendor='IBM'>POWER8</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER7</model>
|
<model usable='unknown' vendor='IBM'>POWER7</model>
|
||||||
</mode>
|
</mode>
|
||||||
</cpu>
|
</cpu>
|
||||||
<memoryBacking supported='yes'>
|
<memoryBacking supported='yes'>
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
<model fallback='allow'>POWER8</model>
|
<model fallback='allow'>POWER8</model>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name='custom' supported='yes'>
|
<mode name='custom' supported='yes'>
|
||||||
<model usable='unknown' vendor='unknown'>POWER10</model>
|
<model usable='unknown' vendor='IBM'>POWER10</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER9</model>
|
<model usable='unknown' vendor='IBM'>POWER9</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER8</model>
|
<model usable='unknown' vendor='IBM'>POWER8</model>
|
||||||
<model usable='unknown' vendor='unknown'>POWER7</model>
|
<model usable='unknown' vendor='IBM'>POWER7</model>
|
||||||
</mode>
|
</mode>
|
||||||
</cpu>
|
</cpu>
|
||||||
<memoryBacking supported='yes'>
|
<memoryBacking supported='yes'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user