RE: [PATCH] Align PCI memory regions to page size (4K) - Fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Barak Fargoun
Date: Sunday, October 28, 2007 - 1:44 pm

> From: Greg KH [mailto:gregkh@suse.de]


No, it shouldn't break. If for example, a device request an alignment of
order 7, it will be provided if you will supply an alignment of larger
order (say 10 bits). An alignment of order that is bigger than 12 bits
is already page aligned, so we do not touch it in that case.


Since if a device asks for just 1K, the rest of the page (in mmio space)
will be empty if you'll page align it. The other resource will be in
another page and it consumes a separate page. It'll just consume
additional mmio space for nothing.


Actually we are not using an IOMMU, we use a 1:1 mapping that was
developed by Neocleus (for Xen right now), but that holds the same for
Intel VT-d as well.
IOMMUs are there to translate accesses to RAM from PCI devices, we are
more concerned about accesses by the host (cpu).
By using pci-mem-align, we assure that both the virtualized hardware &
the real hardware resources will be page aligned, this way we can remap
those pages so the HVM could safely access the hardware.


Of course!
If you'll find it useful, we can make a progress and test it on the
latest rev and also do the changes that you asked.


Actually, no one knows about it yet :-)


Since we are working on Xen right now (dom0 is 2.6.18) and this feature
might be useful for other hypervisors that will implement pass-through
in the future (AFAIK KVM doesn't support PCI pass-through yet) we
thought to release it for Linux in general.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Align PCI memory regions to page size (4K) - Fix, Barak Fargoun, (Sun Oct 28, 10:27 am)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Arjan van de Ven, (Sun Oct 28, 12:48 pm)
RE: [PATCH] Align PCI memory regions to page size (4K) - Fix, Barak Fargoun, (Sun Oct 28, 1:44 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Grant Grundler, (Sun Oct 28, 10:52 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Tue Nov 13, 2:17 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Grant Grundler, (Tue Nov 13, 11:21 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Wed Nov 14, 1:16 am)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Wed Nov 14, 3:16 pm)