From nobody Wed Nov 27 19:51:39 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542213571620691.2921381510502; Wed, 14 Nov 2018 08:39:31 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F911307DAAA; Wed, 14 Nov 2018 16:39:29 +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 4A9925D762; Wed, 14 Nov 2018 16:39:29 +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 F164B3D383; Wed, 14 Nov 2018 16:39:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAEGRvQ4001183 for ; Wed, 14 Nov 2018 11:27:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id 335595DA67; Wed, 14 Nov 2018 16:27:57 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D4395D9CC; Wed, 14 Nov 2018 16:27:55 +0000 (UTC) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Wed, 14 Nov 2018 17:27:48 +0100 Message-Id: <20181114162751.25223-3-vkuznets@redhat.com> In-Reply-To: <20181114162751.25223-1-vkuznets@redhat.com> References: <20181114162751.25223-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v2 2/5] conf: add support for Hyper-V PV IPIs 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 14 Nov 2018 16:39:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Support Hyper-V PV IPI enlightenment in domain config. Qemu support will be implemented in the next patch, adding interim VIR_DOMAIN_HYPERV_IPI cases to src/qemu/* for now. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++++++ docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 7 ++++++- src/conf/domain_conf.h | 1 + src/cpu/cpu_x86.c | 3 +++ src/cpu/cpu_x86_data.h | 1 + src/qemu/qemu_command.c | 1 + src/qemu/qemu_parse_command.c | 1 + src/qemu/qemu_process.c | 1 + 9 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 28246deb63..7592f13a84 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1981,6 +1981,7 @@ <frequencies state=3D'on'/> <reenlightenment state=3D'on'/> <tlbflush state=3D'on'/> + <ipi state=3D'on'/> </hyperv> <kvm> <hidden state=3D'on'/> @@ -2121,6 +2122,12 @@ on, off 4.7.0 (QEMU 3.0) + + ipi + Enable PV IPI support + on, off + 4.10.0 (QEMU 3.1) +
pvspinlock
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index b9ac5df479..26019b3279 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5769,6 +5769,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e8e0adc819..24876994c5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -172,7 +172,9 @@ VIR_ENUM_IMPL(virDomainHyperv, VIR_DOMAIN_HYPERV_LAST, "vendor_id", "frequencies", "reenlightenment", - "tlbflush") + "tlbflush", + "ipi", +); =20 VIR_ENUM_IMPL(virDomainKVM, VIR_DOMAIN_KVM_LAST, "hidden") @@ -19990,6 +19992,7 @@ virDomainDefParseXML(xmlDocPtr xml, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: break; =20 case VIR_DOMAIN_HYPERV_SPINLOCKS: @@ -22184,6 +22187,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefP= tr src, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: if (src->hyperv_features[i] !=3D dst->hyperv_features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of HyperV enlightenment " @@ -27948,6 +27952,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: break; =20 case VIR_DOMAIN_HYPERV_SPINLOCKS: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e30a4b2fe7..9eea75548d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1795,6 +1795,7 @@ typedef enum { VIR_DOMAIN_HYPERV_FREQUENCIES, VIR_DOMAIN_HYPERV_REENLIGHTENMENT, VIR_DOMAIN_HYPERV_TLBFLUSH, + VIR_DOMAIN_HYPERV_IPI, =20 VIR_DOMAIN_HYPERV_LAST } virDomainHyperv; diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 69a0c8db28..33252e927e 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -114,6 +114,8 @@ KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_REENLIGHTENMENT, 0x40000003, 0x00002000); KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_TLBFLUSH, 0x40000004, 0x00000004); +KVM_FEATURE_DEF(VIR_CPU_x86_KVM_HV_IPI, + 0x40000004, 0x00000400); =20 static virCPUx86Feature x86_kvm_features[] =3D { @@ -137,6 +139,7 @@ static virCPUx86Feature x86_kvm_features[] =3D 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), }; =20 typedef struct _virCPUx86Model virCPUx86Model; diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index e75b3a2d0d..8c51d88e1a 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -65,6 +65,7 @@ struct _virCPUx86CPUID { # define VIR_CPU_x86_KVM_HV_FREQUENCIES "__kvm_hv_frequencies" # define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "__kvm_hv_reenlightenment" # define VIR_CPU_x86_KVM_HV_TLBFLUSH "__kvm_hv_tlbflush" +# define VIR_CPU_x86_KVM_HV_IPI "__kvm_hv_ipi" =20 =20 # define VIR_CPU_X86_DATA_INIT { 0 } diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f59cbf559e..b4d3f1ee35 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6899,6 +6899,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, def->hyperv_vendor_id); break; =20 + case VIR_DOMAIN_HYPERV_IPI: /* coverity[dead_error_begin] */ case VIR_DOMAIN_HYPERV_LAST: break; diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 5b4a378a18..ab418432af 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -1579,6 +1579,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom, =20 break; =20 + case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_LAST: break; } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1850923914..3291d3f439 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3958,6 +3958,7 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def, virDomainHypervTypeToString(i)); return -1; =20 + case VIR_DOMAIN_HYPERV_IPI: /* coverity[dead_error_begin] */ case VIR_DOMAIN_HYPERV_VENDOR_ID: case VIR_DOMAIN_HYPERV_LAST: --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list