[PATCH v1 4/7] qemuMonitorJSONGetCPUModelExpansion: Introduce @hv_passthrough argument

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

 



This continues and finishes propagation of the @hv_passthrough
argument started in the previous commit.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c | 8 ++++----
 src/qemu/qemu_driver.c       | 3 ++-
 src/qemu/qemu_monitor.c      | 5 +++--
 src/qemu/qemu_monitor.h      | 1 +
 src/qemu/qemu_monitor_json.c | 3 ++-
 src/qemu/qemu_monitor_json.h | 1 +
 tests/cputest.c              | 2 +-
 7 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index adcd3b21a6..feed510acd 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3066,15 +3066,15 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCaps *qemuCaps,
     if (ARCH_IS_S390(qemuCaps->arch))
         fail_no_props = false;
 
-    if (qemuMonitorGetCPUModelExpansion(mon, type, cpu, true, fail_no_props,
-                                        &modelInfo) < 0)
+    if (qemuMonitorGetCPUModelExpansion(mon, type, cpu, true, false,
+                                        fail_no_props, &modelInfo) < 0)
         return -1;
 
     /* Try to check migratability of each feature. */
     if (modelInfo &&
         ARCH_IS_X86(qemuCaps->arch) &&
-        qemuMonitorGetCPUModelExpansion(mon, type, cpu, false, fail_no_props,
-                                        &nonMigratable) < 0)
+        qemuMonitorGetCPUModelExpansion(mon, type, cpu, false, false,
+                                        fail_no_props, &nonMigratable) < 0)
         return -1;
 
     if (nonMigratable) {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d509582719..13ef9285fc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12210,7 +12210,8 @@ qemuConnectCPUModelBaseline(virQEMUCaps *qemuCaps,
                                          : QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC;
 
         if (qemuMonitorGetCPUModelExpansion(proc->mon, expansion_type,
-                                            baseline, true, false, &result) < 0)
+                                            baseline, true,
+                                            false, false, &result) < 0)
             return NULL;
 
         if (qemuConnectStealCPUModelFromInfo(baseline, &result) < 0)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 734364e070..b2e4311ea9 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -3181,6 +3181,7 @@ qemuMonitorGetCPUModelExpansion(qemuMonitor *mon,
                                 qemuMonitorCPUModelExpansionType type,
                                 virCPUDef *cpu,
                                 bool migratable,
+                                bool hv_passthrough,
                                 bool fail_no_props,
                                 qemuMonitorCPUModelInfo **model_info)
 {
@@ -3189,8 +3190,8 @@ qemuMonitorGetCPUModelExpansion(qemuMonitor *mon,
     QEMU_CHECK_MONITOR(mon);
 
     return qemuMonitorJSONGetCPUModelExpansion(mon, type, cpu,
-                                               migratable, fail_no_props,
-                                               model_info);
+                                               migratable, hv_passthrough,
+                                               fail_no_props, model_info);
 }
 
 
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 906a919f52..0d4a52bf4a 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1140,6 +1140,7 @@ int qemuMonitorGetCPUModelExpansion(qemuMonitor *mon,
                                     qemuMonitorCPUModelExpansionType type,
                                     virCPUDef *cpu,
                                     bool migratable,
+                                    bool hv_passthrough,
                                     bool fail_no_props,
                                     qemuMonitorCPUModelInfo **model_info);
 
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index f9928b0393..3b96f4e037 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -5072,6 +5072,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitor *mon,
                                     qemuMonitorCPUModelExpansionType type,
                                     virCPUDef *cpu,
                                     bool migratable,
+                                    bool hv_passthrough,
                                     bool fail_no_props,
                                     qemuMonitorCPUModelInfo **model_info)
 {
@@ -5085,7 +5086,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitor *mon,
 
     *model_info = NULL;
 
-    if (!(model = qemuMonitorJSONMakeCPUModel(cpu, migratable, false)))
+    if (!(model = qemuMonitorJSONMakeCPUModel(cpu, migratable, hv_passthrough)))
         return -1;
 
     if ((rc = qemuMonitorJSONQueryCPUModelExpansionOne(mon, type, &model, &data)) <= 0)
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 484cb09830..a86f054b8b 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -449,6 +449,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitor *mon,
                                     qemuMonitorCPUModelExpansionType type,
                                     virCPUDef *cpu,
                                     bool migratable,
+                                    bool hv_passthrough,
                                     bool fail_no_props,
                                     qemuMonitorCPUModelInfo **model_info)
     ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6);
diff --git a/tests/cputest.c b/tests/cputest.c
index 52e0022ac3..9b76cce2a8 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -455,7 +455,7 @@ cpuTestMakeQEMUCaps(const struct data *data)
 
     if (qemuMonitorGetCPUModelExpansion(qemuMonitorTestGetMonitor(testMon),
                                         QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC,
-                                        cpu, true, fail_no_props, &model) < 0)
+                                        cpu, true, false, fail_no_props, &model) < 0)
         return NULL;
 
     if (!(qemuCaps = virQEMUCapsNew()))
-- 
2.38.2




[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