Re: RFC: Device isolation groups

2012-02-29 Thread Alex Williamson
On Thu, 2012-02-02 at 12:24 +1100, David Gibson wrote: On Wed, Feb 01, 2012 at 01:08:39PM -0700, Alex Williamson wrote: On Wed, 2012-02-01 at 15:46 +1100, David Gibson wrote: This patch series introduces a new infrastructure to the driver core for representing device isolation groups

[PATCH 0/2] RFC Isolation API

2012-03-12 Thread Alex Williamson
like, what you don't like, and ideas for the gaps. Thanks, Alex --- Alex Williamson (2): intel-iommu: Basic isolation group provider support Isolation groups drivers/base/Kconfig| 10 + drivers/base/Makefile |1 drivers/base/base.h |5 drivers/base

[PATCH 2/2] intel-iommu: Basic isolation group provider support

2012-03-12 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/intel-iommu.c | 70 +++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c9c6053..2e5a709 100644

Re: [PATCH 1/2] Isolation groups

2012-03-16 Thread Alex Williamson
On Fri, 2012-03-16 at 14:45 +1100, David Gibson wrote: On Thu, Mar 15, 2012 at 02:15:01PM -0600, Alex Williamson wrote: On Wed, 2012-03-14 at 20:58 +1100, David Gibson wrote: On Tue, Mar 13, 2012 at 10:49:47AM -0600, Alex Williamson wrote: On Wed, 2012-03-14 at 01:33 +1100, David Gibson

Re: [PATCH 1/2] Isolation groups

2012-03-21 Thread Alex Williamson
On Sat, 2012-03-17 at 15:57 +1100, David Gibson wrote: On Fri, Mar 16, 2012 at 01:31:18PM -0600, Alex Williamson wrote: On Fri, 2012-03-16 at 14:45 +1100, David Gibson wrote: On Thu, Mar 15, 2012 at 02:15:01PM -0600, Alex Williamson wrote: On Wed, 2012-03-14 at 20:58 +1100, David Gibson

Re: [PATCH 1/2] Isolation groups

2012-03-27 Thread Alex Williamson
On Tue, 2012-03-27 at 16:14 +1100, David Gibson wrote: On Wed, Mar 21, 2012 at 03:12:58PM -0600, Alex Williamson wrote: On Sat, 2012-03-17 at 15:57 +1100, David Gibson wrote: On Fri, Mar 16, 2012 at 01:31:18PM -0600, Alex Williamson wrote: On Fri, 2012-03-16 at 14:45 +1100, David Gibson

Re: [RFC PATCH 0/3] IOMMU groups

2012-04-10 Thread Alex Williamson
other requirements for a group layer? Thanks, Alex On Mon, 2012-04-02 at 15:14 -0600, Alex Williamson wrote: This series attempts to make IOMMU device grouping a slightly more integral part of the device model. iommu_device_groups were originally introduced to support the VFIO user space driver

[PATCH 11/13] pci: Create common pcibios_err_to_errno

2012-05-11 Thread Alex Williamson
For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/xen/xen-pciback/conf_space.c |6 +++--- include/linux/pci.h | 26 ++ 2 files changed, 29 insertions(+), 3

Re: [PATCH 04/13] pci: New pci_dma_quirk()

2012-05-17 Thread Alex Williamson
On Thu, 2012-05-17 at 15:19 +0800, Anonymous wrote: Alex, On Sat, May 12, 2012 at 6:55 AM, Alex Williamson alex.william...@redhat.com wrote: Integrating IOMMU groups more closely into the driver core allows us to more easily work around DMA quirks. The Ricoh multifunction controller

Re: [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-18 Thread Alex Williamson
On Fri, 2012-05-18 at 19:00 -0400, Don Dutile wrote: On 05/18/2012 06:02 PM, Alex Williamson wrote: On Wed, 2012-05-16 at 09:29 -0400, Don Dutile wrote: On 05/15/2012 05:09 PM, Alex Williamson wrote: On Tue, 2012-05-15 at 13:56 -0600, Bjorn Helgaas wrote: On Mon, May 14, 2012 at 4:49 PM

Re: [PATCH v2 03/13] iommu: IOMMU groups for VT-d and AMD-Vi

2012-05-24 Thread Alex Williamson
On Thu, 2012-05-24 at 17:01 -0400, Don Dutile wrote: On 05/22/2012 01:04 AM, Alex Williamson wrote: Add back group support for AMD Intel. amd_iommu already tracks devices and has init and uninit routines to manage groups. intel-iommu does this on the fly, so we make use of the notifier

Re: [PATCH v2 05/13] pci: Add ACS validation utility

2012-05-24 Thread Alex Williamson
On Thu, 2012-05-24 at 17:30 -0400, Don Dutile wrote: On 05/22/2012 01:05 AM, Alex Williamson wrote: In a PCI environment, transactions aren't always required to reach the root bus before being re-routed. Intermediate switches between an endpoint and the root bus can redirect DMA back

Re: [PATCH v2 09/13] vfio: x86 IOMMU implementation

2012-05-24 Thread Alex Williamson
On Thu, 2012-05-24 at 17:38 -0400, Don Dutile wrote: On 05/22/2012 01:05 AM, Alex Williamson wrote: x86 is probably the wrong name for this VFIO IOMMU driver, but x86 is the primary target for it. This driver support a very simple usage model using the existing IOMMU API. The IOMMU

[PATCH 0/5] PCI: Prep for VFIO and IOMMU Groups

2012-05-29 Thread Alex Williamson
-next-20120529) Please consider these for 3.5, but I'll settle for any kind of next branch. Thanks, Alex --- Alex Williamson (5): pci: Misc pci_reg additions pci: Create common pcibios_err_to_errno pci: export pci_user functions for use by other drivers pci: Add ACS

[PATCH 1/5] pci: Add PCI DMA source ID quirk

2012-05-29 Thread Alex Williamson
. This will be used by IOMMU drivers for determining the boundaries of IOMMU groups as multiple devices using the same source ID must be contained within the same group. This can also be used by existing streaming DMA paths for the same purpose. Signed-off-by: Alex Williamson alex.william...@redhat.com

[PATCH 2/5] pci: Add ACS validation utility

2012-05-29 Thread Alex Williamson
path from a given downstream device up to the specified upstream device. We also include the ability to add device specific tests as it's likely we'll see devices that do no implement ACS, but want to indicate support for various capabilities in this space. Signed-off-by: Alex Williamson

[PATCH 4/5] pci: Create common pcibios_err_to_errno

2012-05-29 Thread Alex Williamson
For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/xen-pciback/conf_space.c |6 +++--- include/linux/pci.h | 26

[PATCH 5/5] pci: Misc pci_reg additions

2012-05-29 Thread Alex Williamson
Fill in many missing definitions and add sizeof fields for many sections allowing for more extensive config parsing. Signed-off-by: Alex Williamson alex.william...@redhat.com --- include/linux/pci_regs.h | 113 +- 1 file changed, 101 insertions

[PATCH 4/7] intel-iommu: Support IOMMU groups

2012-05-29 Thread Alex Williamson
Add IOMMU group support to Intel VT-d code. This driver sets up devices ondemand, so make use of the add_device/remove_device callbacks in IOMMU API to manage setting up the groups. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/intel-iommu.c | 46

[PATCH 5/7] amd_iommu: Make use of DMA quirks and ACS checks in IOMMU groups

2012-05-29 Thread Alex Williamson
Work around broken devices and adhere to ACS support when determining IOMMU grouping. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/amd_iommu.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu

[PATCH 6/7] intel-iommu: Make use of DMA quirks and ACS checks in IOMMU groups

2012-05-29 Thread Alex Williamson
Work around broken devices and adhere to ACS support when determining IOMMU grouping. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/intel-iommu.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu

[PATCH 7/7] iommu: Remove group_mf

2012-05-29 Thread Alex Williamson
for fixing devices we trust individually. This largely reverts bcb71abe. Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/kernel-parameters.txt |1 - arch/ia64/include/asm/iommu.h |2 -- arch/ia64/kernel/pci-dma.c |1 - arch/x86/include/asm/iommu.h

[PATCH 0/4] VFIO

2012-05-29 Thread Alex Williamson
can be found here: git://github.com/awilliam/qemu-vfio.git (iommu-group-vfio) Thanks, Alex --- Alex Williamson (4): vfio: Add PCI device driver vfio: Type1 IOMMU implementation vfio: Add documentation vfio: VFIO core Documentation/ioctl/ioctl-number.txt |1

[PATCH 2/4] vfio: Add documentation

2012-05-29 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/vfio.txt | 315 1 file changed, 315 insertions(+) create mode 100644 Documentation/vfio.txt diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt new file mode

[PATCH 1/4] vfio: VFIO core

2012-05-29 Thread Alex Williamson
users are able to query and initialize the IOMMU model of their choice. Please see the follow-on Documentation commit for further description and usage example. Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/ioctl/ioctl-number.txt |1 MAINTAINERS

Re: [PATCH 1/5] pci: Add PCI DMA source ID quirk

2012-05-30 Thread Alex Williamson
for the same purpose. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/pci/quirks.c | 40 include/linux/pci.h |5 + 2 files changed, 45 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 2a75216

[PATCH v2 1/7] driver core: Add iommu_group tracking to struct device

2012-05-30 Thread Alex Williamson
IOMMU groups allow IOMMU drivers to represent DMA visibility and isolation of devices. Multiple devices may be grouped together for the purposes of DMA. Placing a pointer on struct device enable easy access for things like streaming DMA programming and drivers like VFIO. Signed-off-by: Alex

[PATCH v2 7/7] iommu: Remove group_mf

2012-05-30 Thread Alex Williamson
for fixing devices we trust individually. This largely reverts bcb71abe. Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/kernel-parameters.txt |1 - arch/ia64/include/asm/iommu.h |2 -- arch/ia64/kernel/pci-dma.c |1 - arch/x86/include/asm/iommu.h

[PATCH v3 2/5] pci: Add ACS validation utility

2012-06-11 Thread Alex Williamson
path from a given downstream device up to the specified upstream device. We also include the ability to add device specific tests as it's likely we'll see devices that do no implement ACS, but want to indicate support for various capabilities in this space. Signed-off-by: Alex Williamson

[PATCH v3 4/5] pci: Create common pcibios_err_to_errno

2012-06-11 Thread Alex Williamson
For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/xen-pciback/conf_space.c |6 +++--- include/linux/pci.h | 26

Re: [PATCH v2 0/7] IOMMU: Groups support

2012-06-11 Thread Alex Williamson
On Wed, 2012-06-06 at 13:05 +0200, Joerg Roedel wrote: On Wed, May 30, 2012 at 02:18:29PM -0600, Alex Williamson wrote: v2: - Trickle down changes from pci_get_dma_source() to better handle PCI device reference counting in IOMMU driver patches Okay, I looked again over the code

Re: [PATCH v2 0/7] IOMMU: Groups support

2012-06-18 Thread Alex Williamson
, maybe we can just add CC: to the commit log? Thanks, Alex On Mon, 2012-06-11 at 09:37 -0600, Alex Williamson wrote: On Wed, 2012-06-06 at 13:05 +0200, Joerg Roedel wrote: On Wed, May 30, 2012 at 02:18:29PM -0600, Alex Williamson wrote: v2: - Trickle down changes from pci_get_dma_source

[PATCH 1/4] vfio: VFIO core

2012-07-25 Thread Alex Williamson
users are able to query and initialize the IOMMU model of their choice. Please see the follow-on Documentation commit for further description and usage example. Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/ioctl/ioctl-number.txt |1 MAINTAINERS

[PATCH 2/4] vfio: Add documentation

2012-07-25 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/vfio.txt | 314 1 file changed, 314 insertions(+) create mode 100644 Documentation/vfio.txt diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt new file mode

[PATCH 3/4] vfio: Type1 IOMMU implementation

2012-07-25 Thread Alex Williamson
for the user and is optimized for relatively static mappings. Mapped areas are pinned into system memory. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/vfio/Kconfig|6 drivers/vfio/Makefile |2 drivers/vfio/vfio.c |7 drivers

[GIT PULL (PATCH 0/4) v2] VFIO driver for v3.6

2012-07-26 Thread Alex Williamson
On Wed, 2012-07-25 at 08:53 -0600, Alex Williamson wrote: Hi Linus, This series includes the VFIO userspace driver interface for the 3.6 kernel merge window. This driver is intended to provide a secure interface for device access using IOMMU protection for applications like assignment

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-30 Thread Alex Williamson
On Fri, 2012-07-27 at 15:32 +1000, Paul Mackerras wrote: On Wed, Jul 25, 2012 at 08:53:06AM -0600, Alex Williamson wrote: Hi Linus, This series includes the VFIO userspace driver interface for the 3.6 kernel merge window. This driver is intended to provide a secure interface

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson alex.william...@redhat.com wrote: I'm pretty anxious to find out as well. Linus, ping, any thoughts on including this in 3.6? Thanks, I just pulled it, but then I unpulled again

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Tue, 2012-07-31 at 08:53 -0600, Alex Williamson wrote: On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson alex.william...@redhat.com wrote: I'm pretty anxious to find out as well. Linus, ping, any thoughts on including

[PATCH 0/2] Fix ACS path checking

2012-08-04 Thread Alex Williamson
the root bus. This works on my system, but still needs to be tested by David. I'd like to get this in for 3.6-rc2. Joerg, I notice that ACS isn't getting enabled on my AMD system on 3.6-rc1. I'll investigate more, but mention it in case you get to it first. Thanks, Alex --- Alex Williamson

[PATCH 2/2] amd-iommu: Fix ACS path checking

2012-08-04 Thread Alex Williamson
SR-IOV can create buses without a bridge. There may be other cases where this happens as well. In these cases skip to the parent bus and continue testing devices there. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/amd_iommu.c | 25

Re: [PATCH 0/2] Fix ACS path checking

2012-08-06 Thread Alex Williamson
On Mon, 2012-08-06 at 14:20 +0200, Joerg Roedel wrote: On Mon, Aug 06, 2012 at 12:50:10PM +0200, Joerg Roedel wrote: On Sat, Aug 04, 2012 at 12:08:46PM -0600, Alex Williamson wrote: Hmm, tried it here, At least pci_request_acs() still gets called. How do you detect if ACS is really enabled

Re: linux-next: Tree for Sept 24 (iommu)

2012-09-24 Thread Alex Williamson
commit 6955e1f06cb20ddd25665984c330b945443cce36 Author: Alex Williamson alex.william...@redhat.com Date: Mon Sep 24 21:13:52 2012 -0600 iommu: inline iommu group stub functions Signed-off-by: Alex Williamson alex.william...@redhat.com diff --git a/include/linux/iommu.h b/include/linux

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 20:54 +0200, Florian Dazinger wrote: Am Tue, 25 Sep 2012 12:32:50 -0600 schrieb Alex Williamson alex.william...@redhat.com: On Mon, 2012-09-24 at 21:03 +0200, Florian Dazinger wrote: Hi, I think I've found a regression, which causes an early boot crash, I

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
On Wed, 2012-09-26 at 01:01 +0200, Florian Dazinger wrote: Am Tue, 25 Sep 2012 13:43:46 -0600 schrieb Alex Williamson alex.william...@redhat.com: On Tue, 2012-09-25 at 20:54 +0200, Florian Dazinger wrote: Am Tue, 25 Sep 2012 12:32:50 -0600 schrieb Alex Williamson alex.william

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 15:20 +0200, Roedel, Joerg wrote: On Tue, Sep 25, 2012 at 01:43:46PM -0600, Alex Williamson wrote: Joerg, any thoughts on a quirk for this? Unfortunately we can't just skip IOMMU groups when an alias is broken because it puts the other IOMMU groups at risk that might

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 17:04 +0200, Roedel, Joerg wrote: On Wed, Sep 26, 2012 at 08:52:01AM -0600, Alex Williamson wrote: Assuming this works, it may be ok as a 3.7 fix, but if there was actually more than one device behind the alias we'd expose them as separate iommu groups. I don't think

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 17:10 +0200, Roedel, Joerg wrote: On Wed, Sep 26, 2012 at 08:35:59AM -0600, Alex Williamson wrote: Hmm, that throws a kink in iommu groups. So perhaps we need to make an alias interface to iommu groups. Seems like this could just be an extra parameter

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-27 Thread Alex Williamson
[adding David Woodhouse] On Tue, 2012-09-18 at 16:49 +, Tom Mingarelli wrote: When a 32bit PCI device is removed from the SI Domain, the RMRR information for this device becomes invalid and needs to be reprocessed to avoid DMA Read errors. These errors are evidenced by the Present bit

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 14:52 +0200, Joerg Roedel wrote: On Fri, Sep 28, 2012 at 06:40:08AM -0600, Alex Williamson wrote: On Fri, 2012-09-28 at 11:43 +0200, Joerg Roedel wrote: I don't think so. The concept of RMRR is just not defined well enough (like the concept of unity mappings

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 19:01 +0200, Joerg Roedel wrote: On Fri, Sep 28, 2012 at 12:36:05PM -0400, Linda Knippers wrote: I can only speak to the HP servers. We have been shipping devices 'for a while' that provide sensor-type data to the platform. The device does DMA writes to a range of

[RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-08 Thread Alex Williamson
. This seems to do the right thing on my system, but that's not saying a lot since it doesn't do anything interesting with aliases. I'd appreciate if Joerg and Florian could test this on their systems. Thanks, Alex --- Alex Williamson (5): amd_iommu: Properly account for virtual aliases in IOMMU

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 20:27 +0200, Florian Dazinger wrote: Am Mon, 08 Oct 2012 22:49:28 -0600 schrieb Alex Williamson alex.william...@redhat.com: This series is meant to refactor IOMMU group support in amd_iommu to properly support virtual aliases. If multiple devices alias to the same

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 20:57 +0200, Florian Dazinger wrote: Am Tue, 09 Oct 2012 12:35:39 -0600 schrieb Alex Williamson alex.william...@redhat.com: On Tue, 2012-10-09 at 20:27 +0200, Florian Dazinger wrote: Am Mon, 08 Oct 2012 22:49:28 -0600 schrieb Alex Williamson alex.william

Re: [PATCH v3] Prevent devices with RMRRs from being placed into SI Domain during startup

2012-10-16 Thread Alex Williamson
On Tue, 2012-10-16 at 16:50 +, Tom Mingarelli wrote: This patch is to prevent devices that have RMRRs associated with them from getting placed into the SI Domain during init. We don't put USB devices into this category, however. This fixes the issue where the RMRR info for devices being

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-18 Thread Alex Williamson
Joerg, I think this series is good-to-go, modulo any testing you may be able to do on it. I'm going to be offline for a couple weeks so feel free to incorporate this RFC directly or I can re-spin something when I'm back. Thanks, Alex On Mon, 2012-10-08 at 22:49 -0600, Alex Williamson wrote

[PATCH] intel-iommu: Fix lookup in add device

2012-11-13 Thread Alex Williamson
We can't assume this device exists, fall back to the bridge itself. Signed-off-by: Alex Williamson alex.william...@redhat.com Tested-by: Matthew Thode prometheanf...@gentoo.org Cc: sta...@vger.kernel.org --- drivers/iommu/intel-iommu.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [BUG 3.7-rc5] NULL pointer deref when using a pcie-pci bridged pci device and intel-iommu

2012-11-13 Thread Alex Williamson
On Tue, 2012-11-13 at 14:05 -0500, Don Dutile wrote: On 11/13/2012 10:38 AM, Alex Williamson wrote: On Mon, 2012-11-12 at 15:05 -0600, Matthew Thode wrote: On 11/12/2012 01:57 PM, Don Dutile wrote: On 11/12/2012 04:26 AM, Doug Goldstein wrote: On Sun, Nov 11, 2012 at 5:19 PM, Matthew

Re: [PATCH v4] intel-iommu: Prevent devices with RMRRs from being placed into SI Domain

2012-11-20 Thread Alex Williamson
+++ 1 files changed, 31 insertions(+), 0 deletions(-) Looks ok to me. Reviewed-by: Alex Williamson alex.william...@redhat.com diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d4a4cd4..8c064df 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

Re: [PATCH] iommu: moving initialization earlier

2012-12-13 Thread Alex Williamson
Probably a good idea to CC the iommu list and maintainer... On Thu, 2012-12-13 at 17:28 +1100, Alexey Kardashevskiy wrote: The iommu_init() call initializes IOMMU internal structures and data required for the API to function such as iommu_group_alloc(). It is registered as a subsys_initcall.

Re: [RFC] drivers: iommu: Use of add_device()/remove_device() outside of IOMMU groups

2013-01-17 Thread Alex Williamson
On Thu, 2013-01-17 at 12:20 +0900, Damian Hobson-Garcia wrote: I mistakenly sent this with the tag [PATCH] when it should have been [RFC]. Updated with this reply. Hi Alex, On 2013/01/17 6:47, Alex Williamson wrote: On Tue, 2013-01-15 at 19:10 +0900, Damian Hobson-Garcia wrote: We've

Re: PCI warning on boot 3.8.0-rc1

2013-02-04 Thread Alex Williamson
On Mon, 2013-02-04 at 10:36 -0800, Stephen Hemminger wrote: I think drivers/pci/search.c is identical between 3.7 and 3.8-rc1. Is this the first time you've turned on the IOMMU on that box? It exists in 3.7 and earlier kernels, just haven't turned on same config. It's the same warning

Re: PCI warning on boot 3.8.0-rc1

2013-02-04 Thread Alex Williamson
On Mon, 2013-02-04 at 13:28 -0700, Alex Williamson wrote: On Mon, 2013-02-04 at 10:36 -0800, Stephen Hemminger wrote: I think drivers/pci/search.c is identical between 3.7 and 3.8-rc1. Is this the first time you've turned on the IOMMU on that box? It exists in 3.7 and earlier kernels

Re: PCI warning on boot 3.8.0-rc1

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 07:49 -0800, Stephen Hemminger wrote: On Mon, 04 Feb 2013 15:41:24 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2013-02-04 at 13:28 -0700, Alex Williamson wrote: On Mon, 2013-02-04 at 10:36 -0800, Stephen Hemminger wrote: I think drivers/pci

Re: PCI warning on boot 3.8.0-rc1

2013-02-11 Thread Alex Williamson
On Wed, 2013-02-06 at 08:58 -0700, Alex Williamson wrote: On Wed, 2013-02-06 at 07:49 -0800, Stephen Hemminger wrote: On Mon, 04 Feb 2013 15:41:24 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2013-02-04 at 13:28 -0700, Alex Williamson wrote: On Mon, 2013-02-04

Re: Marvell 88NV9143 in mini-PCIe not working with intel_iommu=on

2013-03-05 Thread Alex Williamson
being the only function that the mvumi driver cares about. So my guess is that 02:00.1 is issuing DMA with the incorrect tag of 02:00.0. Perhaps Alex Williamson can tell us about iommu device groups, whether it would be possible to group the functions together automatically and whether

Re: [PATCH] Quirk to support Marvell 88SE91xx SATA controllers with Intel IOMMU.

2013-03-05 Thread Alex Williamson
On Fri, 2013-03-01 at 16:26 +0800, Andrew Cooks wrote: This is my third submitted patch to make Marvell 88SE91xx SATA controllers work when IOMMU is enabled.[1][2] What's changed: * Adopt David Woodhouse's terminology by referring to the quirky functions as 'ghost' functions. * Unmap

Re: [PATCH] iommu: add a function to find an iommu group by id

2013-03-21 Thread Alex Williamson
On Thu, 2013-03-21 at 18:48 +1100, Alexey Kardashevskiy wrote: As IOMMU groups are exposed to the user space by their numbers, the user space can use them in various kernel APIs so the kernel might need an API to find a group by its ID. As an example, QEMU VFIO on PPC64 platform needs it to

Re: [PATCH] iommu: add a function to find an iommu group by id

2013-03-22 Thread Alex Williamson
On Fri, 2013-03-22 at 17:49 +1100, Alexey Kardashevskiy wrote: As IOMMU groups are exposed to the user space by their numbers, the user space can use them in various kernel APIs so the kernel might need an API to find a group by its ID. As an example, QEMU VFIO on PPC64 platform needs it to

Re: [PATCH] iommu: add a function to find an iommu group by id

2013-03-25 Thread Alex Williamson
? v2: fixed reference counting. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Acked-by: Alex Williamson alex.william...@redhat.com drivers/iommu/iommu.c | 29 + include/linux/iommu.h |1 + 2 files changed, 30 insertions(+) diff --git a/drivers

Re: RFC: vfio API changes needed for powerpc

2013-04-02 Thread Alex Williamson
Hi Stuart, On Tue, 2013-04-02 at 17:32 +, Yoder Stuart-B08248 wrote: Alex, We are in the process of implementing vfio-pci support for the Freescale IOMMU (PAMU). It is an aperture/window-based IOMMU and is quite different than x86, and will involve creating a 'type 2' vfio

Re: RFC: vfio API changes needed for powerpc

2013-04-02 Thread Alex Williamson
On Tue, 2013-04-02 at 16:08 -0500, Stuart Yoder wrote: On Tue, Apr 2, 2013 at 3:57 PM, Scott Wood scottw...@freescale.com wrote: C. Explicit mapping using normal DMA map. The last idea is that we would introduce a new ioctl to give user-space an fd to the MSI bank,

Re: RFC: vfio API changes needed for powerpc

2013-04-02 Thread Alex Williamson
On Tue, 2013-04-02 at 17:13 -0500, Scott Wood wrote: On 04/02/2013 04:16:11 PM, Alex Williamson wrote: On Tue, 2013-04-02 at 15:54 -0500, Stuart Yoder wrote: The number of windows is always power of 2 (and max is 256). And to reduce PAMU cache pressure you want to use the fewest

Re: RFC: vfio API changes needed for powerpc

2013-04-02 Thread Alex Williamson
On Tue, 2013-04-02 at 17:44 -0500, Scott Wood wrote: On 04/02/2013 04:32:04 PM, Alex Williamson wrote: On Tue, 2013-04-02 at 15:57 -0500, Scott Wood wrote: On 04/02/2013 03:32:17 PM, Alex Williamson wrote: On x86 the interrupt remapper handles this transparently when MSI is enabled

Re: RFC: vfio API changes needed for powerpc

2013-04-02 Thread Alex Williamson
On Tue, 2013-04-02 at 17:50 -0500, Scott Wood wrote: On 04/02/2013 04:38:45 PM, Alex Williamson wrote: On Tue, 2013-04-02 at 16:08 -0500, Stuart Yoder wrote: On Tue, Apr 2, 2013 at 3:57 PM, Scott Wood scottw...@freescale.com wrote: C. Explicit mapping using normal DMA map

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-03 Thread Alex Williamson
On Tue, 2013-04-02 at 18:18 +0200, Joerg Roedel wrote: Cc'ing Alex Williamson Alex, can you please review the iommu-group part of this patch? Sure, it looks pretty reasonable. AIUI, all PCI devices are below some kind of host bridge that is either new and supports partitioning or old

Re: RFC: vfio API changes needed for powerpc

2013-04-03 Thread Alex Williamson
On Wed, 2013-04-03 at 14:09 -0500, Stuart Yoder wrote: Would is be possible for userspace to simply leave room for MSI bank mapping (how much room could be determined by something like VFIO_IOMMU_GET_MSI_BANK_COUNT) then document the API that userspace can DMA_MAP starting at the 0x0

Re: RFC: vfio API changes needed for powerpc (v2)

2013-04-04 Thread Alex Williamson
On Thu, 2013-04-04 at 17:32 +, Yoder Stuart-B08248 wrote: Based on the email thread over the last couple of days, I have below an more concrete proposal (v2) for new ioctls supporting vfio-pci on SoCs with the Freescale PAMU. Example usage is as described by Scott: count =

Re: PCI warning on boot 3.8.0-rc1

2013-04-10 Thread Alex Williamson
On Wed, 2013-04-10 at 16:36 -0600, Bjorn Helgaas wrote: On Wed, Feb 06, 2013 at 08:58:41AM -0700, Alex Williamson wrote: On Wed, 2013-02-06 at 07:49 -0800, Stephen Hemminger wrote: On Mon, 04 Feb 2013 15:41:24 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2013-02

Re: PCI warning on boot 3.8.0-rc1

2013-04-15 Thread Alex Williamson
On Thu, 2013-04-11 at 11:23 -0600, Bjorn Helgaas wrote: On Wed, Apr 10, 2013 at 6:01 PM, Alex Williamson alex.william...@redhat.com wrote: On Wed, 2013-04-10 at 16:36 -0600, Bjorn Helgaas wrote: On Wed, Feb 06, 2013 at 08:58:41AM -0700, Alex Williamson wrote: On Wed, 2013-02-06 at 07:49

Re: RFC: vfio / iommu driver for hardware with no iommu

2013-04-23 Thread Alex Williamson
On Tue, 2013-04-23 at 19:16 +, Yoder Stuart-B08248 wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Tuesday, April 23, 2013 11:56 AM To: Yoder Stuart-B08248 Cc: Joerg Roedel; iommu@lists.linux-foundation.org Subject: Re: RFC: vfio

Re: RFC: IOMMU/AMD: Error Handling

2013-04-30 Thread Alex Williamson
On Tue, 2013-04-30 at 11:06 -0400, Don Dutile wrote: On 04/30/2013 10:49 AM, Suravee Suthikulanit wrote: On 4/29/2013 3:10 PM, Don Dutile wrote: On 04/29/2013 03:45 PM, Suravee Suthikulanit wrote: Joerg, We are in the process of implementing AMD IOMMU error handling, and I would like

Re: RFC: vfio / iommu driver for hardware with no iommu

2013-04-30 Thread Alex Williamson
: iommu-boun...@lists.linux-foundation.org [mailto:iommu- boun...@lists.linux-foundation.org] On Behalf Of Don Dutile Sent: Thursday, April 25, 2013 1:11 AM To: Alex Williamson Cc: Yoder Stuart-B08248; iommu@lists.linux-foundation.org Subject: Re: RFC: vfio / iommu driver for hardware

Re: RFC: vfio / iommu driver for hardware with no iommu

2013-04-30 Thread Alex Williamson
On Tue, 2013-04-30 at 16:48 -0400, Don Dutile wrote: On 04/30/2013 03:11 PM, Konrad Rzeszutek Wilk wrote: Does vfio work with swiotlb and if not, can/should swiotlb be extended? Or does the time and space overhead make it a moot point? It does not work with SWIOTLB as it uses the DMA API,

Re: [PATCH] Reset PCIe devices to stop ongoing DMA

2013-05-07 Thread Alex Williamson
On Wed, 2013-04-24 at 13:58 +0900, Takao Indoh wrote: This patch resets PCIe devices on boot to stop ongoing DMA. When pci=pcie_reset_devices is specified, a hot reset is triggered on each PCIe root port and downstream port to reset its downstream endpoint. Problem: This patch solves the

Re: [PATCH] Reset PCIe devices to stop ongoing DMA

2013-05-07 Thread Alex Williamson
On Tue, 2013-05-07 at 16:10 -0400, Don Dutile wrote: On 05/07/2013 12:39 PM, Alex Williamson wrote: On Wed, 2013-04-24 at 13:58 +0900, Takao Indoh wrote: This patch resets PCIe devices on boot to stop ongoing DMA. When pci=pcie_reset_devices is specified, a hot reset is triggered on each

[PATCH 2/3] intel-iommu: Convert to pci_walk_up_to_first_match

2013-05-10 Thread Alex Williamson
-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/intel-iommu.c | 77 ++- drivers/iommu/intel_irq_remapping.c | 13 -- 2 files changed, 57 insertions(+), 33 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c

[PATCH 3/3] pci: Remove pci_find_pcie_upstream_bridge

2013-05-10 Thread Alex Williamson
This function no longer has any users. Signed-off-by: Alex williamson alex.william...@redhat.com --- drivers/pci/search.c | 35 --- include/linux/pci.h | 11 --- 2 files changed, 46 deletions(-) diff --git a/drivers/pci/search.c b/drivers/pci

[PATCH] iommu: Split iommu_unmaps

2013-05-24 Thread Alex Williamson
. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/iommu.c | 63 +++-- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index d8f98b1..4b0b56b 100644 --- a/drivers

[PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-24 Thread Alex Williamson
, but is compatible with known users and works with existing QEMU userspace supporting vfio. Thanks, Alex --- Alex Williamson (2): vfio: Convert type1 iommu to use rbtree vfio: hugepage support for vfio_iommu_type1 drivers/vfio/vfio_iommu_type1.c | 607

[PATCH 1/2] vfio: Convert type1 iommu to use rbtree

2013-05-24 Thread Alex Williamson
more efficient and allows us to use common code instead of inventing our own. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/vfio/vfio_iommu_type1.c | 190 --- 1 file changed, 96 insertions(+), 94 deletions(-) diff --git a/drivers/vfio

[PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-24 Thread Alex Williamson
to reflect this. Previously this was unmodified on mapping, always returning the the requested unmap size. This is now updated to return the actual unmap size on success, allowing userspace to appropriately track mappings. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/vfio

Re: [PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-25 Thread Alex Williamson
On Sat, 2013-05-25 at 07:21 -0400, Konrad Rzeszutek Wilk wrote: On Fri, May 24, 2013 at 11:24:26AM -0600, Alex Williamson wrote: This series let's the vfio type1 iommu backend take advantage of iommu large page support. See patch 2/2 for the details. This has been tested on both amd_iommu

[PATCH 3/2] vfio: Provide module option to disable vfio_iommu_type1 hugepage support

2013-05-28 Thread Alex Williamson
through sysfs. If enabled dynamically, only new mappings are restricted. Signed-off-by: Alex Williamson alex.william...@redhat.com --- As suggested by Konrad. This is cleaner to add as a follow-on drivers/vfio/vfio_iommu_type1.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH v2 2/2] intel-iommu: Convert to iommu_pci_find_upstream + iommu_pci_is_pcie_bridge

2013-05-28 Thread Alex Williamson
. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=44881 Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/Kconfig |2 + drivers/iommu/intel-iommu.c | 77 ++- drivers/iommu/intel_irq_remapping.c | 15 +-- 3

[PATCH v2 1/2] iommu: Quirked PCIe bridge test and search function

2013-05-28 Thread Alex Williamson
of confusion that a PCIe capability would be expected, so implement it in IOMMU code. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/Kconfig |3 ++ drivers/iommu/Makefile |1 + drivers/iommu/pci.c| 69

[PATCH v2 0/2] iommu/intel: Quirk non-compliant PCIe-to-PCI bridges

2013-05-28 Thread Alex Williamson
since PCI-core doesn't want it. v1 has several reports from users that this solves the problem they have in the above bz. Thanks, Alex --- Alex Williamson (2): iommu: Quirked PCIe bridge test and search function intel-iommu: Convert to iommu_pci_find_upstream + iommu_pci_is_pcie_bridge

Re: [PATCH v2 1/2] iommu: Quirked PCIe bridge test and search function

2013-05-28 Thread Alex Williamson
On Tue, 2013-05-28 at 12:38 -0700, Stephen Hemminger wrote: On Tue, 28 May 2013 12:40:20 -0600 Alex Williamson alex.william...@redhat.com wrote: Some PCIe-to-PCI bridges are not fully compliant with the PCIe spec and do not include a PCIe capability. pci_is_pcie() is not useful

[PATCH v2 3/2] pci: Remove unused pci_find_upstream_pcie_bridge()

2013-05-28 Thread Alex Williamson
This no longer has any users. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Bjorn Helgaas bhelg...@google.com --- I figured I'd follow up with this after the series is accepted, but I won't turn down an pre-emptive ack from Bjorn. drivers/pci/search.c | 35

[PATCH] iommu: amd/intel: Remove multifunction assumption around grouping

2013-05-30 Thread Alex Williamson
, all the non-ACS functions will be grouped together and ACS functions will get separate groups. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/amd_iommu.c | 25 +++-- drivers/iommu/intel-iommu.c | 25 +++-- 2 files changed

  1   2   3   4   5   6   7   8   9   10   >