From nobody Sun May 5 09:29:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564483154; cv=none; d=zoho.com; s=zohoarc; b=U319KB2wtD4ZjLODUC59tXjGH0fegexraPH33EAB6aU5kVpF8sJeKhmVco0qk3FmcM/FlDTG0AYcOtTCW2ZHFDO4ihap2/NrdaF0aI8JRyRXbnFiyicbymYcZW7CAxHvoDPH1a9w6htcU1IedY5D4K9A3a4acfLnfdM9gQ2ITAw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564483154; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=5VmtaLq6+b38bBJSkMLIld1VRuvLZ7RJsdzhAz+thRI=; b=JFLmhYAprylkcwdc7pUatNTAc/G/y2/Orfw1lStQ4BcgUS895NuJ8O4tiJ/jjEHsuGcCScd4xkGCPx9Dc58Him83mCAtQuS3m5lxfivlBYHTQOlKGcVijr8Sz3Xvc9C283hdkR+TRPy/cbGQE5hicDo1cdUUKh1NyNUzAKYqIz0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1564483154784225.45280567764087; Tue, 30 Jul 2019 03:39:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD50585365; Tue, 30 Jul 2019 10:39:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B7B619C6A; Tue, 30 Jul 2019 10:39:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF0F71972D; Tue, 30 Jul 2019 10:39:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6UAd86C006623 for ; Tue, 30 Jul 2019 06:39:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CEEC6013A; Tue, 30 Jul 2019 10:39:08 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62C6E600CC for ; Tue, 30 Jul 2019 10:39:06 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 004A5100166; Tue, 30 Jul 2019 12:39:04 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 30 Jul 2019 12:39:03 +0200 Message-Id: <88e956c1c86123ee9c7eef5652478b3fce873c85.1564483143.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] cpu: Drop CPUID definition for hv-spinlocks X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 30 Jul 2019 10:39:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: J=C3=A1n Tomko --- 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[] =3D 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, =20 for (i =3D 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { /* always supported string property */ - if (i =3D=3D VIR_DOMAIN_HYPERV_VENDOR_ID) + if (i =3D=3D VIR_DOMAIN_HYPERV_VENDOR_ID || + i =3D=3D VIR_DOMAIN_HYPERV_SPINLOCKS) continue; =20 if (def->hyperv_features[i] !=3D 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; =20 /* coverity[dead_error_begin] */ + case VIR_DOMAIN_HYPERV_SPINLOCKS: case VIR_DOMAIN_HYPERV_VENDOR_ID: case VIR_DOMAIN_HYPERV_LAST: break; --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list