Re: [PATCH] qemu: Support chardevs with ARM virt machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2017 at 8:30 AM, Andrea Bolognani <abologna@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxx>
>> ---
>>  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'
>

Well that's not the bug reported in 2777.  If you try to create an ISA
bus or configure your domain with an ISA bus on AArch64 your are bound
to fail, because we never had, and we never will have, support for an
ISA bus on AArch64.

To verify what this patch changes, you can use the test xml file
listed in [1] as well:

<domain type='kvm'>
  <name>testlogfile</name>
  <memory unit='KiB'>524288</memory>
  <os>
    <type arch='aarch64' machine='virt-2.7'>hvm</type>
  </os>
  <devices>
    <serial type='pty'>
      <log file='/tmp/testlogfile.log' append='off'/>
      <target port='0'/>
    </serial>
  </devices>
</domain>

Or any working domain configuration where you add <log file='...' />
to the domain definition.

It may be that we have an additional bug in libvirt that it under some
circumstances tries to create an ISA bus with an AArch64 VM, but I
don't see that being related to the patch above?

Note that the submitted patch fixes virQEMUCapsSupportsChardev, which
should be independent from any ISA bus fixes in libvirt, but given my
very limited experience with libvirt, I may be wrong here.

In summary, if your test setup goes from "error: unsupported
configuration: logfile not supported in this QEMU binary" to "-device
isa-serial,chardev=charserial0,id=serial0: No 'ISA' bus found for
device 'isa-serial'" then I'd argue that my patch solves the first
issue.

Thanks,
-Christoffer


[1] https://bugs.linaro.org/show_bug.cgi?id=2777#c36

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux