Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-10 Thread Bjorn Helgaas
On Thu, Jul 10, 2014 at 4:11 AM, Alexander Gordeev wrote: > On Wed, Jul 09, 2014 at 10:06:48AM -0600, Bjorn Helgaas wrote: >> Out of curiosity, do you have a pointer to this? It looks like it > > I.e. ICH8 chapter 12.1.30 or ICH10 chapter 14.1.27 > >> uses one vector per port, and I'm wondering i

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-10 Thread Alexander Gordeev
On Wed, Jul 09, 2014 at 10:06:48AM -0600, Bjorn Helgaas wrote: > Out of curiosity, do you have a pointer to this? It looks like it I.e. ICH8 chapter 12.1.30 or ICH10 chapter 14.1.27 > uses one vector per port, and I'm wondering if the reason it requests > 16 is because there's some possibility o

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-09 Thread Bjorn Helgaas
On Tue, Jul 8, 2014 at 6:26 AM, Alexander Gordeev wrote: > On Mon, Jul 07, 2014 at 01:40:48PM -0600, Bjorn Helgaas wrote: >> >> Can you quantify the benefit of this? Can't a device already use >> >> MSI-X to request exactly the number of vectors it can use? (I know >> > >> > A Intel AHCI chipset

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-08 Thread Michael Ellerman
On Wed, 2014-07-02 at 14:22 -0600, Bjorn Helgaas wrote: > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > There are PCI devices that require a particular value written > > to the Multiple Message Enable (MME) register while aligned on > > power of 2 boundary value of actually

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-08 Thread Alexander Gordeev
On Mon, Jul 07, 2014 at 01:40:48PM -0600, Bjorn Helgaas wrote: > >> Can you quantify the benefit of this? Can't a device already use > >> MSI-X to request exactly the number of vectors it can use? (I know > > > > A Intel AHCI chipset requires 16 vectors written to MME while advertises > > (via AH

RE: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-08 Thread David Laight
From: Bjorn Helgaas ... > >> Even if you do that, you ought to write valid interrupt information > >> into the 4th slot (maybe replicating one of the earlier interrupts). > >> Then, if the device does raise the 'unexpected' interrupt you don't > >> get a write to a random kernel location. > > > > I

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-07 Thread Alexander Gordeev
On Mon, Jul 07, 2014 at 01:40:48PM -0600, Bjorn Helgaas wrote: > As you can tell, I'm a little skeptical about this. It's a fairly big > change, it affects the arch interface, it seems to be targeted for > only a single chipset (though it's widely used), and we already > support a standard solutio

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-07 Thread Bjorn Helgaas
On Fri, Jul 4, 2014 at 2:57 AM, Alexander Gordeev wrote: > On Wed, Jul 02, 2014 at 02:22:01PM -0600, Bjorn Helgaas wrote: >> On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: >> > There are PCI devices that require a particular value written >> > to the Multiple Message Enable (MM

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-07 Thread Bjorn Helgaas
On Fri, Jul 4, 2014 at 2:58 AM, Alexander Gordeev wrote: > On Thu, Jul 03, 2014 at 09:20:52AM +, David Laight wrote: >> From: Bjorn Helgaas >> > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: >> > > There are PCI devices that require a particular value written >> > > to the

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Fri, Jul 04, 2014 at 09:11:50AM +, David Laight wrote: > > I might be missing something, but we are talking of MSI address space > > here, aren't we? I am not getting how we could end up with a 'write' > > to a random kernel location when a unclaimed MSI vector sent. We could > > only expect

RE: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread David Laight
From: Alexander Gordeev ... > > Even if you do that, you ought to write valid interrupt information > > into the 4th slot (maybe replicating one of the earlier interrupts). > > Then, if the device does raise the 'unexpected' interrupt you don't > > get a write to a random kernel location. > > I mi

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Thu, Jul 03, 2014 at 09:20:52AM +, David Laight wrote: > From: Bjorn Helgaas > > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > > There are PCI devices that require a particular value written > > > to the Multiple Message Enable (MME) register while aligned on > > > p

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Wed, Jul 02, 2014 at 02:22:01PM -0600, Bjorn Helgaas wrote: > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > There are PCI devices that require a particular value written > > to the Multiple Message Enable (MME) register while aligned on > > power of 2 boundary value of a

RE: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-03 Thread David Laight
From: Bjorn Helgaas > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > There are PCI devices that require a particular value written > > to the Multiple Message Enable (MME) register while aligned on > > power of 2 boundary value of actually used MSI vectors 'nvec' > > is a le

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-02 Thread Bjorn Helgaas
On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > There are PCI devices that require a particular value written > to the Multiple Message Enable (MME) register while aligned on > power of 2 boundary value of actually used MSI vectors 'nvec' > is a lesser of that MME value: > >

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-06-23 Thread Alexander Gordeev
Hi Bjorn, Any feedback? Thanks! -- Regards, Alexander Gordeev agord...@redhat.com ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-06-10 Thread Alexander Gordeev
There are PCI devices that require a particular value written to the Multiple Message Enable (MME) register while aligned on power of 2 boundary value of actually used MSI vectors 'nvec' is a lesser of that MME value: roundup_pow_of_two(nvec) < 'Multiple Message Enable' However the existi