Re: [RESEND][PATCH] PCI: Reassign page-aligned memory resources to device for pci passthrough.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 5 Dec 2008 11:42:30 -0700
Alex Chiang <achiang@xxxxxx> wrote:

> * Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>:
> > On Thursday, December 4, 2008 12:43 am Yuji Shimada wrote:
> > > What do you think about supporting both boottime and runtime re-assignment.
> > >
> > > I find we can re-assign resources using fakephp driver. What I need to
> > > do is enhancing my patch to set "pagealignmem" parameter at runtime.
> > >
> > > I think it is good to create "/proc/bus/pci/pagealignmem".
> > >
> > > Re-assignment can be done as follows.
> > >
> > > 1. Sets SSSS:DD:BB.F of the device to "pagealignmem" parameter at runtime.
> > > 2. Hot-remove the device
> > > 3. Hot-add it.
> > >
> > >
> > > If you agree with me, I will submit new patch.
> > 
> > This is a step in the right direction, thanks for pursuing it.
> > 
> > It might be better to put the pagealignmem file (and maybe just
> > call it "resource_alignment") into the sysfs directory for the
> > device instead though, then we could write various alignment
> > constraints to it and hot plug as you suggest.  Also, there
> > have been some discussions about using fakephp for non- testing
> > purposes; cc'ing Alex for his comments there.
> 
> The future of fakephp is being discussed right now, but as it
> stands today, it probably won't work for what Yuji-san is
> proposing.
> 
> The reason is that fakephp no longer supports function-level
> hotplug.
> 
> If device-level hotplug is sufficient for Yuji-san, then yes,
> fakephp will work.

Function-level hotplug is better than device-level hotplug.
But, device-level hotplug is sufficient in most cases. 

> I'm adding in Trent to the discussion, because he has been
> spearheading the fakephp work. I proposed a path forward to make
> everyone happy which consisted of:
> 
> 	- adding Trent's "per-pci device sysfs 'remove' attribute"
> 	- wholesale replacement of fakephp with Trent's new fakephp
> 	- add a "rescan" attribute to somewhere else in sysfs
> 	- eventual deprecation of the fakephp interface interface
> 	  in favor of the "remove/rescan" functionality
> 
> Haven't heard from Trent in a few days though...

My approach requires fakephp to call "pci_bus_assign_resources",
because what I'd like to do is re-assignment. There is a patch for
(existing?) fakephp to call "pci_bus_assign_resources".

    http://markmail.org/message/qvmziwaipgy5ckyb

I don't know much about new fakephp, but I am happy if fakephp calls
"pci_bus_assign_resources".

Thanks,
--
Yuji Shimada
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux