cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks

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>
This commit is contained in:
Maxim Nestratov 2017-01-31 17:12:13 +03:00 committed by Jiri Denemark
parent 644804765b
commit c3ee75e5aa
2 changed files with 9 additions and 3 deletions

View 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),

View 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"