提交 825a23d9 编写于 作者: O Oleg Strikov 提交者: Cole Robinson

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: NOleg Strikov <oleg.strikov@canonical.com>
上级 77e7a75a
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册