lkml.org 
[lkml]   [2024]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Question] Is it must for vfio-mdev parent driver to implement a pci-compliant configuration r/w interface
On Tue, 26 Dec 2023 10:30:04 +0800
Wu Zongyong <wuzongyong@linux.alibaba.com> wrote:

> Hi,
>
> For vfio, I know there are two method to get region size:
> 1. VFIO_DEVICE_GET_REGION_INFO ioctl
> 2. write a value of all 1's to the bar register of vfio-device fd
> and then read the value back which is described in pci spec
>
> Now I am curious about is it a must for a vfio-mdev parent driver to
> implement the method 2? Or it is just a optional interface.

If there's not a working, compliant config space, the device shouldn't
claim to implement a vfio-pci interface. There's vfio-platform
available for non-PCI devices. While the BAR size may be found via
either REGION_INFO or config space itself, the BAR address space is
only found via config space, ie. memory or IO, 32 or 64-bit,
prefetchable or not. Thanks,

Alex


\
 
 \ /
  Last update: 2024-01-02 20:29    [W:1.046 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site