mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
cpu_x86: Move *CheckFeature functions
They are static and we will need to call them a little bit closer to the beginning of the file. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fcf4846a6b
commit
e17d10386b
@ -2707,6 +2707,41 @@ cpuidSet(uint32_t base, virCPUDataPtr data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virCPUx86CheckFeature(const virCPUDef *cpu,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
int ret = -1;
|
||||||
|
virCPUx86MapPtr map;
|
||||||
|
virCPUx86ModelPtr model = NULL;
|
||||||
|
|
||||||
|
if (!(map = virCPUx86GetMap()))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (!(model = x86ModelFromCPU(cpu, map, -1)))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
ret = x86FeatureInData(name, &model->data, map);
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
x86ModelFree(model);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virCPUx86DataCheckFeature(const virCPUData *data,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
virCPUx86MapPtr map;
|
||||||
|
|
||||||
|
if (!(map = virCPUx86GetMap()))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return x86FeatureInData(name, &data->data.x86, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virCPUx86GetHost(virCPUDefPtr cpu,
|
virCPUx86GetHost(virCPUDefPtr cpu,
|
||||||
virDomainCapsCPUModelsPtr models)
|
virDomainCapsCPUModelsPtr models)
|
||||||
@ -3063,40 +3098,6 @@ virCPUx86UpdateLive(virCPUDefPtr cpu,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
virCPUx86CheckFeature(const virCPUDef *cpu,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
int ret = -1;
|
|
||||||
virCPUx86MapPtr map;
|
|
||||||
virCPUx86ModelPtr model = NULL;
|
|
||||||
|
|
||||||
if (!(map = virCPUx86GetMap()))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!(model = x86ModelFromCPU(cpu, map, -1)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
ret = x86FeatureInData(name, &model->data, map);
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
x86ModelFree(model);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
virCPUx86DataCheckFeature(const virCPUData *data,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
virCPUx86MapPtr map;
|
|
||||||
|
|
||||||
if (!(map = virCPUx86GetMap()))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return x86FeatureInData(name, &data->data.x86, map);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virCPUx86GetModels(char ***models)
|
virCPUx86GetModels(char ***models)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user