On Wed, Jul 31, 2013 at 10:14:37PM -0400, Cole Robinson wrote: > Similar to the chardev bit, ARM boards depend on the old style '-net nic' > for actually instantiating net devices. > > And add tests for working ARM XML with console, disk, and networking. > --- > src/qemu/qemu_command.c | 34 ++++++++++++++++------ > src/qemu/qemu_domain.c | 20 +++++++++++-- > .../qemuxml2argv-arm-vexpressa9-basic.args | 1 + > .../qemuxml2argv-arm-vexpressa9-basic.xml | 34 ++++++++++++++++++++++ > tests/qemuxml2argvtest.c | 3 ++ > 5 files changed, 81 insertions(+), 11 deletions(-) > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-arm-vexpressa9-basic.args > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-arm-vexpressa9-basic.xml > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 248e4b4..3b275e3 100644 > --- a/src/qemu/qemu_command.c > +++ b/src/qemu/qemu_command.c > @@ -417,6 +417,26 @@ cleanup: > return ret; > } > > +static bool > +qemuDomainSupportsNicdev(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) > +{ > + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) > + return false; > + > + /* arm boards require legacy -net nic */ > + if (def->os.arch == VIR_ARCH_ARMV7L) > + return false; > + > + return true; > +} > + > +static bool > +qemuDomainSupportsNetdev(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) > +{ > + if (!qemuDomainSupportsNicdev(def, qemuCaps)) > + return false; > + return virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV); > +} Again, I think we should just not set the NETDEV capability for ARM There's once place in the code below that doesn't currnetly check NETDEV, but that seems like a bug. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list