[PATCH 51/51] qemu: capabilities: Remove 'virQEMUCapsAddCPUDefinitions'

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

 



The function was used only to fill the cpu models into fake
capabilities, whic no longer exists.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c | 40 ------------------------------------
 src/qemu/qemu_capabilities.h |  5 -----
 2 files changed, 45 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7b5f59e0f1..87412dd4ec 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2119,46 +2119,6 @@ bool virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
 }


-/* Note that this function is invoked only by test code for faking supported cpu
- * models */
-int
-virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps,
-                             virDomainVirtType type,
-                             const char **name,
-                             size_t count,
-                             virDomainCapsCPUUsable usable)
-{
-    size_t i;
-    size_t start;
-    virQEMUCapsAccel *accel = virQEMUCapsGetAccel(qemuCaps, type);
-    qemuMonitorCPUDefs *defs = accel->cpuModels;
-
-    if (defs) {
-        start = defs->ncpus;
-
-        VIR_EXPAND_N(defs->cpus, defs->ncpus, count);
-    } else {
-        start = 0;
-
-        if (!(defs = qemuMonitorCPUDefsNew(count)))
-            return -1;
-
-        accel->cpuModels = defs;
-    }
-
-    for (i = 0; i < count; i++) {
-        qemuMonitorCPUDefInfo *cpu = defs->cpus + start + i;
-
-        cpu->usable = usable;
-        cpu->name = g_strdup(name[i]);
-        /* while the type name doesn't correspond with reality, this is just for fake cpu models */
-        cpu->type = g_strdup(name[i]);
-    }
-
-    return 0;
-}
-
-
 static virDomainCapsCPUModels *
 virQEMUCapsCPUDefsToModels(virArch arch,
                            qemuMonitorCPUDefs *defs,
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index afc28620dd..e51d3fffdc 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -708,11 +708,6 @@ virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps);
 unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps);
 const char *virQEMUCapsGetPackage(virQEMUCaps *qemuCaps);

-int virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps,
-                                 virDomainVirtType type,
-                                 const char **name,
-                                 size_t count,
-                                 virDomainCapsCPUUsable usable);
 virDomainCapsCPUModels *virQEMUCapsGetCPUModels(virQEMUCaps *qemuCaps,
                                                   virDomainVirtType type,
                                                   const char **modelAllowed,
-- 
2.41.0




[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