hv-spinlocks is not a CPUID feature and should not be checked as such.
While starting a domain with hv-spinlocks enabled, we would report a
warning about unsupported hyperv spinlocks feature even though it was
set properly.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu_x86.c | 3 ---
src/qemu/qemu_process.c | 5 +++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 387c365512..b58eb2c9d8 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -84,8 +84,6 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
0x40000003, 0x00000008);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
0x40000003, 0x00000020);
-KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
- 0x40000003, 0x00000022);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
0x40000003, 0x00000030);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX,
@@ -110,7 +108,6 @@ static virCPUx86Feature x86_kvm_features[] =
KVM_FEATURE(VIR_CPU_x86_HV_SYNIC),
KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
KVM_FEATURE(VIR_CPU_x86_HV_RELAXED),
- KVM_FEATURE(VIR_CPU_x86_HV_SPINLOCKS),
KVM_FEATURE(VIR_CPU_x86_HV_VAPIC),
KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX),
KVM_FEATURE(VIR_CPU_x86_HV_RESET),
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 0ee97e2296..0ba04b48e6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4098,7 +4098,8 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
/* always supported string property */
- if (i == VIR_DOMAIN_HYPERV_VENDOR_ID)
+ if (i == VIR_DOMAIN_HYPERV_VENDOR_ID ||
+ i == VIR_DOMAIN_HYPERV_SPINLOCKS)
continue;
if (def->hyperv_features[i] != VIR_TRISTATE_SWITCH_ON)
@@ -4119,7 +4120,6 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
switch ((virDomainHyperv) i) {
case VIR_DOMAIN_HYPERV_RELAXED:
case VIR_DOMAIN_HYPERV_VAPIC:
- case VIR_DOMAIN_HYPERV_SPINLOCKS:
VIR_WARN("host doesn't support hyperv '%s' feature",
virDomainHypervTypeToString(i));
break;
@@ -4140,6 +4140,7 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
return -1;
/* coverity[dead_error_begin] */
+ case VIR_DOMAIN_HYPERV_SPINLOCKS:
case VIR_DOMAIN_HYPERV_VENDOR_ID:
case VIR_DOMAIN_HYPERV_LAST:
break;
--
2.22.0
Show replies by date
On Tue, Jul 30, 2019 at 12:39:03PM +0200, Jiri Denemark wrote:
hv-spinlocks is not a CPUID feature and should not be checked as
such.
While starting a domain with hv-spinlocks enabled, we would report a
warning about unsupported hyperv spinlocks feature even though it was
set properly.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu_x86.c | 3 ---
src/qemu/qemu_process.c | 5 +++--
2 files changed, 3 insertions(+), 5 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano