This identifies various MIPS Malta machines, be it 32-bit or 64-bit, little-endian or big-endian. Signed-off-by: Lubomir Rintel <lkundrak@xxxxx> --- src/qemu/qemu_domain.c | 21 +++++++++++++++++++++ src/qemu/qemu_domain.h | 1 + 2 files changed, 22 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6b915d7535..0bae9b9202 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8647,6 +8647,20 @@ qemuDomainMachineIsPSeries(const char *machine, } +static bool +qemuDomainMachineIsMipsMalta(const char *machine, + const virArch arch) +{ + if (!ARCH_IS_MIPS(arch)) + return false; + + if (STREQ(machine, "malta")) + return true; + + return false; +} + + /* You should normally avoid this function and use * qemuDomainHasBuiltinIDE() instead. */ bool @@ -8719,6 +8733,13 @@ qemuDomainIsPSeries(const virDomainDef *def) } +bool +qemuDomainIsMipsMalta(const virDomainDef *def) +{ + return qemuDomainMachineIsMipsMalta(def->os.machine, def->os.arch); +} + + bool qemuDomainHasPCIRoot(const virDomainDef *def) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index e5046367e3..78474b3f73 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -770,6 +770,7 @@ bool qemuDomainIsS390CCW(const virDomainDef *def); bool qemuDomainIsARMVirt(const virDomainDef *def); bool qemuDomainIsRISCVVirt(const virDomainDef *def); bool qemuDomainIsPSeries(const virDomainDef *def); +bool qemuDomainIsMipsMalta(const virDomainDef *def); bool qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def); -- 2.34.1