From nobody Wed Nov 27 18:47:46 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 1542214085129808.1174942957438; Wed, 14 Nov 2018 08:48:05 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36437307DAA4; Wed, 14 Nov 2018 16:48:03 +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 A175761470; Wed, 14 Nov 2018 16:48:02 +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 C63D53D382; Wed, 14 Nov 2018 16:48:01 +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 wAEGRwpM001193 for ; Wed, 14 Nov 2018 11:27:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id AADB55DD64; Wed, 14 Nov 2018 16:27:58 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82E225D9CC; Wed, 14 Nov 2018 16:27:57 +0000 (UTC) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Wed, 14 Nov 2018 17:27:49 +0100 Message-Id: <20181114162751.25223-4-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 3/5] qemu: 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.16 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:48:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Qemu 3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows guests to send an IPI, especially when it targets many CPUs. Signed-off-by: Vitaly Kuznetsov --- docs/news.xml | 9 +++++++++ src/qemu/qemu_command.c | 2 +- src/qemu/qemu_parse_command.c | 2 +- src/qemu/qemu_process.c | 2 +- tests/qemuxml2argvdata/hyperv-off.xml | 1 + tests/qemuxml2argvdata/hyperv.args | 2 +- tests/qemuxml2argvdata/hyperv.xml | 1 + tests/qemuxml2xmloutdata/hyperv-off.xml | 1 + tests/qemuxml2xmloutdata/hyperv.xml | 1 + 9 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/news.xml b/docs/news.xml index 88774c55ae..c826380a92 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,15 @@
+ + + qemu: Add Hyper-V PV IPI support + + + The QEMU driver now has support for Hyper-V PV IPI enlightenment + for Windows guests. + +
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b4d3f1ee35..6fc8deff00 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6882,6 +6882,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) virBufferAsprintf(&buf, ",hv_%s", virDomainHypervTypeToString(i)); @@ -6899,7 +6900,6 @@ 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 ab418432af..a15f4d1121 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -1539,6 +1539,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: if (value) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("HyperV feature '%s' should not " @@ -1579,7 +1580,6 @@ 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 3291d3f439..85e2f7046b 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3953,12 +3953,12 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def, case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: case VIR_DOMAIN_HYPERV_TLBFLUSH: + case VIR_DOMAIN_HYPERV_IPI: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("host doesn't support hyperv '%s' feature"), 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: diff --git a/tests/qemuxml2argvdata/hyperv-off.xml b/tests/qemuxml2argvdata= /hyperv-off.xml index dc5777355f..e51cca45b5 100644 --- a/tests/qemuxml2argvdata/hyperv-off.xml +++ b/tests/qemuxml2argvdata/hyperv-off.xml @@ -23,6 +23,7 @@ + diff --git a/tests/qemuxml2argvdata/hyperv.args b/tests/qemuxml2argvdata/hy= perv.args index c55204b0c8..0800e4f79d 100644 --- a/tests/qemuxml2argvdata/hyperv.args +++ b/tests/qemuxml2argvdata/hyperv.args @@ -10,7 +10,7 @@ QEMU_AUDIO_DRV=3Dnone \ -machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ -cpu 'qemu32,hv_relaxed,hv_vapic,hv_spinlocks=3D0x2fff,hv_vpindex,hv_runti= me,\ hv_synic,hv_stimer,hv_reset,hv_vendor_id=3DKVM Hv,hv_frequencies,\ -hv_reenlightenment,hv_tlbflush' \ +hv_reenlightenment,hv_tlbflush,hv_ipi' \ -m 214 \ -smp 6,sockets=3D6,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/hyperv.xml b/tests/qemuxml2argvdata/hyp= erv.xml index 816adf6907..05c7d478f7 100644 --- a/tests/qemuxml2argvdata/hyperv.xml +++ b/tests/qemuxml2argvdata/hyperv.xml @@ -23,6 +23,7 @@ + diff --git a/tests/qemuxml2xmloutdata/hyperv-off.xml b/tests/qemuxml2xmlout= data/hyperv-off.xml index 77a8dac810..2282b763b5 100644 --- a/tests/qemuxml2xmloutdata/hyperv-off.xml +++ b/tests/qemuxml2xmloutdata/hyperv-off.xml @@ -23,6 +23,7 @@ + diff --git a/tests/qemuxml2xmloutdata/hyperv.xml b/tests/qemuxml2xmloutdata= /hyperv.xml index fc8c59a557..97f387c172 100644 --- a/tests/qemuxml2xmloutdata/hyperv.xml +++ b/tests/qemuxml2xmloutdata/hyperv.xml @@ -23,6 +23,7 @@ + --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list