From nobody Sun Feb 8 20:23:32 2026 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=1564155068; cv=none; d=zoho.com; s=zohoarc; b=oLH3UErnrUJZXCaRgcbAyAGu7dWkv+JWcQVUIp46HKYM16GfzOCgDDs5Ks3ZI55til0/NcIWArTdq9FbKSOXSF/77PSOavFvj2nbtxpm/a2wlp5DB6j7VuUhYXU52VRO65e9XS5LOWUVvG85WF3gh4mSht5mPFH5S0XmdFjPL4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564155068; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=flDrFjKDg7LlrgNoIqXgfM63wfTw/flbEvbYdqYJ9Xs=; b=IxIEPMj3ePv+SfCv5603/LQ8GAkvGyX3poTcH5QohYEWtniLOIGbcoxzF4nrA4bvo6pCwGyEZXNkxr0CdqwqFJsrxnruobd/WCYNACss7YPVwrwmk/LEtti75YxFZXBBlIxJ+lOxqehd8I595oilZrWEzH+eEVRvpw3siGsckA8= 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 156415506826763.04353007047814; Fri, 26 Jul 2019 08:31:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C0E4307D850; Fri, 26 Jul 2019 15:31:07 +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 6EA3310114A1; Fri, 26 Jul 2019 15:31:06 +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 18C7241F66; Fri, 26 Jul 2019 15:31:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6QFV3SW004201 for ; Fri, 26 Jul 2019 11:31:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id A0B5A665FA; Fri, 26 Jul 2019 15:31:03 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52113665FF for ; Fri, 26 Jul 2019 15:31:00 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 915B7100114; Fri, 26 Jul 2019 17:30:59 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Fri, 26 Jul 2019 17:30:54 +0200 Message-Id: <37957f5531462c9492279b1aa6097dc09293cbc5.1564154901.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/5] cpu: Drop KVM_ from hyperv feature macros 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 26 Jul 2019 15:31:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" All the features are hyperv features even though they are provided by KVM with QEMU. The "KVM" part in the macro names does not make a lot of sense. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 53 +++++++++++++++++++++-------------------- src/cpu/cpu_x86_data.h | 26 ++++++++++---------- src/qemu/qemu_command.c | 2 +- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 55b55da784..f8a51dedf6 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -91,31 +91,32 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_PV_UNHALT, 0x40000001, 0x00000080); KVM_FEATURE_DEF(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT, 0x40000001, 0x01000000); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RUNTIME, + +KVM_FEATURE_DEF(VIR_CPU_x86_HV_RUNTIME, 0x40000003, 0x00000001); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SYNIC, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_SYNIC, 0x40000003, 0x00000004); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_STIMER, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER, 0x40000003, 0x00000008); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RELAXED, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_RELAXED, 0x40000003, 0x00000020); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_SPINLOCKS, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_SPINLOCKS, 0x40000003, 0x00000022); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VAPIC, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_VAPIC, 0x40000003, 0x00000030); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_VPINDEX, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_VPINDEX, 0x40000003, 0x00000040); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_RESET, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_RESET, 0x40000003, 0x00000080); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_FREQUENCIES, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES, 0x40000003, 0x00000800); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT, 0x40000003, 0x00002000); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_TLBFLUSH, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH, 0x40000004, 0x00000004); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_IPI, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI, 0x40000004, 0x00000400); -KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_EVMCS, +KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS, 0x40000004, 0x00004000); =20 static virCPUx86Feature x86_kvm_features[] =3D @@ -129,19 +130,19 @@ static virCPUx86Feature x86_kvm_features[] =3D KVM_FEATURE(VIR_CPU_x86_KVM_PV_EOI), KVM_FEATURE(VIR_CPU_x86_KVM_PV_UNHALT), KVM_FEATURE(VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_RUNTIME), - 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_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), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_FREQUENCIES), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_TLBFLUSH), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_IPI), - KVM_FEATURE(VIR_CPU_x86_KVM_HV_EVMCS), + KVM_FEATURE(VIR_CPU_x86_HV_RUNTIME), + 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), + KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES), + KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT), + KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH), + KVM_FEATURE(VIR_CPU_x86_HV_IPI), + KVM_FEATURE(VIR_CPU_x86_HV_EVMCS), }; =20 typedef struct _virCPUx86Model virCPUx86Model; diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index bb781707aa..85aaab709c 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -58,19 +58,19 @@ struct _virCPUx86MSR { * ones defined for virDomainHyperv in domain_conf.c. * E.g "hv-runtime" -> "runtime", "hv-spinlocks" -> "spinlocks" etc. */ -#define VIR_CPU_x86_KVM_HV_RUNTIME "hv-runtime" -#define VIR_CPU_x86_KVM_HV_SYNIC "hv-synic" -#define VIR_CPU_x86_KVM_HV_STIMER "hv-stimer" -#define VIR_CPU_x86_KVM_HV_RELAXED "hv-relaxed" -#define VIR_CPU_x86_KVM_HV_SPINLOCKS "hv-spinlocks" -#define VIR_CPU_x86_KVM_HV_VAPIC "hv-vapic" -#define VIR_CPU_x86_KVM_HV_VPINDEX "hv-vpindex" -#define VIR_CPU_x86_KVM_HV_RESET "hv-reset" -#define VIR_CPU_x86_KVM_HV_FREQUENCIES "hv-frequencies" -#define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "hv-reenlightenment" -#define VIR_CPU_x86_KVM_HV_TLBFLUSH "hv-tlbflush" -#define VIR_CPU_x86_KVM_HV_IPI "hv-ipi" -#define VIR_CPU_x86_KVM_HV_EVMCS "hv-evmcs" +#define VIR_CPU_x86_HV_RUNTIME "hv-runtime" +#define VIR_CPU_x86_HV_SYNIC "hv-synic" +#define VIR_CPU_x86_HV_STIMER "hv-stimer" +#define VIR_CPU_x86_HV_RELAXED "hv-relaxed" +#define VIR_CPU_x86_HV_SPINLOCKS "hv-spinlocks" +#define VIR_CPU_x86_HV_VAPIC "hv-vapic" +#define VIR_CPU_x86_HV_VPINDEX "hv-vpindex" +#define VIR_CPU_x86_HV_RESET "hv-reset" +#define VIR_CPU_x86_HV_FREQUENCIES "hv-frequencies" +#define VIR_CPU_x86_HV_REENLIGHTENMENT "hv-reenlightenment" +#define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush" +#define VIR_CPU_x86_HV_IPI "hv-ipi" +#define VIR_CPU_x86_HV_EVMCS "hv-evmcs" =20 =20 #define VIR_CPU_X86_DATA_INIT { 0 } diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c2f99034c8..7b2cfa0683 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7179,7 +7179,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, case VIR_DOMAIN_HYPERV_SPINLOCKS: if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) virBufferAsprintf(&buf, ",%s=3D0x%x", - VIR_CPU_x86_KVM_HV_SPINLOCKS, + VIR_CPU_x86_HV_SPINLOCKS, def->hyperv_spinlocks); break; =20 --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list