Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 22 ++++++++++++++++++++++ src/qemu/qemu_domain.h | 1 + 2 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d7be544710..25cb650c07 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8895,6 +8895,21 @@ qemuDomainMachineIsI440FX(const char *machine, } +static bool +qemuDomainMachineIsMicrovm(const char *machine, + const virArch arch) +{ + if (!ARCH_IS_X86(arch)) + return false; + + if (STREQ(machine, "microvm")) { + return true; + } + + return false; +} + + static bool qemuDomainMachineIsS390CCW(const char *machine, const virArch arch) @@ -9022,6 +9037,13 @@ qemuDomainIsI440FX(const virDomainDef *def) } +bool +qemuDomainIsMicrovm(const virDomainDef *def) +{ + return qemuDomainMachineIsMicrovm(def->os.machine, def->os.arch); +} + + bool qemuDomainIsS390CCW(const virDomainDef *def) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 98c188cc8f..c29b5484e0 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -826,6 +826,7 @@ bool qemuDomainMachineHasBuiltinIDE(const char *machine, bool qemuDomainIsQ35(const virDomainDef *def); bool qemuDomainIsI440FX(const virDomainDef *def); +bool qemuDomainIsMicrovm(const virDomainDef *def); bool qemuDomainIsS390CCW(const virDomainDef *def); bool qemuDomainIsARMVirt(const virDomainDef *def); bool qemuDomainIsRISCVVirt(const virDomainDef *def); -- 2.43.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx