mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs
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@redhat.com>
This commit is contained in:
parent
c49629109b
commit
5c6fc9d641
@ -3032,8 +3032,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"))
|
||||
@ -3109,7 +3114,8 @@ virQEMUCapsCopyCPUModelFromHost(virQEMUCapsPtr qemuCaps,
|
||||
cpu->match = VIR_CPU_MATCH_EXACT;
|
||||
|
||||
if (virCPUDefCopyModelFilter(cpu, caps->host.cpu, true,
|
||||
virQEMUCapsCPUFilterFeatures, NULL) < 0)
|
||||
virQEMUCapsCPUFilterFeatures,
|
||||
qemuCaps) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user