All features the function is currently supposed to filter out are
specific to x86_64. We should avoid removing them on other
architectures. It seems to be quite unlikely other achitectures would
use the same names, but one can never be sure.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Notes:
Version 2:
- no change
src/qemu/qemu_capabilities.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c5e57b4ab..0be2301cb 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3030,8 +3030,13 @@ virQEMUCapsProbeQMPGICCapabilities(virQEMUCapsPtr qemuCaps,
static bool
virQEMUCapsCPUFilterFeatures(const char *name,
- void *opaque ATTRIBUTE_UNUSED)
+ void *opaque)
{
+ virQEMUCapsPtr qemuCaps = opaque;
+
+ if (!ARCH_IS_X86(qemuCaps->arch))
+ return true;
+
if (STREQ(name, "cmt") ||
STREQ(name, "mbm_total") ||
STREQ(name, "mbm_local"))
@@ -3128,7 +3133,8 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
goto error;
if (virCPUDefCopyModelFilter(cpu, caps->host.cpu, true,
- virQEMUCapsCPUFilterFeatures, NULL) < 0)
+ virQEMUCapsCPUFilterFeatures,
+ qemuCaps) < 0)
goto error;
}
--
2.11.1