[PATCH 5/7] qemu: Pass virArch * to virQEMUCapsCPUFilterFeatures

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

 



The filter only needs to know the CPU architecture. Passing
virQEMUCapsPtr as opaque is a bit overkill.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c690cb3498..52d63f44ec 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3320,9 +3320,9 @@ static bool
 virQEMUCapsCPUFilterFeatures(const char *name,
                              void *opaque)
 {
-    virQEMUCapsPtr qemuCaps = opaque;
+    virArch *arch = opaque;
 
-    if (!ARCH_IS_X86(qemuCaps->arch))
+    if (!ARCH_IS_X86(*arch))
         return true;
 
     if (STREQ(name, "cmt") ||
@@ -3534,7 +3534,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
         if (!hostCPU ||
             virCPUDefCopyModelFilter(cpu, hostCPU, true,
                                      virQEMUCapsCPUFilterFeatures,
-                                     qemuCaps) < 0)
+                                     &qemuCaps->arch) < 0)
             goto error;
     } else if (type == VIR_DOMAIN_VIRT_KVM &&
                virCPUGetHostIsSupported(qemuCaps->arch)) {
-- 
2.14.1

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