mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Wu Zongyong <wuzongyong@linux.alibaba.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	wutu.xq2@linux.alibaba.com
Subject: Re: [Question] Is it must for vfio-mdev parent driver to implement a pci-compliant configuration r/w interface
Date: Tue, 2 Jan 2024 12:28:22 -0700	[thread overview]
Message-ID: <20240102122822.768f979c.alex.williamson@redhat.com> (raw)
In-Reply-To: <ZYo6rITis9siz2Av@wuzongyong-alibaba>

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


      reply	other threads:[~2024-01-02 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26  2:30 Wu Zongyong
2024-01-02 19:28 ` Alex Williamson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102122822.768f979c.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=wutu.xq2@linux.alibaba.com \
    --cc=wuzongyong@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®