mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
qemu: Move qemuDomainSupportsPCI() to qemu_domain
The function operates on a virDomainDef and is not tied to device address assignment in any way, so it makes more sense for it to live along with qemuDomainIs*() and the like. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
68e26a9ea2
commit
0440d5e90f
@ -10085,6 +10085,28 @@ qemuDomainNeedsFDC(const virDomainDef *def)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainSupportsPCI(virDomainDefPtr def,
|
||||
virQEMUCapsPtr qemuCaps)
|
||||
{
|
||||
if ((def->os.arch != VIR_ARCH_ARMV6L) &&
|
||||
(def->os.arch != VIR_ARCH_ARMV7L) &&
|
||||
(def->os.arch != VIR_ARCH_AARCH64) &&
|
||||
!ARCH_IS_RISCV(def->os.arch))
|
||||
return true;
|
||||
|
||||
if (STREQ(def->os.machine, "versatilepb"))
|
||||
return true;
|
||||
|
||||
if ((qemuDomainIsARMVirt(def) ||
|
||||
qemuDomainIsRISCVVirt(def)) &&
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
qemuCheckMemoryDimmConflict(const virDomainDef *def,
|
||||
const virDomainMemoryDef *mem)
|
||||
|
@ -847,6 +847,8 @@ bool qemuDomainHasPCIRoot(const virDomainDef *def);
|
||||
bool qemuDomainHasPCIeRoot(const virDomainDef *def);
|
||||
bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
|
||||
bool qemuDomainNeedsFDC(const virDomainDef *def);
|
||||
bool qemuDomainSupportsPCI(virDomainDefPtr def,
|
||||
virQEMUCapsPtr qemuCaps);
|
||||
|
||||
void qemuDomainUpdateCurrentMemorySize(virDomainObjPtr vm);
|
||||
|
||||
|
@ -2356,28 +2356,6 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
qemuDomainSupportsPCI(virDomainDefPtr def,
|
||||
virQEMUCapsPtr qemuCaps)
|
||||
{
|
||||
if ((def->os.arch != VIR_ARCH_ARMV6L) &&
|
||||
(def->os.arch != VIR_ARCH_ARMV7L) &&
|
||||
(def->os.arch != VIR_ARCH_AARCH64) &&
|
||||
!ARCH_IS_RISCV(def->os.arch))
|
||||
return true;
|
||||
|
||||
if (STREQ(def->os.machine, "versatilepb"))
|
||||
return true;
|
||||
|
||||
if ((qemuDomainIsARMVirt(def) ||
|
||||
qemuDomainIsRISCVVirt(def)) &&
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont,
|
||||
virDomainDefPtr def,
|
||||
|
Loading…
Reference in New Issue
Block a user