[libvirt] [PATCH 4/9] qemu: Fix adding specifying char devs for ARM
Daniel P. Berrange
berrange at redhat.com
Thu Aug 1 08:06:33 UTC 2013
On Wed, Jul 31, 2013 at 10:14:34PM -0400, Cole Robinson wrote:
> QEMU ARM boards don't give us any way to explicitly wire in
> a -chardev, so use the old style -serial options.
> ---
> src/qemu/qemu_capabilities.c | 18 ++++++++++++++++++
> src/qemu/qemu_capabilities.h | 4 ++++
> src/qemu/qemu_command.c | 3 +--
> src/qemu/qemu_process.c | 37 ++++++++++++++++++++++---------------
> 4 files changed, 45 insertions(+), 17 deletions(-)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 08406b8..51064e8 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -2810,3 +2810,21 @@ virQEMUCapsUsedQMP(virQEMUCapsPtr qemuCaps)
> {
> return qemuCaps->usedQMP;
> }
> +
> +bool
> +virQEMUCapsSupportsChardev(virDomainDefPtr def,
> + virQEMUCapsPtr qemuCaps,
> + virDomainChrDefPtr chr ATTRIBUTE_UNUSED)
> +{
> + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) ||
> + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
> + return false;
> +
> + /* This may not be true for all machine types, but at least
> + * the only supported serial devices of vexpress-a9 and versatilepb
> + * don't have the chardev property wired up */
> + if (def->os.arch != VIR_ARCH_ARMV7L)
> + return false;
> +
> + return true;
> +}
Shouldn't we just avoid setting QEMU_CAPS_CHARDEV when probing capabilities
for the QEMU ARM binary, so we don't need to special case the rest of the
code.
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 :|
More information about the libvir-list
mailing list