[libvirt] [PATCH] qemu: add default pci-root device to mips*/malta guests

Aurelien Jarno aurelien at aurel32.net
Mon May 9 17:55:20 UTC 2016

On 2016-05-04 09:54, Cole Robinson wrote:
> 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

No it doesn't convince it to send the PCI device state. The problem is
that the PCI root devices is not created at all on the target side. For
what I understood this is due to the code in qemuDomainDefFormatBuf()
dropping pci-root controller "for migration compatibility".

This can be seen by using virsh managedsave followed by virsh start. The
QEMU command line doesn't include the pci root controller, which causes
the following error: "error: XML error: No PCI buses available". Indeed
looking at the saved image, it is missing from the XML, and this
actually not specific to MIPS.

> > Signed-off-by: Aurelien Jarno <aurelien at 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

Ok. I have tried to define a basic xml file similar to the
arm-vexpressa9-basic one. Unfortunately when running the testsuite I
get the following error:

  libvirt: Capabilities Utils error : invalid argument: could not find
  capabilities for arch=mips

I guess the capabilities for mips should be defined somewhere, but I
fail to see where. Can you please give me a hint?


Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net

More information about the libvir-list mailing list