From: Oleg Strikov Date: Wed, 7 May 2014 16:38:10 +0000 (+0400) Subject: qemu: Implement a stub cpuArchDriver.compare() handler for arm and aarch64 X-Git-Tag: v1.2.5-rc1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=825a23d916224536a46efc7a590379ebf949c15a;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/cpu/cpu_aarch64.c b/src/cpu/cpu_aarch64.c index 3c3e749f7c..7255d9fdf6 100644 --- a/src/cpu/cpu_aarch64.c +++ b/src/cpu/cpu_aarch64.c @@ -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, diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index ec80b35473..53bf4f499e 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -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,