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>
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,
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,