(+ Laszlo) Hello Daniil,
On 7 March 2018 at 01:36, Daniil Egranov <daniil.egra...@arm.com> wrote: > This is an attempt to add MMIO Virtio devices into the > non-discoverable device registration procedure and allow > Virtio PCI drivers to recognize and program such devices > correctly. Why? The purpose of the non-discoverable device layer is to make non-PCI controllers that can be driven by PCI class drivers appear as PCI devices. We have started using the base non-discoverable device protocol for other devices as well, but the PCI wrapper is really only intended for PCI class drivers. For VirtIO MMIO, we already have a driver model driver, and given that you need to patch up differences between MMIO and PCI based virtio in your code, I am reluctant to incorporate modifications in to the PCI driver to support MMIO devices. Is this related to virtio 1.0 support? Also, could you please ensure next time that you cc all the relevant people? (Please check the Maintainers file) > The main issue is that the set of MMIO registers is different > from PCI, plus the width of similar registers are not > always the same. The code implements the translation of > the PCI IO registers to MMIO registers. > Another difference between PCI and MMIO Virtio devices found > during the testing is that MMIO devices may require more > registers to be programmed compared to PCI. The VirtioPciDeviceDxe > was patched to detect non-discoverable MMIO devices and allow > calling a PCI MemIo protocol function. > > This set of patches was tested with MMIO Virtio Block and > Virtio Net devices. > > Daniil Egranov (4): > MdeModulePkg: Added new Virtio non-discoverable type and GUID > NonDiscoverableDeviceRegistrationLib: Added Virtio support > NonDiscoverablePciDeviceDxe: Added MMIO Virtio support > VirtioPciDeviceDxe: Added non-discoverable Virtio support > > .../NonDiscoverablePciDeviceDxe.c | 3 +- > .../NonDiscoverablePciDeviceDxe.inf | 5 +- > .../NonDiscoverablePciDeviceIo.c | 240 > ++++++++++++++++++++- > MdeModulePkg/Include/Guid/NonDiscoverableDevice.h | 3 + > .../Library/NonDiscoverableDeviceRegistrationLib.h | 1 + > .../NonDiscoverableDeviceRegistrationLib.c | 3 + > .../NonDiscoverableDeviceRegistrationLib.inf | 1 + > MdeModulePkg/MdeModulePkg.dec | 1 + > OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 143 +++++++++++- > OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h | 21 +- > OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf | 4 +- > OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c | 117 +++++++++- > 12 files changed, 528 insertions(+), 14 deletions(-) > > -- > 2.11.0 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel