From: Anthony Liguori <anthony@codemonkey.ws>
To: Yoder Stuart-B08248 <B08248@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"avi@redhat.com" <avi@redhat.com>,
"Joerg.Roedel@amd.com" <Joerg.Roedel@amd.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files
Date: Mon, 29 Aug 2011 14:04:05 -0500 [thread overview]
Message-ID: <4E5BE2A5.7040201@codemonkey.ws> (raw)
In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E15031B3313@039-SN1MPN1-002.039d.mgd.msft.net>
On 08/29/2011 11:51 AM, Yoder Stuart-B08248 wrote:
> Alex Graf, Scott Wood, and I met last week to try to flesh out
> some details as to how vfio could work for non-PCI devices,
> like we have in embedded systems. This most likely will
> require a different kernel driver than vfio-- for now we are
> calling it "dtio" (for device tree I/O) as there is no way
> to discover these devices except from the device tree. But
> the dtio driver would use the same architecture and interfaces
> as vfio.
>
> For devices on a system bus and represented in a device
> tree we have some different requirements than PCI for what
> is exposed in the device fd file. A device may have multiple
> address regions, multiple interrupts, a variable length device
> tree path, whether a region is mmapable, etc.
>
> With existing vfio, the device fd file layout is something
> like:
> 0xF Config space offset
> ...
> 0x6 ROM offset
> 0x5 BAR 5 offset
> 0x4 BAR 4 offset
> 0x3 BAR 3 offset
> 0x2 BAR 2 offset
> 0x1 BAR 1 offset
> 0x0 BAR 0 offset
>
> We have an alternate proposal that we think is more flexible,
> extensible, and will accommodate both PCI and system bus
> type devices (and others).
>
> Instead of config space fixed at 0xf, we would propose
> a header and multiple 'device info' records at offset 0x0 that would
> encode everything that user space needs to know about
> the device:
Why not just use an ioctl with a proper struct?
The config space is weird for PCI access because it's mirroring a well
known binary blob. It's not something to replicate if you're inventing
something new.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-08-29 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 16:51 [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files Yoder Stuart-B08248
2011-08-29 19:04 ` Anthony Liguori [this message]
2011-08-29 19:32 ` Scott Wood
2011-08-29 19:51 ` Alex Williamson
2011-08-29 21:58 ` Scott Wood
2011-08-29 22:46 ` Alex Williamson
2011-08-29 23:14 ` Scott Wood
2011-08-30 4:55 ` Alex Williamson
2011-08-30 16:54 ` Scott Wood
2011-09-01 20:00 ` Michael S. Tsirkin
2011-09-01 20:26 ` Scott Wood
2011-09-02 15:57 ` Michael S. Tsirkin
2011-09-02 17:50 ` Scott Wood
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=4E5BE2A5.7040201@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=B07421@freescale.com \
--cc=B08248@freescale.com \
--cc=Joerg.Roedel@amd.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).