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