On Tue, Dec 29, 2015 at 4:36 PM, Burakov, Anatoly
<anatoly.burakov at intel.com> wrote:
> Hi Santosh,
>
>> Look at kernel/resource.c, it exports two symbol ioport_resource and
>> iomem_resource and sets appropriate flag type i.e.. IORESOURCE_IO and
>> IORESOURCE_MEM. In virtio-net case; it creates both pci region i.e..
>> _io bar and _mem bar. dpdk virtio pmd driver (<= 0.95 virtio spec) uses pci
>> _io bar region for device initialization as virtio headers are locate at pci 
>> _io bar
>> region. Since it uses pci _iobar region so likely it update
>> pci_resource.[index].flag = IORESOURCE_IO.  and vfio mmap function wont
>> handle ioresource_io (i guess). And that is why I asked same to lkml thread.
>
> Yes, I can see that this is what I was misunderstanding (that IORESOURCE_IO 
> isn't a BAR but rather a flag). Technically, if you also set IORESOURCE_MEM 
> along with IORESOURCE_IO, then the BAR would be mapped by VFIO, but this 
> sounds like a dangerous hack :) other than that, yes, I'm afraid it's up to 
> kernel guys to add support for it. Once done, provided IO BARs are meant to 
> be worked with the same way as MEM BARs, there's a good chance it would work 
> out of the box with DPDK.
>

I guess so, I'll give it a try; although before that I need to port /
use your vfio/noiommu patch for virtio pmd driver and perhaps do
dependant changes, I will post my test feedback.

Thanks
> Thanks,
> Anatoly

Reply via email to