mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 13:17:58 +03:00
qemu: Decide whether check GIC caps in virQEMUCapsProbeQMPGICCapabilities
Move the check out of virQEMUCapsInitQMPMonitor similarly to other functions. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
26dbc2e72a
commit
c31b9159e6
@ -2738,6 +2738,11 @@ virQEMUCapsProbeQMPGICCapabilities(virQEMUCapsPtr qemuCaps,
|
||||
virGICCapability *caps = NULL;
|
||||
int ncaps;
|
||||
|
||||
if (!(qemuCaps->arch == VIR_ARCH_AARCH64 ||
|
||||
qemuCaps->arch == VIR_ARCH_ARMV6L ||
|
||||
qemuCaps->arch == VIR_ARCH_ARMV7L))
|
||||
return 0;
|
||||
|
||||
if ((ncaps = qemuMonitorGetGICCapabilities(mon, &caps)) < 0)
|
||||
return -1;
|
||||
|
||||
@ -4368,12 +4373,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
||||
goto cleanup;
|
||||
if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, false) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* GIC capabilities, eg. available GIC versions */
|
||||
if ((qemuCaps->arch == VIR_ARCH_AARCH64 ||
|
||||
qemuCaps->arch == VIR_ARCH_ARMV6L ||
|
||||
qemuCaps->arch == VIR_ARCH_ARMV7L) &&
|
||||
virQEMUCapsProbeQMPGICCapabilities(qemuCaps, mon) < 0)
|
||||
if (virQEMUCapsProbeQMPGICCapabilities(qemuCaps, mon) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* Probe for SEV capabilities */
|
||||
|
Loading…
Reference in New Issue
Block a user