render / rpms / libvirt

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