qemu: Implement a stub cpuArchDriver.compare() handler for arm and aarch64

Libvirt calls cpuArchDriver.compare() while doing guest migration.
We don't have any logic to distinguish between different arm and
aarch64 models that's why this patch allows migration to any host.

Signed-off-by: Oleg Strikov <oleg.strikov@canonical.com>
This commit is contained in:
Oleg Strikov 2014-05-07 20:38:10 +04:00 committed by Cole Robinson
parent 77e7a75a8b
commit 825a23d916
2 changed files with 16 additions and 2 deletions

View File

@ -108,11 +108,18 @@ AArch64Baseline(virCPUDefPtr *cpus,
return cpu;
}
static virCPUCompareResult
AArch64Compare(virCPUDefPtr host ATTRIBUTE_UNUSED,
virCPUDefPtr cpu ATTRIBUTE_UNUSED)
{
return VIR_CPU_COMPARE_IDENTICAL;
}
struct cpuArchDriver cpuDriverAARCH64 = {
.name = "aarch64",
.arch = archs,
.narch = ARRAY_CARDINALITY(archs),
.compare = NULL,
.compare = AArch64Compare,
.decode = AArch64Decode,
.encode = NULL,
.free = AArch64DataFree,

View File

@ -109,11 +109,18 @@ ArmBaseline(virCPUDefPtr *cpus,
return cpu;
}
static virCPUCompareResult
ArmCompare(virCPUDefPtr host ATTRIBUTE_UNUSED,
virCPUDefPtr cpu ATTRIBUTE_UNUSED)
{
return VIR_CPU_COMPARE_IDENTICAL;
}
struct cpuArchDriver cpuDriverArm = {
.name = "arm",
.arch = archs,
.narch = ARRAY_CARDINALITY(archs),
.compare = NULL,
.compare = ArmCompare,
.decode = ArmDecode,
.encode = NULL,
.free = ArmDataFree,