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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin Herrenschmidt
Date: Tuesday, November 13, 2007 - 2:17 pm

On Sun, 2007-10-28 at 18:08 -0700, David Miller wrote:

Agreed.

Though he's trying to fix a real issue, his patch is not the right
approach imho.

A better approach would be to have a mechanism to be triggered by the
hypervisor administration tools that will attempt to reassign -that-
specific device if it happens to share pages with another.

The remapping would thus only happen for that single device, after it's
been put in control of the hypervisor (no host driver is bound, maybe
just an HV specific "bridging" driver is), and only when the action of
assigning it to the partition is performed, so that if the machine
crashes as a result, at least you know why :-)

So something like your hypervisor binds a special driver to a device
that is to be reflected to a partition, at which point we are sure no
other driver is using it, then that driver can call something in the pci
layer that attempts to re-assign the device resources to keep it in a
separate page.

A patch implementing such a helper, and maybe reserving the rest of the
MMIO page via some dummy resource to make sure nobody else gets in, that
would make more sense.

Ben.


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