|
Pablo Greco |
40546a |
From a7a5fd909ea7a5d7608568e94f9a0f7d4478719b Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
40546a |
Message-Id: <a7a5fd909ea7a5d7608568e94f9a0f7d4478719b@dist-git>
|
|
Pablo Greco |
40546a |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Date: Fri, 7 Feb 2020 10:41:43 +0100
|
|
Pablo Greco |
40546a |
Subject: [PATCH] cpu: Drop KVM_ from hyperv feature macros
|
|
Pablo Greco |
40546a |
MIME-Version: 1.0
|
|
Pablo Greco |
40546a |
Content-Type: text/plain; charset=UTF-8
|
|
Pablo Greco |
40546a |
Content-Transfer-Encoding: 8bit
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
All the features are hyperv features even though they are provided by
|
|
Pablo Greco |
40546a |
KVM with QEMU. The "KVM" part in the macro names does not make a lot of
|
|
Pablo Greco |
40546a |
sense.
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
(cherry picked from commit 1ddf014fef4468a15303029fbc563da0aaaf8ce4)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
https://bugzilla.redhat.com/show_bug.cgi?id=1794868
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Conflicts:
|
|
Pablo Greco |
40546a |
src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
src/cpu/cpu_x86_data.h
|
|
Pablo Greco |
40546a |
- a few extra hyperv features upstream
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Message-Id: <c98a0f397787d6b62621728aed00f48b77521c2c.1581064395.git.jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
---
|
|
Pablo Greco |
40546a |
src/cpu/cpu_x86.c | 45 +++++++++++++++++++++--------------------
|
|
Pablo Greco |
40546a |
src/cpu/cpu_x86_data.h | 22 ++++++++++----------
|
|
Pablo Greco |
40546a |
src/qemu/qemu_command.c | 2 +-
|
|
Pablo Greco |
40546a |
3 files changed, 35 insertions(+), 34 deletions(-)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
index cf5ef442e7..ecf11926b4 100644
|
|
Pablo Greco |
40546a |
--- a/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
+++ b/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
@@ -95,27 +95,28 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT,
|
|
Pablo Greco |
40546a |
0x40000001, 0x00000080);
|
|
Pablo Greco |
40546a |
KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT,
|
|
Pablo Greco |
40546a |
0x40000001, 0x01000000);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RUNTIME,
|
|
Pablo Greco |
40546a |
+
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000001);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SYNIC,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_SYNIC,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000004);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_STIMER,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000008);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RELAXED,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000020);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCKS,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000022);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VAPIC,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000030);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VPINDEX,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000040);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RESET,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_RESET,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000080);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_FREQUENCIES,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00000800);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT,
|
|
Pablo Greco |
40546a |
0x40000003, 0x00002000);
|
|
Pablo Greco |
40546a |
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_TLBFLUSH,
|
|
Pablo Greco |
40546a |
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
|
|
Pablo Greco |
40546a |
0x40000004, 0x00000004);
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
static virCPUx86Feature x86_kvm_features[] =
|
|
Pablo Greco |
40546a |
@@ -129,17 +130,17 @@ static virCPUx86Feature x86_kvm_features[] =
|
|
Pablo Greco |
40546a |
KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI),
|
|
Pablo Greco |
40546a |
KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT),
|
|
Pablo Greco |
40546a |
KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RUNTIME),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_SYNIC),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_STIMER),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RELAXED),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_SPINLOCKS),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_VAPIC),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_VPINDEX),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_RESET),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_FREQUENCIES),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT),
|
|
Pablo Greco |
40546a |
- KVM_FEATURE(VIR_CPU_x86_KVM_HV_TLBFLUSH),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_RELAXED),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_SPINLOCKS),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_VAPIC),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_RESET),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT),
|
|
Pablo Greco |
40546a |
+ KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH),
|
|
Pablo Greco |
40546a |
};
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
typedef struct _virCPUx86Model virCPUx86Model;
|
|
Pablo Greco |
40546a |
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
|
|
Pablo Greco |
40546a |
index 77797f633c..9668b13eb9 100644
|
|
Pablo Greco |
40546a |
--- a/src/cpu/cpu_x86_data.h
|
|
Pablo Greco |
40546a |
+++ b/src/cpu/cpu_x86_data.h
|
|
Pablo Greco |
40546a |
@@ -64,17 +64,17 @@ struct _virCPUx86MSR {
|
|
Pablo Greco |
40546a |
* ones defined for virDomainHyperv in domain_conf.c.
|
|
Pablo Greco |
40546a |
* E.g "hv-runtime" -> "runtime", "hv-spinlocks" -> "spinlocks" etc.
|
|
Pablo Greco |
40546a |
*/
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_RUNTIME "hv-runtime"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_SYNIC "hv-synic"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_STIMER "hv-stimer"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_RELAXED "hv-relaxed"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_SPINLOCKS "hv-spinlocks"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_VAPIC "hv-vapic"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_VPINDEX "hv-vpindex"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_RESET "hv-reset"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_FREQUENCIES "hv-frequencies"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "hv-reenlightenment"
|
|
Pablo Greco |
40546a |
-# define VIR_CPU_x86_KVM_HV_TLBFLUSH "hv-tlbflush"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_RUNTIME "hv-runtime"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_SYNIC "hv-synic"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_STIMER "hv-stimer"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_RELAXED "hv-relaxed"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_SPINLOCKS "hv-spinlocks"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_VAPIC "hv-vapic"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_VPINDEX "hv-vpindex"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_RESET "hv-reset"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_FREQUENCIES "hv-frequencies"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_REENLIGHTENMENT "hv-reenlightenment"
|
|
Pablo Greco |
40546a |
+# define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush"
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
# define VIR_CPU_X86_DATA_INIT { 0 }
|
|
Pablo Greco |
40546a |
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
Pablo Greco |
40546a |
index 0289a907a1..71e102747c 100644
|
|
Pablo Greco |
40546a |
--- a/src/qemu/qemu_command.c
|
|
Pablo Greco |
40546a |
+++ b/src/qemu/qemu_command.c
|
|
Pablo Greco |
40546a |
@@ -7039,7 +7039,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
|
Pablo Greco |
40546a |
case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
|
Pablo Greco |
40546a |
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
|
|
Pablo Greco |
40546a |
virBufferAsprintf(&buf, ",%s=0x%x",
|
|
Pablo Greco |
40546a |
- VIR_CPU_x86_KVM_HV_SPINLOCKS,
|
|
Pablo Greco |
40546a |
+ VIR_CPU_x86_HV_SPINLOCKS,
|
|
Pablo Greco |
40546a |
def->hyperv_spinlocks);
|
|
Pablo Greco |
40546a |
break;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
--
|
|
Pablo Greco |
40546a |
2.25.0
|
|
Pablo Greco |
40546a |
|