On Thu, 04 Mar 2021 01:46:50 +0800 "谢华伟(此时此刻)" <huawei....@alibaba-inc.com> wrote:
> virtio PMD assumes legacy device only supports PIO BAR resource. This is > wrong. > As we need to create lots of devices, as PIO resource on x86 is very limited, > we expose MMIO(memory IO) BAR. > > Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for > all > other pci devices. This patchset handles different type of BAR in the similar > way. > > In previous implementation, under igb_uio driver we get PIO address from > igb_uio > sysfs entry; with uio_pci_generic, we get PIO address from /proc/ioports for > x86, > and for other ARCHs, we get PIO address from standard PCI sysfs entry. > For PIO/MMIO RW, there is different path for different drivers and arch. Just to add some background. At the time virtio for DPDK was developed, the kernel only supported legacy mode, and it required I/O ports on x86. One concern is that, you should make sure these patches still work on the oldest releases of Linux kernel that DPDK supports. For upstream kernel that should be 4.4 kernel (oldest currently maintained LTS). The Linux system requirements doc file needs update! For distributions, the oldest version would be probably be RHEL 7.