[PATCH v2] cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Strings associated with virDomainHyperv values in domain_conf.c are used to
construct HyperV CPU features names to be compared with names defined in
cpu_x86_data.h and the names for HyperV "spinlocks" feature don't match.
This leads to a misleading warning:
"host doesn't support hyperv 'spinlocks' feature" even when it's supported.
Let's fix it and rename along with it VIR_CPU_x86_KVM_HV_SPINLOCK to
VIR_CPU_x86_KVM_HV_SPINLOCKS.

Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx>
---
 src/cpu/cpu_x86.c      | 4 ++--
 src/cpu/cpu_x86_data.h | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 23a519e..40d98ee 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -100,7 +100,7 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_STIMER,
                 0x40000003, 0x00000008);
 KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RELAXED,
                 0x40000003, 0x00000020);
-KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCK,
+KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCKS,
                 0x40000003, 0x00000022);
 KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VAPIC,
                 0x40000003, 0x00000030);
@@ -124,7 +124,7 @@ static virCPUx86Feature x86_kvm_features[] =
     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_SPINLOCK),
+    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),
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
index 4660ab6..4c51e43 100644
--- a/src/cpu/cpu_x86_data.h
+++ b/src/cpu/cpu_x86_data.h
@@ -49,11 +49,17 @@ struct _virCPUx86CPUID {
 # define VIR_CPU_x86_KVM_PV_EOI       "__kvm_pv_eoi"
 # define VIR_CPU_x86_KVM_PV_UNHALT    "__kvm_pv_unhalt"
 # define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable"
+
+/*
+ * The following HyperV feature names suffixes must exactly match corresponding
+ * ones defined in domain_conf.c. E.g "__kvm_runtime" -> "runtime",
+ * "__kvm_hv_spinlocks" -> "spinlocks" etc.
+*/
 # define VIR_CPU_x86_KVM_HV_RUNTIME   "__kvm_hv_runtime"
 # define VIR_CPU_x86_KVM_HV_SYNIC     "__kvm_hv_synic"
 # define VIR_CPU_x86_KVM_HV_STIMER    "__kvm_hv_stimer"
 # define VIR_CPU_x86_KVM_HV_RELAXED   "__kvm_hv_relaxed"
-# define VIR_CPU_x86_KVM_HV_SPINLOCK  "__kvm_hv_spinlock"
+# define VIR_CPU_x86_KVM_HV_SPINLOCKS  "__kvm_hv_spinlocks"
 # define VIR_CPU_x86_KVM_HV_VAPIC     "__kvm_hv_vapic"
 # define VIR_CPU_x86_KVM_HV_VPINDEX   "__kvm_hv_vpindex"
 # define VIR_CPU_x86_KVM_HV_RESET     "__kvm_hv_reset"
-- 
2.4.11

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux