Re: [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 Friday, October 31, 2008 5:30 am Matthew Wilcox wrote:
> On Fri, Oct 31, 2008 at 02:49:30PM +0900, Yuji Shimada wrote:
> > I created this patch for xen's dom0 linux. It is useful when we assign
> > I/O device to HVM domain using pci passthrough, because page-aligned
> > memory resource is required for pci passthrough. But I heard it is
> > also useful for KVM. So I submit it to linux-pci ML.
> >
> > On many system, BIOS assigns memory resources to the device and
> > enables it. So my patch disables the device, and releases memory
> > resources. Then it assigns page-aligned memory resource to the device.
> >
> > To reassign page-aligned memory resources to device, please add boot
> > parameters of linux as follows.
> >
> > 	reassigndev=00:1d.7,01:00.0
> >
> > 	reassigndev=	Specifies device to reassign page-aligned
> > 			memory resources.  PCI-PCI bridge can be
> > 			specified, if resource windows need to be
> > 			expanded.
>
> It seems unreasonably restrictive to have to specify this at boot time.
> We do have some infrastructure for resizing and moving resource windows.
> Perhaps you could investigate a method for reassigning resources at
> runtime?

Yeah you should be able to modify resource_alignment to choose the smaller of 
resource_size and PAGE_SIZE if that's what you need (possibly wrapping the 
call where you need it rather that modifying kernel/resource.c directly).

-- 
Jesse Barnes, Intel Open Source Technology Center

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