LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: tony.luck@intel.com, grundler@parisc-linux.org, jeff@garzik.org,
greg@kroah.com, linux-kernel@vger.kernel.org,
kyle@parisc-linux.org, linuxppc-dev@ozlabs.org,
linux-pci@atrey.karlin.mff.cuni.cz, brice@myri.com,
shaohua.li@intel.com, mingo@elte.hu,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH 0/6] MSI portability cleanups
Date: Tue, 30 Jan 2007 10:05:45 +1100 [thread overview]
Message-ID: <17854.32201.131104.928581@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1170102158.26655.273.camel@localhost.localdomain>
Benjamin Herrenschmidt writes:
> > I'd hate to hit a different Hypervisor that did something close but
> > not quite the same and have the code fail then. So definitely
> > avoiding touching pci config space at all in the calls seems to make a
> > lot of sense. This includes avoiding pci_find_capability right?
>
> Quite possibly yes. I'm pretty sure it will work on IBM HV but we aren't
> really supposed to use it...
Actually, I don't know of any reason why we can't use
pci_find_capability. We are supposed to avoid trying to touch config
space of devices (in fact, functions) that aren't assigned to our
partition, but we're not talking about that here.
I just got an answer from the hypervisor architects. It turns out
that the hardware _does_ prevent the device from sending MSI messages
to another partition. The OS _can_ write whatever it likes to the MSI
address and data registers. It can potentially lose interrupts (or, I
expect, get the device isolated by EEH) but it can't disrupt another
partition.
I think the reason why the hypervisor call writes the values straight
into the MSI/MSI-X registers in the device is (a) that's convenient
for AIX, since it saves it from immediately having to do more calls
into the hypervisor to write those values to the device, and (b) there
are some ABI complications in returning a lot of values, so the device
registers provide a convenient place to return those values.
So it would be possible, although gross, to do the hypervisor call,
read the values from config space and return them to the generic code,
then let the generic code write them to config space for us. :P
The remaining point of difference then seems to be that for MSI-X, we
really want to know up-front how many interrupts the device driver is
asking for, rather than having a series of alloc requests dribble in
one at a time.
Regards,
Paul.
next prev parent reply other threads:[~2007-01-29 23:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1169714047.65693.647693675533.qpush@cradle>
2007-01-28 19:40 ` Eric W. Biederman
2007-01-28 19:42 ` [PATCH 1/6] msi: Kill msi_lookup_irq Eric W. Biederman
2007-01-28 19:44 ` [PATCH 2/6] msi: Remove msi_lock Eric W. Biederman
2007-01-28 19:45 ` [PATCH 3/6] msi: Fix msi_remove_pci_irq_vectors Eric W. Biederman
2007-01-28 19:47 ` [PATCH 4/6] msi: Remove attach_msi_entry Eric W. Biederman
2007-01-28 19:52 ` [PATCH 5/6] msi: Kill the msi_desc array Eric W. Biederman
2007-01-28 19:56 ` [PATCH 6/6] msi: Make MSI useable more architectures Eric W. Biederman
2007-01-28 22:01 ` [PATCH 1/6] msi: Kill msi_lookup_irq Paul Mackerras
2007-01-28 22:18 ` Eric W. Biederman
2007-01-28 20:23 ` [PATCH 0/6] MSI portability cleanups Benjamin Herrenschmidt
2007-01-28 20:47 ` Jeff Garzik
2007-01-28 21:20 ` Eric W. Biederman
2007-01-28 21:26 ` Ingo Molnar
2007-01-28 22:09 ` Benjamin Herrenschmidt
2007-01-28 23:26 ` Eric W. Biederman
2007-01-28 23:37 ` David Miller
2007-01-29 5:18 ` Eric W. Biederman
2007-01-29 5:25 ` David Miller
2007-01-29 5:58 ` Eric W. Biederman
2007-01-29 6:05 ` Benjamin Herrenschmidt
2007-01-29 8:28 ` Eric W. Biederman
2007-01-29 9:03 ` Eric W. Biederman
2007-01-29 10:11 ` Michael Ellerman
2007-01-29 20:32 ` Benjamin Herrenschmidt
2007-01-29 23:29 ` Paul Mackerras
2007-01-29 23:40 ` Benjamin Herrenschmidt
2007-01-29 20:22 ` Benjamin Herrenschmidt
2007-01-29 23:05 ` Paul Mackerras [this message]
2007-01-30 19:32 ` Segher Boessenkool
2007-01-29 1:33 ` Benjamin Herrenschmidt
2007-02-01 4:29 ` Greg KH
2007-01-28 23:44 ` David Miller
2007-01-28 22:11 ` Eric W. Biederman
2007-01-28 23:42 ` David Miller
2007-01-28 21:34 ` Eric W. Biederman
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=17854.32201.131104.928581@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=benh@kernel.crashing.org \
--cc=brice@myri.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=grundler@parisc-linux.org \
--cc=jeff@garzik.org \
--cc=kyle@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=tony.luck@intel.com \
--subject='Re: [PATCH 0/6] MSI portability cleanups' \
/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).