mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: add helper method for checking if ESP SCSI is builtin
The NCR53C90 ESP SCSI controller is only usable when built-in to the machine type. This method will facilitate checking that restriction across many places. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
51a391d879
commit
044eed3f94
@ -8289,6 +8289,23 @@ qemuDomainMachineHasBuiltinIDE(const char *machine,
|
||||
}
|
||||
|
||||
|
||||
bool qemuDomainHasBuiltinESP(const virDomainDef *def)
|
||||
{
|
||||
/* These machines use ncr53c90 (ESP) SCSI controller built-in */
|
||||
if (def->os.arch == VIR_ARCH_SPARC) {
|
||||
return true;
|
||||
} else if (ARCH_IS_MIPS64(def->os.arch) &&
|
||||
(STREQ(def->os.machine, "magnum") ||
|
||||
STREQ(def->os.machine, "pica61"))) {
|
||||
return true;
|
||||
} else if (def->os.arch == VIR_ARCH_M68K &&
|
||||
STREQ(def->os.machine, "q800")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
qemuDomainMachineNeedsFDC(const char *machine,
|
||||
const virArch arch)
|
||||
|
@ -780,6 +780,7 @@ bool qemuDomainIsPSeries(const virDomainDef *def);
|
||||
bool qemuDomainHasPCIRoot(const virDomainDef *def);
|
||||
bool qemuDomainHasPCIeRoot(const virDomainDef *def);
|
||||
bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
|
||||
bool qemuDomainHasBuiltinESP(const virDomainDef *def);
|
||||
bool qemuDomainNeedsFDC(const virDomainDef *def);
|
||||
bool qemuDomainSupportsPCI(virDomainDefPtr def,
|
||||
virQEMUCapsPtr qemuCaps);
|
||||
|
Loading…
x
Reference in New Issue
Block a user