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

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

 



31-Jan-17 14:54, Jiri Denemark пишет:

On Tue, Jan 31, 2017 at 13:59:37 +0300, Maxim Nestratov wrote:
Corresponding hv cpu feature name is 'spinlocks' thus, we should have similar
name with __kvm_hv_ prefix. Otherwise we have misleading warning:
"host doesn't support hyperv 'spinlocks' feature" even when it's supported.

Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx>
---
  src/cpu/cpu_x86_data.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
index 4660ab6..4f3940b 100644
--- a/src/cpu/cpu_x86_data.h
+++ b/src/cpu/cpu_x86_data.h
@@ -53,7 +53,7 @@ struct _virCPUx86CPUID {
  # 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_SPINLOCK  "__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"
It took me a while to realized how this change can fix the issue. It's
because the strings associated with virDomainHyperv values are used to
construct these CPU features names and the names for this particular
feature didn't match. To avoid possible confusion in the future I'd
suggest adding a comment in cpu_x86_data.h saying the feature names must
match the strings for virDomainHyperv in domain_conf.c.

And while at it, I think you can
s/VIR_CPU_x86_KVM_HV_SPINLOCK/VIR_CPU_x86_KVM_HV_SPINLOCKS/ too.

Ok. Actually I had one version but somehow decided to minimize the difference.

Jirka

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