On Fri, Dec 22, 2017 at 1:07 AM, Richard W.M. Jones <
rjo...@redhat.com> wrote:
> On the subject of virtio-mmio, ARM's -M virt model moved from
> virtio-mmio to virtio-pci a couple of years ago.
>
> There were several reasons for this:
>
> (1) virtio-mmio has abysmal performance. (As in: an order of
> magnitude slower, at least).
>
> (2) virtio-pci supports hot-plugging.
>
> (3) Enhanced features of PCI like advanced error reporting and so on.
>
> (4) Ability to add more devices. By using PCI root ports and multiple
> buses you can add (literally) thousands of devices, whereas
> virtio-mmio was limited by address space to relatively few devices. I
> believe this applies even on 64 bit because your address space
> requirements are dictated by having to be compatible with 32 bit VMs.
>
> (5) Single code path used by x86 and [your other architecture]. For
> the same reason we removed a lot of arm-specific hacks from libvirt &
> other tools that generate qemu command lines.
>
> So, I'm just saying really. If RISC-V -M virt is just a temporary
> thing then you maybe don't care about the above, but if you're looking
> to get an -M virt model into upstream qemu long term then I suspect
> use of virtio-mmio is going to be an issue.
Hi, I wrote the first version of this code, although I've been largely
unavailable for several months for a variety of personal reasons and
I'm thankful Michael Clark took it over.
Work on this code predates the RISC-V Linux Device Tree migration.
The pre-upstreaming kernel port could only support devices which were
modified to support Config String, and the only PCIe root port for
which such a modification was made was the Xilinx AXI/PCIe bridge.
There is no model for that PCIe root port in QEMU, and thus supporting
virtio-pci prior to kernel upstreaming would have required either
developing a new PCIe root port model in QEMU, or adding a Linux
driver for a config-string version of a QEMU-existing root port.
Now that the Linux port supports all existing drivers through device
tree, the reason to use virtio-mmio is largely obviated.
-s