[PATCH v2 3/5] qemu: add support for Hyper-V PV IPIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux