mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
cpu_ppc64: Implement virCPUDataNewCopy for ppc64
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
be62707232
commit
85c339955c
@ -603,6 +603,23 @@ virCPUppc64DataIsIdentical(const virCPUData *a,
|
||||
return VIR_CPU_COMPARE_IDENTICAL;
|
||||
}
|
||||
|
||||
static virCPUData *
|
||||
virCPUppc64DataCopyNew(virCPUData *data)
|
||||
{
|
||||
virCPUData *copy;
|
||||
size_t i;
|
||||
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
copy = virCPUDataNew(data->arch);
|
||||
copy->data.ppc64.len = data->data.ppc64.len;
|
||||
for (i = 0; i < copy->data.ppc64.len; ++i)
|
||||
copy->data.ppc64.pvr[i] = data->data.ppc64.pvr[i];
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
static void
|
||||
virCPUppc64DataFree(virCPUData *data)
|
||||
{
|
||||
@ -768,6 +785,7 @@ struct cpuArchDriver cpuDriverPPC64 = {
|
||||
.compare = virCPUppc64Compare,
|
||||
.decode = ppc64DriverDecode,
|
||||
.encode = NULL,
|
||||
.dataCopyNew = virCPUppc64DataCopyNew,
|
||||
.dataFree = virCPUppc64DataFree,
|
||||
.getHost = virCPUppc64GetHost,
|
||||
.baseline = virCPUppc64Baseline,
|
||||
|
Loading…
x
Reference in New Issue
Block a user