On 11/20/2015 03:20 PM, Guido Günther wrote:
so handle it like I440FX
---
src/qemu/qemu_command.c | 13 ++++++++-----
src/qemu/qemu_domain.c | 8 ++++++++
src/qemu/qemu_domain.h | 1 +
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e467f9c..589aff5 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1054,12 +1054,13 @@ qemuAssignDeviceControllerAlias(virDomainDefPtr domainDef,
*/
return virAsprintf(&controller->info.alias, "pci.%d", controller->idx);
} else if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE) {
- /* for any machine based on I440FX, G3Beige or Sun4u, the
+ /* for any machine based on I440FX, G3Beige, Sun4u or Malta, the
* first (and currently only) IDE controller is an integrated
* controller hardcoded with id "ide"
*/
if ((qemuDomainMachineIsI440FX(domainDef) ||
qemuDomainMachineIsSun4u(domainDef) ||
+ qemuDomainMachineIsMalta(domainDef) ||
qemuDomainMachineIsG3Beige(domainDef)) &&
controller->idx == 0)
return VIR_STRDUP(controller->info.alias, "ide");
@@ -4918,12 +4919,13 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
/* Since we currently only support the integrated IDE
- * controller on 440fx, G3Beige and Sun4u, if we ever get to
- * here, it's because some other machinetype had an IDE
+ * controller on 440fx, G3Beige, Sun4u and Malta, if we ever
+ * get to here, it's because some other machinetype had an IDE
* controller specified, or a 440fx had multiple ide
* controllers.
*/
if (qemuDomainMachineIsG3Beige(domainDef) ||
+ qemuDomainMachineIsMalta(domainDef) ||
qemuDomainMachineIsSun4u(domainDef))
break;
... and of course the same comment here. Thanks again!
@@ -9908,11 +9910,12 @@ qemuBuildCommandLine(virConnectPtr conn,
cont->idx == 0 && qemuDomainMachineIsQ35(def))
continue;
- /* first IDE controller on i440fx, G3Beige and Sun4u
- * machines is implicit */
+ /* first IDE controller on i440fx, G3Beige, Sun4u and
+ * Malta machines is implicit */
if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE &&
cont->idx == 0 && (qemuDomainMachineIsI440FX(def) ||
qemuDomainMachineIsSun4u(def) ||
+ qemuDomainMachineIsMalta(def) ||
qemuDomainMachineIsG3Beige(def)))
continue;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 8eb81c5..3ca5fbd 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3737,6 +3737,14 @@ qemuDomainMachineIsSun4u(const virDomainDef *def)
return STREQ(def->os.machine, "sun4u");
}
+
+bool
+qemuDomainMachineIsMalta(const virDomainDef *def)
+{
+ return STREQ(def->os.machine, "malta");
+}
+
+
/**
* qemuDomainUpdateCurrentMemorySize:
*
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index d987c24..af04d62 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -481,6 +481,7 @@ bool qemuDomainMachineNeedsFDC(const virDomainDef *def);
bool qemuDomainMachineIsS390CCW(const virDomainDef *def);
bool qemuDomainMachineIsG3Beige(const virDomainDef *def);
bool qemuDomainMachineIsSun4u(const virDomainDef *def);
+bool qemuDomainMachineIsMalta(const virDomainDef *def);
int qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
virDomainObjPtr vm);
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list