libvirt/libvirt-cpu-Introduce-mock-checkFeature-method-for-ARM-CPUS.patch

42 lines
1.0 KiB
Diff
Raw Normal View History

2019-09-30 10:58:53 -04:00
From bed928dada1ed8fe50dd4792d7b201df29016c12 Mon Sep 17 00:00:00 2001
From: Xu Yandong <xuyandong2@huawei.com>
Date: Fri, 6 Sep 2019 12:30:15 +0800
Subject: [PATCH] cpu: Introduce mock checkFeature method for ARM CPUS
Introduce mock checkFeature method for ARM to avoid
runtime error messages.
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
---
src/cpu/cpu_arm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index b3bc379..5733ddc 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -1009,6 +1009,14 @@ virCPUarmCompare(virCPUDefPtr host,
}
+static int
+virCPUarmCheckFeature(const virCPUDef *cpu ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+
struct cpuArchDriver cpuDriverArm = {
.name = "arm",
.arch = archs,
@@ -1020,4 +1028,5 @@ struct cpuArchDriver cpuDriverArm = {
.getHost = virCPUarmGetHost,
.baseline = virCPUarmBaseline,
.update = virCPUarmUpdate,
+ .checkFeature = virCPUarmCheckFeature,
};
--
2.19.1