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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <gregkh@...>
Cc: <linux-kernel@...>, <linux-pci@...>, Guy Zana <guy@...>
Date: Sunday, October 28, 2007 - 3:53 pm

Hi!

Regarding all the technical stuff (documentation, coding style, etc.) -
I thought I did it correctly :( I will fix it ASAP, 
and send an update when I will finish it.

About your question: today, some of the hypervisors are using linux
kernel as their domain-0 (e.g. Xen). In order
to implement direct hardware access for these native domains (e.g.
running windows in a virtual machine above Xen),
the PCI memory regions should be aligned at-least at the page-level (so,
a virtual machine - can't see data of other
devices which may not be assigned to it). So, for that reason, we wanted
a boot parameter to let us force the kernel
to align PCI memory regions at-least at a PAGE_SIZE alignment. It is
very useful for hypervisors which are developed 
at Linux environment (e.g.: Xen).

I hope I made myself clear.

Barak

-----Original Message-----
From: Greg KH [mailto:gregkh@suse.de] 
Sent: Sunday, October 28, 2007 21:31 PM
To: Barak Fargoun
Cc: linux-kernel@vger.kernel.org; linux-pci@atrey.karlin.mff.cuni.cz;
Guy Zana
Subject: Re: [PATCH] Align PCI memory regions to page size (4K) - Fix

On Sun, Oct 28, 2007 at 01:27:27PM -0400, Barak Fargoun wrote:
patch... it should be ok now...
in Xen for Dom-0)

Please don't declare externs in a .c file, put it in a header file.

need to 
size */

Please follow the proper coding style rules as documented in
Documentation/CodingStyle.  Also running the script scrips/checkpatch.pl
would have pointed this out.

4K */
boot
windows to 4k */

All command line paramaters need to be documented in the Documentation
directory.

which are 
This 

Trailing spaces are not allowed :(

*dev)
no need
alignment alignment (round up) */
(~(PAGE_SIZE-1));
size will not be 
quirk_xen_align_mem_resources);

Now for the main reason.  I really don't understand why this is needed.
Is it only for virtual machines?  Are there drivers in the kernel tree
today that need this functionality?  What breaks if you do not align
these resources?

thanks,

greg k-h
-
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, 1:27 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Arjan van de Ven, (Sun Oct 28, 3:48 pm)
RE: [PATCH] Align PCI memory regions to page size (4K) - Fix, Barak Fargoun, (Sun Oct 28, 3:53 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Tue Nov 13, 5:17 pm)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Wed Nov 14, 4:16 am)
Re: [PATCH] Align PCI memory regions to page size (4K) - Fix, Benjamin Herrenschmidt, (Wed Nov 14, 6:16 pm)