[PATCH v5 10/15] qemu_driver: expand cpu features after baseline

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

 



Perform a full CPU model expansion on the result of the baselined
model name when the features flag is present.

Signed-off-by: Collin Walling <walling@xxxxxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2a5a3ca..93f1767 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13845,6 +13845,7 @@ qemuConnectCPUModelBaseline(virQEMUCapsPtr qemuCaps,
                             const char *libDir,
                             uid_t runUid,
                             gid_t runGid,
+                            bool expand_features,
                             int ncpus,
                             virCPUDefPtr *cpus)
 {
@@ -13877,6 +13878,16 @@ qemuConnectCPUModelBaseline(virQEMUCapsPtr qemuCaps,
             goto error;
     }
 
+    if (expand_features) {
+        if (qemuMonitorGetCPUModelExpansion(proc->mon,
+                                            QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL,
+                                            baseline, true, false, &result) < 0)
+            goto error;
+
+        if (qemuConnectStealCPUModelFromInfo(baseline, &result) < 0)
+            goto error;
+    }
+
  cleanup:
     qemuProcessQMPFree(proc);
     return baseline;
@@ -13957,9 +13968,11 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn,
     } else if (ARCH_IS_S390(arch) &&
                virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_BASELINE)) {
 
+        bool expand_features = (flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES);
+
         if (!(cpu = qemuConnectCPUModelBaseline(qemuCaps, cfg->libDir,
                                                 cfg->user, cfg->group,
-                                                ncpus,
+                                                expand_features, ncpus,
                                                 cpus)))
             goto cleanup;
 
-- 
2.7.4

--
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