]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks
authorMaxim Nestratov <mnestratov@virtuozzo.com>
Tue, 31 Jan 2017 14:12:13 +0000 (17:12 +0300)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 9 Feb 2017 12:52:16 +0000 (13:52 +0100)
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@virtuozzo.com>
src/cpu/cpu_x86.c
src/cpu/cpu_x86_data.h

index 9e22f896e9b9bf4b3c4152dd6565fa2fdecfe935..d9764a26034d4b855be05ec1ee57b757978047d0 100644 (file)
@@ -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),
index 4660ab682124d0a62d3522e3e094b4858462736c..b89110f16c8dd0ec3d3419a378a158a143321157 100644 (file)
@@ -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 for virDomainHyperv 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"