xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* pv_ops reassigndev for pci passthrough
@ 2009-12-23 17:42 Michael D Labriola
  2009-12-23 18:28 ` Chris
  2009-12-23 19:03 ` [Xen-devel] " Keir Fraser
  0 siblings, 2 replies; 8+ messages in thread
From: Michael D Labriola @ 2009-12-23 17:42 UTC (permalink / raw)
  To: xen-devel, xen-users

What ever happened to the reassigndev= kernel arg?  I read through a bunch 
of emails way back when that was trying to get upstreamed... basically 
Greg KH didn't like using the PCI addresses as arguments.  Did that get 
addressed in later 2.6.18 trees?  Am I correct in assuming that 
reassigndev= and/or its replacement is not in xen/master yet?

I've got PCI devices passed into domUs on a couple different boxes using 
xen-pciback.hide, but it only works if the PCI device is page-aligned.

-Mike

---
Michael D Labriola
Electric Boat
mlabriol@gdeb.com
401-848-8871 (office)
401-316-9844 (cell)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-23 17:42 pv_ops reassigndev for pci passthrough Michael D Labriola
@ 2009-12-23 18:28 ` Chris
  2009-12-23 19:03 ` [Xen-devel] " Keir Fraser
  1 sibling, 0 replies; 8+ messages in thread
From: Chris @ 2009-12-23 18:28 UTC (permalink / raw)
  To: Michael D Labriola
  Cc: xen-devel@lists.xensource.com, xen-users@lists.xensource.com

I have the exact same situation/problem

Skickat från min iPhone

Dec 23, 2009 kl. 12:42 PM skrev Michael D Labriola <mlabriol@gdeb.com>:

> What ever happened to the reassigndev= kernel arg?  I read through a  
> bunch
> of emails way back when that was trying to get upstreamed... basically
> Greg KH didn't like using the PCI addresses as arguments.  Did that  
> get
> addressed in later 2.6.18 trees?  Am I correct in assuming that
> reassigndev= and/or its replacement is not in xen/master yet?
>
> I've got PCI devices passed into domUs on a couple different boxes  
> using
> xen-pciback.hide, but it only works if the PCI device is page-aligned.
>
> -Mike
>
> ---
> Michael D Labriola
> Electric Boat
> mlabriol@gdeb.com
> 401-848-8871 (office)
> 401-316-9844 (cell)
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xensource.com
> http://lists.xensource.com/xen-users

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] pv_ops reassigndev for pci passthrough
  2009-12-23 17:42 pv_ops reassigndev for pci passthrough Michael D Labriola
  2009-12-23 18:28 ` Chris
@ 2009-12-23 19:03 ` Keir Fraser
  2009-12-23 20:10   ` Michael D Labriola
  1 sibling, 1 reply; 8+ messages in thread
From: Keir Fraser @ 2009-12-23 19:03 UTC (permalink / raw)
  To: Michael D Labriola, xen-devel@lists.xensource.com,
	xen-users@lists.xensource.com

New option is reassign_resources. Used like:
guestdev=00:01.0,00:02.0 reassign_resources
Where you use guestdev= instead of pciback.hide=

 -- Keir

On 23/12/2009 17:42, "Michael D Labriola" <mlabriol@gdeb.com> wrote:

> What ever happened to the reassigndev= kernel arg?  I read through a bunch
> of emails way back when that was trying to get upstreamed... basically
> Greg KH didn't like using the PCI addresses as arguments.  Did that get
> addressed in later 2.6.18 trees?  Am I correct in assuming that
> reassigndev= and/or its replacement is not in xen/master yet?
> 
> I've got PCI devices passed into domUs on a couple different boxes using
> xen-pciback.hide, but it only works if the PCI device is page-aligned.
> 
> -Mike
> 
> ---
> Michael D Labriola
> Electric Boat
> mlabriol@gdeb.com
> 401-848-8871 (office)
> 401-316-9844 (cell)
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-23 19:03 ` [Xen-devel] " Keir Fraser
@ 2009-12-23 20:10   ` Michael D Labriola
  2009-12-23 21:37     ` Keir Fraser
  0 siblings, 1 reply; 8+ messages in thread
From: Michael D Labriola @ 2009-12-23 20:10 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel@lists.xensource.com, Chris, xen-devel-bounces

> New option is reassign_resources. Used like:
> guestdev=00:01.0,00:02.0 reassign_resources
> Where you use guestdev= instead of pciback.hide=

Can this be done somehow post boot?

Is it in Jeremy's xen/master?  It doesn't seem to be working in my pull 
from 2 hours ago...

What about the original complaint regarding PCI addresses not being 
guaranteed static?  I had the distinct impression that this wouldn't get 
merged upstream if we're still specifying PCI IDs at boot...

-Mike

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-23 20:10   ` Michael D Labriola
@ 2009-12-23 21:37     ` Keir Fraser
  2009-12-28 14:27       ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 8+ messages in thread
From: Keir Fraser @ 2009-12-23 21:37 UTC (permalink / raw)
  To: Michael D Labriola
  Cc: xen-devel@lists.xensource.com, Chris,
	xen-devel-bounces@lists.xensource.com

On 23/12/2009 20:10, "Michael D Labriola" <mlabriol@gdeb.com> wrote:

>> New option is reassign_resources. Used like:
>> guestdev=00:01.0,00:02.0 reassign_resources
>> Where you use guestdev= instead of pciback.hide=
> 
> Can this be done somehow post boot?
> 
> Is it in Jeremy's xen/master?  It doesn't seem to be working in my pull
> from 2 hours ago...

This is in the 2.6.18 tree. It may be that nothing like this is in the
pv_ops tree.

 -- Keir

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-23 21:37     ` Keir Fraser
@ 2009-12-28 14:27       ` Konrad Rzeszutek Wilk
  2009-12-28 15:22         ` Michael D Labriola
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2009-12-28 14:27 UTC (permalink / raw)
  To: Keir Fraser
  Cc: xen-devel@lists.xensource.com, Michael D Labriola, Chris,
	xen-devel-bounces@lists.xensource.com

On Wed, Dec 23, 2009 at 09:37:48PM +0000, Keir Fraser wrote:
> On 23/12/2009 20:10, "Michael D Labriola" <mlabriol@gdeb.com> wrote:
> 
> >> New option is reassign_resources. Used like:
> >> guestdev=00:01.0,00:02.0 reassign_resources
> >> Where you use guestdev= instead of pciback.hide=
> > 
> > Can this be done somehow post boot?

As a hack you can eliminate the check in the Xend python code for this
and see how far you can go. Just remember that it is a hack :-)

> > 
> > Is it in Jeremy's xen/master?  It doesn't seem to be working in my pull
> > from 2 hours ago...
> 
> This is in the 2.6.18 tree. It may be that nothing like this is in the
> pv_ops tree.

I had not ported it over. My thought was to write code in the pciback code
that would do this automatically (if BARs are found to be not BAR aligned).

Thought I am unsure of why this was not explored - are there any bad technical
reasons to make BARs page-aligned after the device has been enabled (and then
disabled)?

I am taking aside the Linux kernel resources structs (request_resource
and its friends), which probabally will throw a fit.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-28 14:27       ` Konrad Rzeszutek Wilk
@ 2009-12-28 15:22         ` Michael D Labriola
  2010-01-29 22:46           ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 8+ messages in thread
From: Michael D Labriola @ 2009-12-28 15:22 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel-bounces@lists.xensource.com,
	xen-devel@lists.xensource.com, Keir Fraser, Chris

> As a hack you can eliminate the check in the Xend python code for this
> and see how far you can go. Just remember that it is a hack :-)

Might try this if I get a spare moment... just to see what happens ;-)

> I had not ported it over. My thought was to write code in the pciback 
code
> that would do this automatically (if BARs are found to be not BAR 
aligned).
> 
> Thought I am unsure of why this was not explored - are there any 
badtechnical
> reasons to make BARs page-aligned after the device has been enabled (and 
then
> disabled)?
> 
> I am taking aside the Linux kernel resources structs (request_resource
> and its friends), which probabally will throw a fit.

Yeah, I always kinda wondered why this wasn't done automatically by 
pciback.  Having pciback do it would mean that even non-BAR aligned 
devices could be exported after booting and w/out specifying PCI IDs as 
kernel args.  That would be one fewer issue to fix later in the 
upstreaming effort.

-Mike

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pv_ops reassigndev for pci passthrough
  2009-12-28 15:22         ` Michael D Labriola
@ 2010-01-29 22:46           ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-01-29 22:46 UTC (permalink / raw)
  To: Michael D Labriola
  Cc: Chris, xen-devel@lists.xensource.com, Keir Fraser,
	xen-devel-bounces@lists.xensource.com

On Mon, Dec 28, 2009 at 10:22:02AM -0500, Michael D Labriola wrote:
> > As a hack you can eliminate the check in the Xend python code for this
> > and see how far you can go. Just remember that it is a hack :-)
> 
> Might try this if I get a spare moment... just to see what happens ;-)
> 
> > I had not ported it over. My thought was to write code in the pciback 
> code
> > that would do this automatically (if BARs are found to be not BAR 
> aligned).
> > 
> > Thought I am unsure of why this was not explored - are there any 
> badtechnical
> > reasons to make BARs page-aligned after the device has been enabled (and 
> then
> > disabled)?
> > 
> > I am taking aside the Linux kernel resources structs (request_resource
> > and its friends), which probabally will throw a fit.
> 
> Yeah, I always kinda wondered why this wasn't done automatically by 
> pciback.  Having pciback do it would mean that even non-BAR aligned 
> devices could be exported after booting and w/out specifying PCI IDs as 
> kernel args.  That would be one fewer issue to fix later in the 
> upstreaming effort.

So this is actually implemented in the pvops kernel, but has a different
name: pci=resource_alignment=<BDF>

This is what you need to pass as bootup argument, for example:

xen-pciback.hide=(07:00.0)(08:05.0)(08:07.0)(08:07.2) pci=resource_alignment=08:05.0 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-29 22:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 17:42 pv_ops reassigndev for pci passthrough Michael D Labriola
2009-12-23 18:28 ` Chris
2009-12-23 19:03 ` [Xen-devel] " Keir Fraser
2009-12-23 20:10   ` Michael D Labriola
2009-12-23 21:37     ` Keir Fraser
2009-12-28 14:27       ` Konrad Rzeszutek Wilk
2009-12-28 15:22         ` Michael D Labriola
2010-01-29 22:46           ` Konrad Rzeszutek Wilk

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).