qemu: Support chardevs with ARM virt machines

Message ID 20170607211330.13266-1-cdall@linaro.org
State New
Headers show

Commit Message

Christoffer Dall June 7, 2017, 9:13 p.m.
The function to check if -chardev is supported by QEMU was written a
long time ago, where adding chardevs did not make sense on the fixed ARM
platforms.  Since then, we now have a general purpose virt platform,
which should support plugging in any device over PCIe which is supported
in a similar fashion on x86.

Signed-off-by: Christoffer Dall <cdall@linaro.org>

---
 src/qemu/qemu_capabilities.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.9.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Comments

Christoffer Dall June 21, 2017, 7:57 a.m. | #1
On Wed, Jun 7, 2017 at 11:13 PM, Christoffer Dall <cdall@linaro.org> wrote:
> The function to check if -chardev is supported by QEMU was written a

> long time ago, where adding chardevs did not make sense on the fixed ARM

> platforms.  Since then, we now have a general purpose virt platform,

> which should support plugging in any device over PCIe which is supported

> in a similar fashion on x86.

>

> Signed-off-by: Christoffer Dall <cdall@linaro.org>

> ---

>  src/qemu/qemu_capabilities.c | 5 +++++

>  1 file changed, 5 insertions(+)

>

> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

> index 7f22492..1348af7 100644

> --- a/src/qemu/qemu_capabilities.c

> +++ b/src/qemu/qemu_capabilities.c

> @@ -5507,6 +5507,11 @@ virQEMUCapsSupportsChardev(const virDomainDef *def,

>      if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))

>          return true;

>

> +    /* The virt machine has a PCIe bus and allows plugging in the same type of

> +     * devices as x86 systems do on a PCIe bus. */

> +    if (qemuDomainIsVirt(def))

> +        return true;

> +

>      /* This may not be true for all ARM machine types, but at least

>       * the only supported non-virtio serial devices of vexpress and versatile

>       * don't have the -chardev property wired up. */

> --

> 2.9.0

>



ping?

Thanks,
-Christoffer

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Andrea Bolognani June 22, 2017, 6:30 a.m. | #2
On Wed, 2017-06-07 at 23:13 +0200, Christoffer Dall wrote:
> The function to check if -chardev is supported by QEMU was written a
> long time ago, where adding chardevs did not make sense on the fixed ARM
> platforms.  Since then, we now have a general purpose virt platform,
> which should support plugging in any device over PCIe which is supported
> in a similar fashion on x86.

> Signed-off-by: Christoffer Dall <cdall@linaro.org>
> ---
>  src/qemu/qemu_capabilities.c | 5 +++++
>  1 file changed, 5 insertions(+)

> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 7f22492..1348af7 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -5507,6 +5507,11 @@ virQEMUCapsSupportsChardev(const virDomainDef *def,
>      if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
>          return true;
>  
> +    /* The virt machine has a PCIe bus and allows plugging in the same type of
> +     * devices as x86 systems do on a PCIe bus. */
> +    if (qemuDomainIsVirt(def))
> +        return true;
> +
>      /* This may not be true for all ARM machine types, but at least
>       * the only supported non-virtio serial devices of vexpress and versatile
>       * don't have the -chardev property wired up. */

We have two bugs tracking this issue:

  https://bugs.linaro.org/show_bug.cgi?id=2777
  https://bugzilla.redhat.com/show_bug.cgi?id=1435681

You mention in [1] that applying this patch and using a
recent QEMU fixes the problem for you, however I can't
say the same: I still get

  -device isa-serial,chardev=charserial0,id=serial0:
  No 'ISA' bus found for device 'isa-serial'

Would you mind sharing your guest XML and the resulting
QEMU command line?


[1] https://bugs.linaro.org/show_bug.cgi?id=2777#c36
-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Patch hide | download patch | download mbox

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7f22492..1348af7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5507,6 +5507,11 @@  virQEMUCapsSupportsChardev(const virDomainDef *def,
     if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
         return true;
 
+    /* The virt machine has a PCIe bus and allows plugging in the same type of
+     * devices as x86 systems do on a PCIe bus. */
+    if (qemuDomainIsVirt(def))
+        return true;
+
     /* This may not be true for all ARM machine types, but at least
      * the only supported non-virtio serial devices of vexpress and versatile
      * don't have the -chardev property wired up. */