All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Yoder Stuart-B08248 <B08248@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Bhushan Bharat-R65777 <R65777@freescale.com>,
	Sethi Varun-B16395 <B16395@freescale.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Antonios Motakis <a.motakis@virtualopensystems.com>,
	"kvm@vger.kernel.org list" <kvm@vger.kernel.org>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: RFC: vfio interface for platform devices
Date: Tue, 16 Jul 2013 22:50:53 +0000	[thread overview]
Message-ID: <1374015053.8183.343@snotra> (raw)
In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E150364E39A@039-SN1MPN1-004.039d.mgd.msft.net> (from B08248@freescale.com on Tue Jul 16 17:41:04 2013)

On 07/16/2013 05:41:04 PM, Yoder Stuart-B08248 wrote:
> 
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, July 16, 2013 5:01 PM
> > To: Yoder Stuart-B08248
> > Cc: Wood Scott-B07421; Alex Williamson; Alexander Graf; Bhushan  
> Bharat-R65777; Sethi Varun-B16395;
> > virtualization@lists.linux-foundation.org; Antonios Motakis;  
> kvm@vger.kernel.org list; kvm-
> > ppc@vger.kernel.org; kvmarm@lists.cs.columbia.edu
> > Subject: Re: RFC: vfio interface for platform devices
> >
> > What if the interrupt map is for devices without explicit nodes,  
> such
> > as with a PCI controller (ignore the fact that we would normally use
> > vfio_pci for the indivdual PCI devices instead)?
> >
> > You could say the same thing about ranges -- why expose ranges  
> instead
> > of the individual child node regs after translation?
> 
> Hmm...yes, I guess ranges and interrupt-map fall into the same
> basic type of resource category.  I'm not sure it's realistic
> to pass entire bus controllers through to user space vs
> just individual devices on a bus, but I guess it's theoretically
> possible.

Where "theoretically possible" means "we've done it before in other  
contexts". :-)

> So the question is whether we future proof by adding flags
> for both ranges and interrupt-map, or wait until there is
> an actual need for it.

We don't need to actually add a flag for it, but we should have a  
flag/type for the resources we do support, so that code written to the  
current API would recognize that it doesn't recognize an interrupt-map  
entry if it's added later.

> > > > >         __u8    path[];         /* output: Full path to  
> associated
> > > > > device tree node */
> > > >
> > > > How does the caller know what size buffer to supply for this?
> >
> > Ping
> 
> This is in the v2 RFC... the caller invokes the ioctl which returns
> the complete/full size, then re-allocs the buffer and calls the
> ioctl again.

OK.

> Or, as Alex suggested, just use a sufficiently large buffer to start  
> with.

It's fine for a user of the API to simplify things by using a large  
fixed buffer, but the API shouldn't force that approach.

-Scott

WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Yoder Stuart-B08248 <B08248@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Bhushan Bharat-R65777 <R65777@freescale.com>,
	Sethi Varun-B16395 <B16395@freescale.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Antonios Motakis <a.motakis@virtualopensystems.com>,
	"kvm@vger.kernel.org list" <kvm@vger.kernel.org>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: RFC: vfio interface for platform devices
Date: Tue, 16 Jul 2013 17:50:53 -0500	[thread overview]
Message-ID: <1374015053.8183.343@snotra> (raw)
In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E150364E39A@039-SN1MPN1-004.039d.mgd.msft.net> (from B08248@freescale.com on Tue Jul 16 17:41:04 2013)

On 07/16/2013 05:41:04 PM, Yoder Stuart-B08248 wrote:
> 
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, July 16, 2013 5:01 PM
> > To: Yoder Stuart-B08248
> > Cc: Wood Scott-B07421; Alex Williamson; Alexander Graf; Bhushan  
> Bharat-R65777; Sethi Varun-B16395;
> > virtualization@lists.linux-foundation.org; Antonios Motakis;  
> kvm@vger.kernel.org list; kvm-
> > ppc@vger.kernel.org; kvmarm@lists.cs.columbia.edu
> > Subject: Re: RFC: vfio interface for platform devices
> >
> > What if the interrupt map is for devices without explicit nodes,  
> such
> > as with a PCI controller (ignore the fact that we would normally use
> > vfio_pci for the indivdual PCI devices instead)?
> >
> > You could say the same thing about ranges -- why expose ranges  
> instead
> > of the individual child node regs after translation?
> 
> Hmm...yes, I guess ranges and interrupt-map fall into the same
> basic type of resource category.  I'm not sure it's realistic
> to pass entire bus controllers through to user space vs
> just individual devices on a bus, but I guess it's theoretically
> possible.

Where "theoretically possible" means "we've done it before in other  
contexts". :-)

> So the question is whether we future proof by adding flags
> for both ranges and interrupt-map, or wait until there is
> an actual need for it.

We don't need to actually add a flag for it, but we should have a  
flag/type for the resources we do support, so that code written to the  
current API would recognize that it doesn't recognize an interrupt-map  
entry if it's added later.

> > > > >         __u8    path[];         /* output: Full path to  
> associated
> > > > > device tree node */
> > > >
> > > > How does the caller know what size buffer to supply for this?
> >
> > Ping
> 
> This is in the v2 RFC... the caller invokes the ioctl which returns
> the complete/full size, then re-allocs the buffer and calls the
> ioctl again.

OK.

> Or, as Alex suggested, just use a sufficiently large buffer to start  
> with.

It's fine for a user of the API to simplify things by using a large  
fixed buffer, but the API shouldn't force that approach.

-Scott

  parent reply	other threads:[~2013-07-16 22:50 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 23:25 RFC: vfio interface for platform devices Yoder Stuart-B08248
2013-07-02 23:25 ` Yoder Stuart-B08248
2013-07-03  1:07 ` Alexander Graf
2013-07-03  1:07   ` Alexander Graf
2013-07-03 18:51   ` Scott Wood
2013-07-03 18:51   ` Scott Wood
2013-07-03 18:51     ` Scott Wood
2013-07-03 19:08     ` Yoder Stuart-B08248
2013-07-03 19:08       ` Yoder Stuart-B08248
2013-07-03  1:07 ` Alexander Graf
2013-07-03  3:07 ` Alex Williamson
2013-07-03  3:07   ` Alex Williamson
2013-07-03 10:44   ` Antonios Motakis
2013-07-03 10:44     ` Antonios Motakis
2013-07-03 19:23     ` Yoder Stuart-B08248
2013-07-03 19:23       ` Yoder Stuart-B08248
2013-07-03 19:23     ` Yoder Stuart-B08248
2013-07-03 10:44   ` Antonios Motakis
2013-07-03 17:20   ` Yoder Stuart-B08248
2013-07-03 17:20     ` Yoder Stuart-B08248
2013-07-03 21:40 ` RFC: vfio interface for platform devices (v2) Yoder Stuart-B08248
2013-07-03 21:40   ` Yoder Stuart-B08248
2013-07-03 22:53   ` Alex Williamson
2013-07-03 22:53   ` Alex Williamson
2013-07-03 22:53     ` Alex Williamson
2013-07-03 23:06     ` Scott Wood
2013-07-03 23:06       ` Scott Wood
2013-07-03 23:06     ` Scott Wood
2013-07-16 21:57     ` Yoder Stuart-B08248
2013-07-16 21:57       ` Yoder Stuart-B08248
2013-07-16 21:57     ` Yoder Stuart-B08248
2013-07-04 14:44   ` Mario Smarduch
2013-07-04 14:44   ` Mario Smarduch
2013-07-04 14:44     ` Mario Smarduch
2013-07-04 14:47     ` Alexander Graf
2013-07-04 14:47       ` Alexander Graf
2013-07-04 14:47     ` Alexander Graf
2013-07-16 15:25     ` Yoder Stuart-B08248
2013-07-03 22:31 ` RFC: vfio interface for platform devices Scott Wood
2013-07-03 22:31 ` Scott Wood
2013-07-03 22:31   ` Scott Wood
2013-07-16 21:51   ` Yoder Stuart-B08248
2013-07-16 22:01     ` Scott Wood
2013-07-16 22:01       ` Scott Wood
2013-07-16 22:41       ` Yoder Stuart-B08248
2013-07-16 22:50         ` Scott Wood
2013-07-16 22:50         ` Scott Wood [this message]
2013-07-16 22:50           ` Scott Wood
2013-07-16 22:01     ` Scott Wood
2013-07-16 21:51   ` Yoder Stuart-B08248
  -- strict thread matches above, loose matches on Subject: below --
2013-07-02 23:25 Yoder Stuart-B08248

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=1374015053.8183.343@snotra \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=B08248@freescale.com \
    --cc=B16395@freescale.com \
    --cc=R65777@freescale.com \
    --cc=a.motakis@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.