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 <vkuznets@redhat.com>
---
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 @@
<libvirt>
<release version="v4.10.0" date="unreleased">
<section title="New features">
+ <change>
+ <summary>
+ qemu: Add Hyper-V PV IPI support
+ </summary>
+ <description>
+ The QEMU driver now has support for Hyper-V PV IPI enlightenment
+ for Windows guests.
+ </description>
+ </change>
</section>
<section title="Improvements">
</section>
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] == VIR_TRISTATE_SWITCH_ON)
virBufferAsprintf(&buf, ",hv_%s",
virDomainHypervTypeToString(i));
@@ -6899,7 +6900,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
def->hyperv_vendor_id);
break;
- 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,
break;
- 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;
- 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 @@
<frequencies state='off'/>
<reenlightenment state='off'/>
<tlbflush state='off'/>
+ <ipi state='off'/>
</hyperv>
</features>
<clock offset='utc'/>
diff --git a/tests/qemuxml2argvdata/hyperv.args b/tests/qemuxml2argvdata/hyperv.args
index c55204b0c8..0800e4f79d 100644
--- a/tests/qemuxml2argvdata/hyperv.args
+++ b/tests/qemuxml2argvdata/hyperv.args
@@ -10,7 +10,7 @@ QEMU_AUDIO_DRV=none \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu 'qemu32,hv_relaxed,hv_vapic,hv_spinlocks=0x2fff,hv_vpindex,hv_runtime,\
hv_synic,hv_stimer,hv_reset,hv_vendor_id=KVM Hv,hv_frequencies,\
-hv_reenlightenment,hv_tlbflush' \
+hv_reenlightenment,hv_tlbflush,hv_ipi' \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/hyperv.xml b/tests/qemuxml2argvdata/hyperv.xml
index 816adf6907..05c7d478f7 100644
--- a/tests/qemuxml2argvdata/hyperv.xml
+++ b/tests/qemuxml2argvdata/hyperv.xml
@@ -23,6 +23,7 @@
<frequencies state='on'/>
<reenlightenment state='on'/>
<tlbflush state='on'/>
+ <ipi state='on'/>
</hyperv>
</features>
<clock offset='utc'/>
diff --git a/tests/qemuxml2xmloutdata/hyperv-off.xml b/tests/qemuxml2xmloutdata/hyperv-off.xml
index 77a8dac810..2282b763b5 100644
--- a/tests/qemuxml2xmloutdata/hyperv-off.xml
+++ b/tests/qemuxml2xmloutdata/hyperv-off.xml
@@ -23,6 +23,7 @@
<frequencies state='off'/>
<reenlightenment state='off'/>
<tlbflush state='off'/>
+ <ipi state='off'/>
</hyperv>
</features>
<clock offset='utc'/>
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 @@
<frequencies state='on'/>
<reenlightenment state='on'/>
<tlbflush state='on'/>
+ <ipi state='on'/>
</hyperv>
</features>
<clock offset='utc'/>
--
2.17.2
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Wed, 2018-11-14 at 17:27 +0100, Vitaly Kuznetsov wrote: > Qemu 3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows s/Qemu/QEMU/ Better than in v1 but not quite perfect yet ;) [...] > + <change> > + <summary> > + qemu: Add Hyper-V PV IPI support > + </summary> > + <description> > + The QEMU driver now has support for Hyper-V PV IPI enlightenment > + for Windows guests. > + </description> > + </change> Okay, not your fault at all, just something that I failed to communicate properly: updates to the release notes are supposed to always go in their own commit. The rationale for that is making it easy for downstreams to cherry-pick the code changes without having to worry about conflicts in the documentation. Additionally, and again I'm at fault for not communicating it adequately, I kinda expected to have a single entry in the release notes covering both changes. Does that sound reasonable? Since everything else looks good and I'd rather not have you go through more trouble than you already have, if you're okay with it I can just drop this hunk from the patch, slap a Reviewed-by: Andrea Bolognani <abologna@redhat.com> on it and push it; you can then re-post the release note update as a separate follow up patch. Let me know if that works for you. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Andrea Bolognani <abologna@redhat.com> writes: > On Wed, 2018-11-14 at 17:27 +0100, Vitaly Kuznetsov wrote: >> Qemu 3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows > > s/Qemu/QEMU/ > > Better than in v1 but not quite perfect yet ;) > > [...] >> + <change> >> + <summary> >> + qemu: Add Hyper-V PV IPI support >> + </summary> >> + <description> >> + The QEMU driver now has support for Hyper-V PV IPI enlightenment >> + for Windows guests. >> + </description> >> + </change> > > Okay, not your fault at all, just something that I failed to > communicate properly: updates to the release notes are supposed to > always go in their own commit. The rationale for that is making it > easy for downstreams to cherry-pick the code changes without having > to worry about conflicts in the documentation. > > Additionally, and again I'm at fault for not communicating it > adequately, I kinda expected to have a single entry in the release > notes covering both changes. Does that sound reasonable? > > Since everything else looks good and I'd rather not have you go > through more trouble than you already have, if you're okay with it > I can just drop this hunk from the patch, slap a > > Reviewed-by: Andrea Bolognani <abologna@redhat.com> > > on it and push it; you can then re-post the release note update > as a separate follow up patch. Let me know if that works for you. No problem at all, I can do v3 fixing stuff like Qemu/QEMU, separate docs/news.xml hunks into their own patch (squashing together as a single <change>). Thanks for the review! -- Vitaly -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2024 Red Hat, Inc.