]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Always assume support for QEMU_CAPS_CPU_CACHE
authorPeter Krempa <pkrempa@redhat.com>
Mon, 4 Sep 2023 14:24:52 +0000 (16:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Sep 2023 12:09:43 +0000 (14:09 +0200)
commit917cf3e1641048063d289ae429b064189fafad52
tree9026836648aa883d35646efb1215d562f04502ce
parent3ea514ee30f82d65c7b9ea226c0448a2593203e4
qemu: Always assume support for QEMU_CAPS_CPU_CACHE

All supported qemu versions have this feature and it can't be compiled
out. The logic is a bit more complex in this instance as the flag is
asserted if:

    if (ARCH_IS_X86(qemuCaps->arch) &&
        virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) {
        virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_CACHE);
    }

Now QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION is available since qemu-2.8 but
only on certain architectures, thus we need to keep the flag itself, but
x86_64 is one of them.

The flag can be also assumed as qemuValidateDomainDefCpu rejects any
cache config on non-x86 arches.

Remove any use of the capability and drop the impossible test cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/cpu-cache-disable2.args [deleted file]
tests/qemuxml2argvdata/cpu-cache-disable2.xml [deleted file]
tests/qemuxml2argvdata/cpu-cache-passthrough2.args [deleted file]
tests/qemuxml2argvdata/cpu-cache-passthrough2.xml [deleted file]
tests/qemuxml2argvtest.c