LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: David Miller <davem@davemloft.net>,
	gregkh@suse.de, barak@neocleus.com, linux-kernel@vger.kernel.org,
	linux-pci@atrey.karlin.mff.cuni.cz, guy@neocleus.com
Subject: Re: [PATCH] Align PCI memory regions to page size (4K) - Fix
Date: Wed, 14 Nov 2007 19:16:18 +1100	[thread overview]
Message-ID: <1195028178.28865.32.camel@pasglop> (raw)
In-Reply-To: <20071114062157.GA30203@colo.lackof.org>


On Tue, 2007-11-13 at 23:21 -0700, Grant Grundler wrote:
> 
> > 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.
> 
> We already have that "something": pci_enable_device().
> The guest OS "Arch" code can then do the reassignment.
> See "3.1 Enable the PCI device" in Documentation/pci.txt.

No, that can't be done there because that would mean the guest OS has
the ability to reassign resources of PCI devices which is really not
something you want. You really want the host OS to do that -before- it
makes the device visible to the guest imho.

> The Hypervisor could be responsible for making the right devices
> visible to the appropriate partitions/guests by intercepting the
> PCI bus walk and/or hotplug support. I don't think you
> should need any dummy resource/drivers in the guest OS.

I'm not talking about a dummy resource/driver in the guest OS, but
rather, in the host. When a PCI device, that is visible to the host, is
to be "reflected" into a guest, it makes sense to have a proxy driver
take over in the host from a resource management point of view, thus
making this device effectively "used" and thus preventing another
process or partition from trying to bind to it. That proxy driver can
then be responsible for doing the appropriate resource tweaking before
making the device effectively visible to the guest. It might make sense
to provide a helper in the PCI layer to make that easier tho.

Ben.



  reply	other threads:[~2007-11-14  8:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 17:27 Barak Fargoun
2007-10-28 19:31 ` Greg KH
2007-10-28 19:53   ` Barak Fargoun
2007-10-28 20:03     ` Greg KH
2007-10-28 20:44       ` Barak Fargoun
2007-10-29  1:08       ` David Miller
2007-11-13 21:17         ` Benjamin Herrenschmidt
2007-11-14  6:21           ` Grant Grundler
2007-11-14  8:16             ` Benjamin Herrenschmidt [this message]
2007-11-14 21:55               ` Grant Grundler
2007-11-14 22:16                 ` Benjamin Herrenschmidt
2007-10-29  5:52       ` Grant Grundler
2007-11-08 23:24         ` Linas Vepstas
2007-11-12 23:43           ` Grant Grundler
2007-10-28 19:48 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195028178.28865.32.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=barak@neocleus.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@suse.de \
    --cc=grundler@parisc-linux.org \
    --cc=guy@neocleus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --subject='Re: [PATCH] Align PCI memory regions to page size (4K) - Fix' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).