[vfio-users] FLR supporting serial chips?

Laszlo Ersek lersek at redhat.com
Tue Aug 8 14:10:09 UTC 2017


On 08/08/17 00:12, Alex Williamson wrote:
> On Mon, 7 Aug 2017 17:52:04 -0400
> "Taiidan at gmx.com" <Taiidan at gmx.com> wrote:
> 
>> I want to add physical serial ports to a VM but I can't find any FLR 
>> supporting serial cards (I have looked at spec sheets for the chips no luck)
>>
>> Ideally there would be a multi port card (say 4 or so) where every port 
>> can be separately assigned.
>>
>> Anyone have any info? - Thanks
> 
> I think you're headed in the wrong direction, serial ports and PCI
> device assignment can be done, but it's not a great match.  For
> starters, serial ports don't do DMA, so the whole IOMMU thing is a bit
> overkill.  You're also not likely to find a serial ASIC designed within
> the last 20yrs, so things like ACS and FLR are mostly out of the
> question, besides the device state of a serial port is pretty minimal
> and a device specific reset could probably be made to handle it, but
> I'm not sure it's even necessary.  Performance is also likely to be not
> much, if any, better than just serial passthrough because the register
> set of a serial device doesn't fill a 4K page or may be implemented as
> I/O port rather than MMIO, so you'll probably trap to QEMU for every
> access anyway unless you can get 4k alignment on the MMIO BARs.  USB
> serial passthrough might be a better option, but FLR seems
> exceptionally unlikely. Thanks,

To quote more specifics about "serial passthrough", from the QEMU manual:

       -serial dev
           Redirect the virtual serial port to host character device
           dev. The default device is "vc" in graphical mode and
           "stdio" in non graphical mode.

           This option can be used several times to simulate up to 4
           serial ports.
[...]
           Available character devices are:
[...]
           /dev/XXX
               [Linux only] Use host tty, e.g. /dev/ttyS0. The host
               serial port parameters are set according to the
               emulated ones.

Libvirt: <http://libvirt.org/formatdomain.html#elementsCharHost>.

Thanks
Laszlo




More information about the vfio-users mailing list