return g_steal_pointer(&map);
}
-static virCPUData *
-ppc64MakeCPUData(virArch arch,
- virCPUppc64Data *data)
-{
- g_autoptr(virCPUData) cpuData = NULL;
-
- cpuData = g_new0(virCPUData, 1);
- cpuData->arch = arch;
-
- if (ppc64DataCopy(&cpuData->data.ppc64, data) < 0)
- return NULL;
-
- return g_steal_pointer(&cpuData);
-}
-
static virCPUCompareResult
ppc64Compute(virCPUDef *host,
const virCPUDef *other,
- virCPUData **guestData,
char **message)
{
g_autoptr(virCPUppc64Map) map = NULL;
g_autoptr(virCPUppc64Model) host_model = NULL;
g_autoptr(virCPUppc64Model) guest_model = NULL;
g_autoptr(virCPUDef) cpu = NULL;
- virArch arch;
size_t i;
/* Ensure existing configurations are handled correctly */
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
- arch = cpu->arch;
- } else {
- arch = host->arch;
}
if (cpu->vendor &&
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
- if (guestData)
- if (!(*guestData = ppc64MakeCPUData(arch, &guest_model->data)))
- return VIR_CPU_COMPARE_ERROR;
-
return VIR_CPU_COMPARE_IDENTICAL;
}
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
- ret = ppc64Compute(host, cpu, NULL, &message);
+ ret = ppc64Compute(host, cpu, &message);
if (failIncompatible && ret == VIR_CPU_COMPARE_INCOMPATIBLE) {
ret = VIR_CPU_COMPARE_ERROR;