Re: [PATCH] dma-mapping: benchmark: Extract a common header file for map_benchmark definition

2022-02-11 Thread Shuah Khan
. We are moving in the direction of cleaning up defines in selftests for the same reason. Let's just make sure this works on older kernels. We do support mainline kselftest on stable releases. With that: Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-09 Thread Shuah Khan
On 4/9/21 2:00 PM, Shuah Khan wrote: On 4/9/21 2:58 AM, Suravee Suthikulpanit wrote: In early AMD desktop/mobile platforms (during 2013), when the IOMMU Performance Counter (PMC) support was first introduced in commit 30861ddc9cca ("perf/x86/amd: Add IOMMU Performance Counter res

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-09 Thread Shuah Khan
30935570.3...@monopod.intra.ispras.ru/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753 Cc: Tj (Elloe Linux) Cc: Shuah Khan Cc: Alexander Monakov Cc: David Coe Cc: Paul Menzel Signed-off-by: Suravee Suthikulpanit --- Tested-by: Shuah Khan thanks, -- Shuah Results with this patch on AMD Ryzen 5 PR

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-09 Thread Shuah Khan
On 4/9/21 10:37 AM, Shuah Khan wrote: On 4/9/21 2:58 AM, Suravee Suthikulpanit wrote: In early AMD desktop/mobile platforms (during 2013), when the IOMMU Performance Counter (PMC) support was first introduced in commit 30861ddc9cca ("perf/x86/amd: Add IOMMU Performance Counter res

Re: [PATCH 1/2] Revert "iommu/amd: Fix performance counter initialization"

2021-04-09 Thread Shuah Khan
to removing the pre-init test. Link: https://lore.kernel.org/linux-iommu/alpine.lnx.3.20.13.2006030935570.3...@monopod.intra.ispras.ru/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753 Cc: Tj (Elloe Linux) Cc: Shuah Khan Cc: Alexander Monakov Cc: David Coe Signed-off-by: Paul Menzel

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-09 Thread Shuah Khan
d in use be relatively safe to remove this legacy logic. Link: https://lore.kernel.org/linux-iommu/alpine.lnx.3.20.13.2006030935570.3...@monopod.intra.ispras.ru/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753 Cc: Tj (Elloe Linux) Cc: Shuah Khan Cc: Alexander Monakov Cc: David Coe Cc: P

Re: [PATCH] iommu/amd: Fix event counter availability check

2021-02-26 Thread Shuah Khan
On 2/26/21 2:44 PM, Paul Menzel wrote: [cc: +suravee, +jörg] Dear Alex, dear Shuah, dear Suravee, dear Jörg, Am 03.06.20 um 08:54 schrieb Alexander Monakov: On Tue, 2 Jun 2020, Shuah Khan wrote: I changed the logic to read config to get max banks and counters before checking if counters

Re: [PATCH] iommu/amd: Fix event counter availability check

2020-06-02 Thread Shuah Khan
On 5/31/20 1:22 AM, Alexander Monakov wrote: Hi, Adding Shuah Khan to Cc: I've noticed you've seen this issue on Ryzen 2400GE; can you have a look at the patch? Would be nice to know if it fixes the problem for you too. I am not seeing any change in behavior on my system. I still see: I

Re: [PATCH v2] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-24 Thread Shuah Khan
On 1/23/20 11:43 PM, Suravee Suthikulpanit wrote: On 1/24/20 5:32 AM, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan

[PATCH v2] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-23 Thread Shuah Khan
init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan --- Changes since v1: -- Fix bug in sucessful return path. Add a return instead of fall

Re: [PATCH] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-23 Thread Shuah Khan
On 1/21/20 8:32 AM, Shuah Khan wrote: On 1/20/20 7:10 PM, Suravee Suthikulpanit wrote: On 1/17/2020 5:08 PM, Joerg Roedel wrote: Adding Suravee, who wrote the IOMMU Perf Counter code. On Tue, Jan 14, 2020 at 08:12:20AM -0700, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when

Re: [PATCH] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-21 Thread Shuah Khan
On 1/20/20 7:10 PM, Suravee Suthikulpanit wrote: On 1/17/2020 5:08 PM, Joerg Roedel wrote: Adding Suravee, who wrote the IOMMU Perf Counter code. On Tue, Jan 14, 2020 at 08:12:20AM -0700, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf

[PATCH] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-14 Thread Shuah Khan
init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan --- drivers/iommu/amd_iommu_init.c | 22 -- 1 file changed, 16 insertions

Re: remove the ->mapping_error method from dma_map_ops V2

2018-11-28 Thread Shuah Khan
On Wed, Nov 28, 2018 at 12:48 PM Russell King - ARM Linux wrote: > > On Wed, Nov 28, 2018 at 11:27:17AM -0800, David Miller wrote: > > From: Linus Torvalds > > Date: Wed, 28 Nov 2018 10:00:06 -0800 > > > > > Not all memory is accessible even to the kernel. If you have memory > > > that shows up

Re: [PATCH kernel] vfio/spapr: Add trace points for map/unmap

2017-11-29 Thread Shuah Khan
On 11/29/2017 09:32 AM, Alex Williamson wrote: > On Thu, 23 Nov 2017 15:13:37 +1100 > Alexey Kardashevskiy wrote: > >> On 17/11/17 17:58, Alexey Kardashevskiy wrote: >>> On 17/11/17 11:13, Alex Williamson wrote: On Tue, 14 Nov 2017 10:47:12 +1100 Alexey Kardashevskiy

Re: [PATCH] iommu: fix trace_map() to report original iova and original size

2015-01-19 Thread Shuah Khan
On 01/15/2015 07:29 PM, Shuah Khan wrote: iommu_map() calls trace_map() with iova and size. trace_map() should report original iova and original size as opposed to iova and size after they get changed during mapping. size is always zero at the end of mapping which is useless to report

[PATCH] iommu: fix trace_map() to report original iova and original size

2015-01-16 Thread Shuah Khan
as the original iova. Change iommu_map() to call trace_map() to report original iova and original size. Signed-off-by: Shuah Khan shua...@osg.samsung.com Reported-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] iommu: fix trace_unmap() to report original iova

2015-01-16 Thread Shuah Khan
iommu_unmap() calls trace_unmap() with changed iova and original size. trace_unmap() should report original iova instead. Change iommu_unmap() to call trace_unmap() with original iova. Signed-off-by: Shuah Khan shua...@osg.samsung.com Reported-by: Alex Williamson alex.william...@redhat.com

[PATCH] iommu: change trace unmap api to report unmapped size

2015-01-16 Thread Shuah Khan
. Signed-off-by: Shuah Khan shua...@osg.samsung.com Suggested-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/iommu.c| 2 +- include/trace/events/iommu.h | 31 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/iommu

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-06 Thread Shuah Khan
this helps. -- Shuah -- Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) shuah...@samsung.com | (970) 672-0658 ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-03 Thread Shuah Khan
, it adds an overhead in releasing memory for devres to compared to other dma_unmap_* wrappers. Users need to be aware of that. This overhead is going to be in the performance path when drivers unmap buffers during run-time. Adding Joerg Roedel to the thread. -- Shuah -- Shuah Khan Senior

Re: hpsa driver bug crack kernel down!

2014-04-10 Thread Shuah Khan
On Thu, Apr 10, 2014 at 2:45 PM, scame...@beardog.cce.hp.com wrote: 3f583bc21977 BAD (Merge tag 'iommu-updates-v3.15') Yes, specifically (finally done bisecting): commit 2e45528930388658603ea24d49cf52867b928d3e Author: Jiang Liu jiang@linux.intel.com Date: Wed Feb 19 14:07:36 2014

Re: [PATCH 1/2] iommu: Add iommu_fault class event to iommu trace

2013-09-24 Thread Shuah Khan
On 09/24/2013 04:48 AM, Joerg Roedel wrote: On Fri, Aug 16, 2013 at 11:20:16AM -0600, Shuah Khan wrote: +DEFINE_EVENT(iommu_fault, report_fault, + + TP_PROTO(struct device *dev, unsigned long iova, int flags), + + TP_ARGS(dev, iova, flags) +); I am not entirely happy

[PATCH v4 0/2] iommu: Add iommu_error class event to iommu trace

2013-09-24 Thread Shuah Khan
. iommu_error:io_page_fault This patch set depends on the previous patch set that added iommu tracing feature. Reference: http://www.kernelhub.org/?msg=313155p=2 http://www.kernelhub.org/?msg=313156p=2 Shuah Khan (2): iommu: Add iommu_error class event to iommu trace iommu: Change iommu driver to call

[PATCH v4 2/2] iommu: Change iommu driver to call io_page_fault trace event

2013-09-24 Thread Shuah Khan
flags=0x0002 swapper/0-1 [003] 2.004115: io_page_fault: IOMMU:pci :00:1a.0 iova=0xcadc6000 flags=0x0002 swapper/0-1 [003] 2.004129: io_page_fault: IOMMU:pci :00:1f.0 iova=0x flags=0x0002 Signed-off-by: Shuah Khan shuah

[PATCH v4 1/2] iommu: Add iommu_error class event to iommu trace

2013-09-24 Thread Shuah Khan
iommu_error class event can be enabled to trigger when an iommu error occurs. This trace event is intended to be called to report the error information. Trace information includes driver name, device name, iova, and flags. iommu_error:io_page_fault Signed-off-by: Shuah Khan shuah...@samsung.com

Re: [PATCH 0/9] AMD IOMMU cleanups, fixes and IVRS bug workarounds

2013-04-13 Thread Shuah Khan
On Sat, Apr 13, 2013 at 9:26 AM, Joerg Roedel j...@8bytes.org wrote: On Sat, Apr 13, 2013 at 11:06:22PM +0800, Andrew Cooks wrote: On Fri, Apr 12, 2013 at 4:06 PM, Joerg Roedel j...@8bytes.org wrote: Oh, that's sad. You were the only one having a machine wich actually has unity-mapped

Re: [PATCH 8/9] iommu/amd: Don't report firmware bugs with cmd-line ivrs overrides

2013-04-10 Thread Shuah Khan
On Tue, Apr 9, 2013 at 2:13 PM, Joerg Roedel j...@8bytes.org wrote: When the IVRS entries for IOAPIC and HPET are overridden on the kernel command line, a problem detected in the check function might not be a firmware bug anymore. So disable the firmware bug reporting if the user provided

Re: [PATCH 1/9] iommu/amd: Remove map_sg_no_iommu()

2013-04-10 Thread Shuah Khan
. Signed-off-by: Joerg Roedel j...@8bytes.org --- Reviewed-by: Shuah Khan shuahk...@gmail.com ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 2/9] iommu/amd: Use AMD specific data structure for irq remapping

2013-04-10 Thread Shuah Khan
. Signed-off-by: Joerg Roedel j...@8bytes.org --- Reviewed-by: Shuah Khan shuahk...@gmail.com ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 0/9] AMD IOMMU cleanups, fixes and IVRS bug workarounds

2013-04-10 Thread Shuah Khan
to test machine. :( Reviewed-by: Shuah Khan shuahk...@gmail.com -- Shuah ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 2/2 V5] iommu/amd: Add logic to decode AMD IOMMU event flag

2013-04-10 Thread Shuah Khan
feature. Do you also plan to add decode logic for these flags. For example, RZ is only meaningful when PR=1, RW is only meaningful when PR=1, TR=0, and I=0, and so on? This additional logic will be useful. Reviewed-by: Shuah Khan shuahk...@gmail.com -- Shuah + /* Error type only needed

Re: [PATCH 2/2 V5] iommu/amd: Add logic to decode AMD IOMMU event flag

2013-04-10 Thread Shuah Khan
On Wed, Apr 10, 2013 at 10:27 AM, Suravee Suthikulanit suravee.suthikulpa...@amd.com wrote: On 4/10/2013 11:21 AM, Shuah Khan wrote: Good feature. Do you also plan to add decode logic for these flags. For example, RZ is only meaningful when PR=1, RW is only meaningful when PR=1, TR=0, and I

Re: [PATCH 3.4] iommu/amd: Initialize device table after dma_ops

2013-02-28 Thread Shuah Khan
On Tue, 2013-02-26 at 16:49 -0700, Shuah Khan wrote: When dma_ops are initialized the unity mappings are created. The init_device_table_dma() function makes sure DMA from all devices is blocked by default. This opens a short window in time where DMA to unity mapped regions is blocked

Re: [PATCH 3.4] iommu/amd: Initialize device table after dma_ops

2013-02-28 Thread Shuah Khan
On Thu, 2013-02-28 at 12:52 -0700, Shuah Khan wrote: On Tue, 2013-02-26 at 16:49 -0700, Shuah Khan wrote: When dma_ops are initialized the unity mappings are created. The init_device_table_dma() function makes sure DMA from all devices is blocked by default. This opens a short window

[PATCH 3.2] iommu/amd: Initialize device table after dma_ops

2013-02-28 Thread Shuah Khan
the device table after dma_ops. Back-port upstream commit: f528d980c17b8714aedc918ba86e058af914d66b Tested on 3.2.38 Signed-off-by: Joerg Roedel j...@8bytes.org Signed-off-by: Shuah Khan shuah.k...@hp.com CC: sta...@vger.kernel.org 3.2 --- drivers/iommu/amd_iommu_init.c | 10 +++--- 1 file

[PATCH v2 1/4] pci: Add PCI_BUS_NUM() and PCI_DEVID() interfaces to return bus number and device id

2013-02-27 Thread Shuah Khan
-off-by: Shuah Khan shuah.k...@hp.com --- include/linux/pci.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index 15472d6..95c105a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -35,6 +35,21 @@ /* Include the ID list

[PATCH v2 2/4] pci/aer: Remove local PCI_BUS() define and use PCI_BUS_NUM() from pci

2013-02-27 Thread Shuah Khan
Change to remove local PCI_BUS() define and use the new PCI_BUS_NUM() interface from pci. Signed-off-by: Shuah Khan shuah.k...@hp.com --- drivers/pci/pcie/aer/aerdrv_core.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci

[PATCH v2 4/4] iommu/amd: Remove calc_devid() and use PCI_DEVID() from pci

2013-02-27 Thread Shuah Khan
Change to remove calc_devid() and use PCI_DEVID() from pci instead. Signed-off-by: Shuah Khan shuah.k...@hp.com --- drivers/iommu/amd_iommu.c |2 +- drivers/iommu/amd_iommu_init.c |6 +++--- drivers/iommu/amd_iommu_types.h |7 --- 3 files changed, 4 insertions(+), 11

[PATCH 3.4] iommu/amd: Initialize device table after dma_ops

2013-02-27 Thread Shuah Khan
the device table after dma_ops. Back-port upstream commit: f528d980c17b8714aedc918ba86e058af914d66b Signed-off-by: Joerg Roedel j...@8bytes.org Signed-off-by: Shuah Khan shuah.k...@hp.com CC: sta...@vger.kernel.org 3.4 --- drivers/iommu/amd_iommu_init.c |9 +++-- 1 file changed, 7 insertions

Re: [PATCH 1/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

2013-02-27 Thread Shuah Khan
On Mon, 2013-02-25 at 14:53 -0700, Shuah Khan wrote: On Mon, 2013-02-25 at 14:23 -0700, Bjorn Helgaas wrote: On Mon, Feb 25, 2013 at 9:37 AM, Shuah Khan shuah.k...@hp.com wrote: On Wed, 2013-02-20 at 18:19 -0700, Bjorn Helgaas wrote: On Mon, Feb 11, 2013 at 4:00 PM, Shuah Khan shuah.k

[PATCH 3.0] iommu/amd: Initialize device table after dma_ops

2013-02-26 Thread Shuah Khan
the device table after dma_ops. Back-port upstream commit: f528d980c17b8714aedc918ba86e058af914d66b Signed-off-by: Joerg Roedel j...@8bytes.org Signed-off-by: Shuah Khan shuah.k...@hp.com CC: sta...@vger.kernel.org 3.0 --- arch/x86/kernel/amd_iommu_init.c | 10 +++--- 1 file changed, 7

Re: [PATCH 1/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

2013-02-25 Thread Shuah Khan
On Wed, 2013-02-20 at 18:19 -0700, Bjorn Helgaas wrote: On Mon, Feb 11, 2013 at 4:00 PM, Shuah Khan shuah.k...@hp.com wrote: pci defines PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() interfaces, however, it doesn't have interfaces to return PCI bus and PCI device id. Drivers (AMD IOMMU, and AER

Re: [PATCH 1/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

2013-02-25 Thread Shuah Khan
On Mon, 2013-02-25 at 14:23 -0700, Bjorn Helgaas wrote: On Mon, Feb 25, 2013 at 9:37 AM, Shuah Khan shuah.k...@hp.com wrote: On Wed, 2013-02-20 at 18:19 -0700, Bjorn Helgaas wrote: On Mon, Feb 11, 2013 at 4:00 PM, Shuah Khan shuah.k...@hp.com wrote: pci defines PCI_DEVFN(), PCI_SLOT

Re: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-02-11 Thread Shuah Khan
On Mon, Feb 11, 2013 at 12:49 PM, Greg KH gre...@linuxfoundation.org wrote: On Wed, Feb 06, 2013 at 07:40:50PM -0700, Shuah Khan wrote: On Wed, 2013-02-06 at 13:12 +0100, Joerg Roedel wrote: On Tue, Feb 05, 2013 at 06:57:21AM -0700, Shuah Khan wrote: Thanks much. I will hang on to this test

[PATCH 0/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

2013-02-11 Thread Shuah Khan
pci defines PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() interfaces, however, it doesn't have interfaces to return PCI bus and PCI device id. Drivers (AMD IOMMU, and AER) have module specific definitions for PCI_BUS() and AMD_IOMMU driver also has a module specific interface to calculate PCI device id

[PATCH 1/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

2013-02-11 Thread Shuah Khan
device id from bus number, and devfn pair. Signed-off-by: Shuah Khan shuah.k...@hp.com --- include/uapi/linux/pci.h |4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/pci.h b/include/uapi/linux/pci.h index 3c292bc0..6b2c8b3 100644 --- a/include/uapi/linux/pci.h +++ b/include

[PATCH 3/4] amd_iommu: Remove local PCI_BUS() define and use PCI_BUS() from pci

2013-02-11 Thread Shuah Khan
Change to remove local PCI_BUS() define and use the new PCI_BUS interface from pci. Signed-off-by: Shuah Khan shuah.k...@hp.com --- drivers/iommu/amd_iommu_types.h |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu

[PATCH 4/4] amd_iommu: Remove calc_devid() and use PCI_DEVID() from pci

2013-02-11 Thread Shuah Khan
Change to remove calc_devid() and use PCI_DEVID() from pci instead. Signed-off-by: Shuah Khan shuah.k...@hp.com --- drivers/iommu/amd_iommu.c |2 +- drivers/iommu/amd_iommu_init.c |6 +++--- drivers/iommu/amd_iommu_types.h |7 --- 3 files changed, 4 insertions(+), 11

Re: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-02-06 Thread Shuah Khan
On Wed, 2013-02-06 at 13:12 +0100, Joerg Roedel wrote: On Tue, Feb 05, 2013 at 06:57:21AM -0700, Shuah Khan wrote: Thanks much. I will hang on to this test system for testing your fix. Okay, here is the simple fix for v3.8-rc6. I guess it is not straighforward to port it to v3.4

[PATCH] amd_iommu: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init()

2013-02-06 Thread Shuah Khan
the device table after dma_ops. Signed-off-by: Shuah Khan shuah.k...@hp.com CC: sta...@vger.kernel.org 3.4 --- drivers/iommu/amd_iommu_init.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index ef0ae93

Re: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-02-05 Thread Shuah Khan
On Tue, Feb 5, 2013 at 6:31 AM, Joerg Roedel j...@8bytes.org wrote: Hi Shuah, On Fri, Feb 01, 2013 at 11:31:59AM -0700, Shuah Khan wrote: Yes, 3.7 has the same window of opportunity for this race condition, however I couldn't figure out why it doesn't happen on 3.7. On 3.7 the window between

IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-01-31 Thread Shuah Khan
Joerg, I am seeing IO_PAGE_FAULTs on AMD system running releases prior to 3.7. I focused my debug and testing on 3.4. I am hoping to find a solution for this problem in 3.4. I don't see any IO_PAGE_FAULTs with 3.7 and later releases on this system. On this system BIOS specifies Unity mapped

Re: [PATCH] iommu: moving initialization earlier

2013-01-11 Thread Shuah Khan
On Fri, Jan 11, 2013 at 7:50 AM, Joerg Roedel j...@8bytes.org wrote: On Thu, Jan 10, 2013 at 01:40:17PM -0700, Shuah Khan wrote: I am currently debugging IO_PAGE_FAULTS on 3.6.11 (happens on all pre-3.7 releases). I root-caused the reason 3.7 works is because in 3.7 amd iommu driver moving up

Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-23 Thread Shuah Khan
On Fri, 2012-10-12 at 12:35 -0700, Jonathan Nieder wrote: Shuah Khan wrote: On Fri, 2012-10-12 at 11:38 -0700, Jonathan Nieder wrote: To save Willy time: am I correct in guessing the upstream commit you are referring to is 98fc5a693bbdda498a556654c70d1e31a186c988 (x86/amd-iommu: Use

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

2012-10-16 Thread Shuah Khan
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: [PATCH v3] Prevent devices with RMRRs from being placed into SI Domain during startup

2012-10-16 Thread Shuah Khan
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

[PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Shuah Khan
in amd_iommu_attach_device() for linux-2.6.32. Signed-off-by: Shuah Khan shuah.k...@hp.com CC: sta...@vger.kernel.org v2.6.32 --- arch/x86/kernel/amd_iommu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 3a44b75..67de7d7

Re: [RFC PATCH 1/5] amd_iommu: Split IOMMU group initialization

2012-10-09 Thread Shuah Khan
Alex, couple of comments in-lined: On Mon, Oct 8, 2012 at 10:49 PM, Alex Williamson alex.william...@redhat.com wrote: This needs to be broken apart, start with pulling all the IOMMU group init code into a new function. Signed-off-by: Alex Williamson alex.william...@redhat.com ---

Re: [PATCH 03/16] iommu/amd: Allocate data structures to keep track of irq remapping tables

2012-10-03 Thread Shuah Khan
On Fri, Sep 28, 2012 at 6:23 AM, Joerg Roedel joerg.roe...@amd.com wrote: To easily map device ids to interrupt remapping table entries a new lookup table is necessary. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 16

Re: [PATCH 14/16] iommu/irq: Use amd_iommu_irq_ops if supported

2012-10-03 Thread Shuah Khan
On Fri, Sep 28, 2012 at 6:24 AM, Joerg Roedel joerg.roe...@amd.com wrote: Finally enable interrupt remapping for AMD systems. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/irq_remapping.c |5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH 12/16] iommu/amd: Add initialization routines for AMD interrupt remapping

2012-10-03 Thread Shuah Khan
On Mon, Oct 1, 2012 at 2:05 AM, Joerg Roedel joerg.roe...@amd.com wrote: On Fri, Sep 28, 2012 at 05:18:18PM -0600, Shuah Khan wrote: +void amd_iommu_disable(void) +{ + amd_iommu_suspend(); Is it safe to attempt to suspend when iommu is in suspend state? In other words what happens

Re: [PATCH 14/16] iommu/irq: Use amd_iommu_irq_ops if supported

2012-10-03 Thread Shuah Khan
On Mon, Oct 1, 2012 at 2:08 AM, Joerg Roedel joerg.roe...@amd.com wrote: On Fri, Sep 28, 2012 at 05:39:03PM -0600, Shuah Khan wrote: On Fri, Sep 28, 2012 at 6:24 AM, Joerg Roedel joerg.roe...@amd.com wrote: void __init setup_irq_remapping_ops(void) { remap_ops

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

2012-09-28 Thread Shuah Khan
On Fri, 2012-09-28 at 20:15 +0100, David Woodhouse wrote: On Fri, 2012-09-28 at 12:36 -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 memory