1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00

cpu: Drop CPUID definition for hv-spinlocks

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2019-07-30 12:33:42 +02:00
parent 3bdca9273c
commit ad9d5d3a6a
2 changed files with 3 additions and 5 deletions

View File

@ -84,8 +84,6 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER,
0x40000003, 0x00000008); 0x40000003, 0x00000008);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED, KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED,
0x40000003, 0x00000020); 0x40000003, 0x00000020);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS,
0x40000003, 0x00000022);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC, KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC,
0x40000003, 0x00000030); 0x40000003, 0x00000030);
KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX, 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_SYNIC),
KVM_FEATURE(VIR_CPU_x86_HV_STIMER), KVM_FEATURE(VIR_CPU_x86_HV_STIMER),
KVM_FEATURE(VIR_CPU_x86_HV_RELAXED), 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_VAPIC),
KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX), KVM_FEATURE(VIR_CPU_x86_HV_VPINDEX),
KVM_FEATURE(VIR_CPU_x86_HV_RESET), KVM_FEATURE(VIR_CPU_x86_HV_RESET),

View File

@ -4098,7 +4098,8 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
/* always supported string property */ /* always supported string property */
if (i == VIR_DOMAIN_HYPERV_VENDOR_ID) if (i == VIR_DOMAIN_HYPERV_VENDOR_ID ||
i == VIR_DOMAIN_HYPERV_SPINLOCKS)
continue; continue;
if (def->hyperv_features[i] != VIR_TRISTATE_SWITCH_ON) if (def->hyperv_features[i] != VIR_TRISTATE_SWITCH_ON)
@ -4119,7 +4120,6 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
switch ((virDomainHyperv) i) { switch ((virDomainHyperv) i) {
case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_RELAXED:
case VIR_DOMAIN_HYPERV_VAPIC: case VIR_DOMAIN_HYPERV_VAPIC:
case VIR_DOMAIN_HYPERV_SPINLOCKS:
VIR_WARN("host doesn't support hyperv '%s' feature", VIR_WARN("host doesn't support hyperv '%s' feature",
virDomainHypervTypeToString(i)); virDomainHypervTypeToString(i));
break; break;
@ -4140,6 +4140,7 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
return -1; return -1;
/* coverity[dead_error_begin] */ /* coverity[dead_error_begin] */
case VIR_DOMAIN_HYPERV_SPINLOCKS:
case VIR_DOMAIN_HYPERV_VENDOR_ID: case VIR_DOMAIN_HYPERV_VENDOR_ID:
case VIR_DOMAIN_HYPERV_LAST: case VIR_DOMAIN_HYPERV_LAST:
break; break;