All the features are hyperv features even though they are provided by
KVM with QEMU. The "KVM" part in the macro names does not make a lot of
sense.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu_x86.c | 53 +++++++++++++++++++++--------------------
src/cpu/cpu_x86_data.h | 26 ++++++++++----------
src/qemu/qemu_command.c | 2 +-
3 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 55b55da784..f8a51dedf6 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -91,31 +91,32 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT,
0x40000001, 0x00000080);
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
0x40000001, 0x01000000);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RUNTIME,
+
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME,
0x40000003, 0x00000001);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SYNIC,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_SYNIC,
0x40000003, 0x00000004);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_STIMER,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
0x40000003, 0x00000008);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RELAXED,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
0x40000003, 0x00000020);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCKS,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
0x40000003, 0x00000022);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VAPIC,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
0x40000003, 0x00000030);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VPINDEX,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX,
0x40000003, 0x00000040);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RESET,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RESET,
0x40000003, 0x00000080);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_FREQUENCIES,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES,
0x40000003, 0x00000800);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT,
0x40000003, 0x00002000);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_TLBFLUSH,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
0x40000004, 0x00000004);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_IPI,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI,
0x40000004, 0x00000400);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_EVMCS,
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
0x40000004, 0x00004000);
static virCPUx86Feature x86_kvm_features[] =
@@ -129,19 +130,19 @@ static virCPUx86Feature x86_kvm_features[] =
KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI),
KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT),
KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RUNTIME),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_SYNIC),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_STIMER),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RELAXED),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_SPINLOCKS),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_VAPIC),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_VPINDEX),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RESET),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_FREQUENCIES),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_TLBFLUSH),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_IPI),
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_EVMCS),
+ KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME),
+ KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
+ KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
+ KVM_FEATURE(VIR_CPU_x86_HV_RELAXED),
+ KVM_FEATURE(VIR_CPU_x86_HV_SPINLOCKS),
+ KVM_FEATURE(VIR_CPU_x86_HV_VAPIC),
+ KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX),
+ KVM_FEATURE(VIR_CPU_x86_HV_RESET),
+ KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES),
+ KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT),
+ KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH),
+ KVM_FEATURE(VIR_CPU_x86_HV_IPI),
+ KVM_FEATURE(VIR_CPU_x86_HV_EVMCS),
};
typedef struct _virCPUx86Model virCPUx86Model;
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
index bb781707aa..85aaab709c 100644
--- a/src/cpu/cpu_x86_data.h
+++ b/src/cpu/cpu_x86_data.h
@@ -58,19 +58,19 @@ struct _virCPUx86MSR {
* ones defined for virDomainHyperv in domain_conf.c.
* E.g "hv-runtime" -> "runtime", "hv-spinlocks" ->
"spinlocks" etc.
*/
-#define VIR_CPU_x86_KVM_HV_RUNTIME "hv-runtime"
-#define VIR_CPU_x86_KVM_HV_SYNIC "hv-synic"
-#define VIR_CPU_x86_KVM_HV_STIMER "hv-stimer"
-#define VIR_CPU_x86_KVM_HV_RELAXED "hv-relaxed"
-#define VIR_CPU_x86_KVM_HV_SPINLOCKS "hv-spinlocks"
-#define VIR_CPU_x86_KVM_HV_VAPIC "hv-vapic"
-#define VIR_CPU_x86_KVM_HV_VPINDEX "hv-vpindex"
-#define VIR_CPU_x86_KVM_HV_RESET "hv-reset"
-#define VIR_CPU_x86_KVM_HV_FREQUENCIES "hv-frequencies"
-#define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "hv-reenlightenment"
-#define VIR_CPU_x86_KVM_HV_TLBFLUSH "hv-tlbflush"
-#define VIR_CPU_x86_KVM_HV_IPI "hv-ipi"
-#define VIR_CPU_x86_KVM_HV_EVMCS "hv-evmcs"
+#define VIR_CPU_x86_HV_RUNTIME "hv-runtime"
+#define VIR_CPU_x86_HV_SYNIC "hv-synic"
+#define VIR_CPU_x86_HV_STIMER "hv-stimer"
+#define VIR_CPU_x86_HV_RELAXED "hv-relaxed"
+#define VIR_CPU_x86_HV_SPINLOCKS "hv-spinlocks"
+#define VIR_CPU_x86_HV_VAPIC "hv-vapic"
+#define VIR_CPU_x86_HV_VPINDEX "hv-vpindex"
+#define VIR_CPU_x86_HV_RESET "hv-reset"
+#define VIR_CPU_x86_HV_FREQUENCIES "hv-frequencies"
+#define VIR_CPU_x86_HV_REENLIGHTENMENT "hv-reenlightenment"
+#define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush"
+#define VIR_CPU_x86_HV_IPI "hv-ipi"
+#define VIR_CPU_x86_HV_EVMCS "hv-evmcs"
#define VIR_CPU_X86_DATA_INIT { 0 }
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c2f99034c8..7b2cfa0683 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7179,7 +7179,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
case VIR_DOMAIN_HYPERV_SPINLOCKS:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
virBufferAsprintf(&buf, ",%s=0x%x",
- VIR_CPU_x86_KVM_HV_SPINLOCKS,
+ VIR_CPU_x86_HV_SPINLOCKS,
def->hyperv_spinlocks);
break;
--
2.22.0