Thanks for the patch.
Can you provide a working mips XML config? We don't have one in the unit test
suite.
On 05/03/2016 05:23 PM, Aurelien Jarno wrote:
The MIPS Malta board has a root PCI controller. It is not sent
during
migration, so it needs to be added by default.
I'm a bit confused by the migration reference... does specifying the PCI
controller on the command line somehow convince qemu to send the PCI device
state during migration? Or am I
Signed-off-by: Aurelien Jarno <aurelien(a)aurel32.net>
---
src/qemu/qemu_domain.c | 15 ++++++++++++++-
src/qemu/qemu_domain.h | 1 +
2 files changed, 15 insertions(+), 1 deletion(-)
The patch looks fine to me but should have some test suite representation,
tests/qemuxml2argvtest at least
- Cole
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 173f82c..75b0545 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1763,6 +1763,14 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX);
break;
+ case VIR_ARCH_MIPS:
+ case VIR_ARCH_MIPSEL:
+ case VIR_ARCH_MIPS64:
+ case VIR_ARCH_MIPS64EL:
+ if (qemuDomainMachineIsMalta(def))
+ addPCIRoot = true;
+ break;
+
case VIR_ARCH_PPC64:
case VIR_ARCH_PPC64LE:
addPCIRoot = true;
@@ -4654,6 +4662,11 @@ qemuDomainMachineIsVirt(const virDomainDef *def)
STRPREFIX(def->os.machine, "virt-");
}
+bool
+qemuDomainMachineIsMalta(const virDomainDef *def)
+{
+ return STRPREFIX(def->os.machine, "malta");
+}
static bool
qemuCheckMemoryDimmConflict(const virDomainDef *def,
@@ -4830,7 +4843,7 @@ bool
qemuDomainMachineHasBuiltinIDE(const virDomainDef *def)
{
return qemuDomainMachineIsI440FX(def) ||
- STREQ(def->os.machine, "malta") ||
+ qemuDomainMachineIsMalta(def) ||
STREQ(def->os.machine, "sun4u") ||
STREQ(def->os.machine, "g3beige");
}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 95f821c..adba5fa 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -585,6 +585,7 @@ bool qemuDomainMachineIsI440FX(const virDomainDef *def);
bool qemuDomainMachineNeedsFDC(const virDomainDef *def);
bool qemuDomainMachineIsS390CCW(const virDomainDef *def);
bool qemuDomainMachineIsVirt(const virDomainDef *def);
+bool qemuDomainMachineIsMalta(const virDomainDef *def);
bool qemuDomainMachineHasBuiltinIDE(const virDomainDef *def);
int qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,