forked from rpms/libvirt
83 lines
3.2 KiB
Diff
83 lines
3.2 KiB
Diff
From 900c638797181010d2341a8a5496c1335286353e Mon Sep 17 00:00:00 2001
|
|
Message-Id: <900c638797181010d2341a8a5496c1335286353e@dist-git>
|
|
From: Jiri Denemark <jdenemar@redhat.com>
|
|
Date: Fri, 7 Feb 2020 12:01:18 +0100
|
|
Subject: [PATCH] cpu: Drop CPUID definition for hv-spinlocks
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
hv-spinlocks is not a CPUID feature and should not be checked as such.
|
|
While starting a domain with hv-spinlocks enabled, we would report a
|
|
warning about unsupported hyperv spinlocks feature even though it was
|
|
set properly.
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
(cherry picked from commit ad9d5d3a6a1fc86fca1620278cbd113e08370ba2)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1794868
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Message-Id: <f3040b3536c025c78b1613a487c519993a950c24.1581073232.git.jdenemar@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
src/cpu/cpu_x86.c | 3 ---
|
|
src/qemu/qemu_process.c | 5 +++--
|
|
2 files changed, 3 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
index 0459a0d1c8..a985913e5e 100644
|
|
--- a/src/cpu/cpu_x86.c
|
|
+++ b/src/cpu/cpu_x86.c
|
|
@@ -88,8 +88,6 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
|
|
0x40000003, 0x00000008);
|
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
|
|
0x40000003, 0x00000020);
|
|
-KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
|
|
- 0x40000003, 0x00000022);
|
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
|
|
0x40000003, 0x00000030);
|
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX,
|
|
@@ -110,7 +108,6 @@ static virCPUx86Feature x86_kvm_features[] =
|
|
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),
|
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
index 312ce69ba5..17d48357b3 100644
|
|
--- a/src/qemu/qemu_process.c
|
|
+++ b/src/qemu/qemu_process.c
|
|
@@ -3917,7 +3917,8 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
|
|
|
|
for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
|
|
/* always supported string property */
|
|
- if (i == VIR_DOMAIN_HYPERV_VENDOR_ID)
|
|
+ if (i == VIR_DOMAIN_HYPERV_VENDOR_ID ||
|
|
+ i == VIR_DOMAIN_HYPERV_SPINLOCKS)
|
|
continue;
|
|
|
|
if (def->hyperv_features[i] != VIR_TRISTATE_SWITCH_ON)
|
|
@@ -3938,7 +3939,6 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
|
|
switch ((virDomainHyperv) i) {
|
|
case VIR_DOMAIN_HYPERV_RELAXED:
|
|
case VIR_DOMAIN_HYPERV_VAPIC:
|
|
- case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
|
VIR_WARN("host doesn't support hyperv '%s' feature",
|
|
virDomainHypervTypeToString(i));
|
|
break;
|
|
@@ -3957,6 +3957,7 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
|
|
return -1;
|
|
|
|
/* coverity[dead_error_begin] */
|
|
+ case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
|
case VIR_DOMAIN_HYPERV_VENDOR_ID:
|
|
case VIR_DOMAIN_HYPERV_LAST:
|
|
break;
|
|
--
|
|
2.25.0
|
|
|