Re: [PATCH] Revert Merge branch 'x86/iommu' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into for-linus

2008-08-01 Thread Joerg Roedel
On Fri, Aug 01, 2008 at 08:51:23AM +0900, FUJITA Tomonori wrote: On Fri, 1 Aug 2008 09:43:23 +1000 Stephen Rothwell [EMAIL PROTECTED] wrote: This reverts commit 29111f579f4f3f2a07385f931854ab0527ae7ea5. This undoes the hasty addition of a global version of iommu_num_pages() that broke

Re: [PATCH 1/3] powerpc: Add iommu domain pointer to device archdata

2013-08-14 Thread Joerg Roedel
On Mon, Jul 15, 2013 at 10:20:55AM +0530, Varun Sethi wrote: Add an iommu domain pointer to device (powerpc) archdata. Devices are attached to iommu domains and this pointer provides a mechanism to correlate between a device and the associated iommu domain. This field is set when a device is

Re: [PATCH 1/3] powerpc: Add iommu domain pointer to device archdata

2013-08-14 Thread Joerg Roedel
On Wed, Aug 14, 2013 at 09:56:11AM +, Sethi Varun-B16395 wrote: Please find the .config file attached with this mail. Fantastic, thanks. The build works fine, I'll include the driver into my next-branch. I also have two minor clean-up patches on-top, just if you where wondering.

Re: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Joerg Roedel
On Thu, Sep 04, 2014 at 11:33:42AM +0530, Varun Sethi wrote: + if (!iommu_group_get(dev)) + ret = iommu_group_add_device(group, dev); iommu_group_put(group); return ret; Doesn't this additional call to iommu_group_get take a reference to the iommu_group that

Re: linux-next: build failure after merge of the iommu tree

2014-11-05 Thread Joerg Roedel
On Wed, Nov 05, 2014 at 01:47:31PM +1100, Stephen Rothwell wrote: Hi Joerg, After merging the iommu tree, today's linux-next build (powerpc pc64_defconfig) failed like this: In file included from arch/powerpc/platforms/powernv/pci.c:33:0: arch/powerpc/include/asm/iommu.h:140:12: error:

[PATCH] powerpc/iommu: Rename iommu_[un]map_sg functions

2014-11-06 Thread Joerg Roedel
Hi, here is a patch that fixes a compile failure on powerpc with the recent iommu tree. If this patch is okay with you guys I'd like to carry it in the iommu tree too. Thanks, Joerg From ff39a0301d01ad24f7097718b4ec8215eb0c1141 Mon Sep 17 00:00:00 2001 From: Joerg Roedel jroe

Re: [PATCH 2/6] powerpc/fsl_pci: Store the platform device information corresponding to the pci controller.

2013-03-07 Thread Joerg Roedel
of 3.9-rc1? By when would you move the iommu git tree to 3.9-rc1? Regards Varun -Original Message- From: Kumar Gala [mailto:ga...@kernel.crashing.org] Sent: Thursday, February 28, 2013 9:15 PM To: Sethi Varun-B16395 Cc: Joerg Roedel; Stuart Yoder; io...@lists.linux

Re: [PATCH 2/5 v11] powerpc: Add iommu domain pointer to device archdata

2013-04-02 Thread Joerg Roedel
On Fri, Mar 29, 2013 at 01:23:59AM +0530, Varun Sethi wrote: Add an iommu domain pointer to device (powerpc) archdata. Devices are attached to iommu domains and this pointer provides a mechanism to correlate between a device and the associated iommu domain. This field is set when a device is

Re: [PATCH 4/5 v11] iommu/fsl: Add additional iommu attributes required by the PAMU driver.

2013-04-02 Thread Joerg Roedel
On Fri, Mar 29, 2013 at 01:24:01AM +0530, Varun Sethi wrote: +/* cache stash targets */ +enum stash_target { + IOMMU_ATTR_CACHE_L1 = 1, + IOMMU_ATTR_CACHE_L2, + IOMMU_ATTR_CACHE_L3, +}; + +/* This attribute corresponds to IOMMUs capable of generating + * a stash transaction. A

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

2013-04-02 Thread Joerg Roedel
Cc'ing Alex Williamson Alex, can you please review the iommu-group part of this patch? My comments so far are below: On Fri, Mar 29, 2013 at 01:24:02AM +0530, Varun Sethi wrote: +config FSL_PAMU + bool Freescale IOMMU support + depends on PPC_E500MC + select IOMMU_API +

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

2013-04-02 Thread Joerg Roedel
On Fri, Mar 29, 2013 at 01:23:57AM +0530, Varun Sethi wrote: This patchset provides the Freescale PAMU (Peripheral Access Management Unit) driver and the corresponding IOMMU API implementation. PAMU is the IOMMU present on Freescale QorIQ platforms. PAMU can authorize memory access, remap

Re: [PATCH 4/5 v11] iommu/fsl: Add additional iommu attributes required by the PAMU driver.

2013-04-03 Thread Joerg Roedel
On Wed, Apr 03, 2013 at 05:21:16AM +, Sethi Varun-B16395 wrote: I would prefer these PAMU specific enum and struct to be in a pamu- specific iommu-header. [Sethi Varun-B16395] But, these would be used by the IOMMU API users (e.g. VFIO), they shouldn't depend on PAMU specific

Re: [PATCH 1/3] iommu: Move swap_pci_ref function to pci.h.

2013-04-15 Thread Joerg Roedel
On Mon, Apr 15, 2013 at 12:42:00AM +0530, Varun Sethi wrote: swap_pci_ref function is used by the IOMMU API code for swapping pci device pointers, while determining the iommu group for the device. Currently this function was being implemented for different IOMMU drivers. This patch moves the

Re: [PATCH 1/3 v2] iommu: Move swap_pci_ref function to pci.h.

2013-04-23 Thread Joerg Roedel
On Tue, Apr 23, 2013 at 10:05:24AM +0530, Varun Sethi wrote: +#ifndef __PCI_H +#define __PCI_H Using __PCI_H is not a wise choice, it has certainly a high risk of a collision. Anyway, I changed it to __IOMMU_PCI_H and applied the patch. Joerg

Re: [PATCH 2/3 v14] iommu/fsl: Add additional iommu attributes required by the PAMU driver.

2013-04-23 Thread Joerg Roedel
On Tue, Apr 23, 2013 at 10:05:25AM +0530, Varun Sethi wrote: Added the following domain attributes for the FSL PAMU driver: 1. Added new iommu stash attribute, which allows setting of the LIODN specific stash id parameter through IOMMU API. 2. Added an attribute for enabling/disabling DMA

Re: [PATCH 2/3 v14] iommu/fsl: Add additional iommu attributes required by the PAMU driver.

2013-04-24 Thread Joerg Roedel
On Tue, Apr 23, 2013 at 02:10:25PM +, Sethi Varun-B16395 wrote: I think it's fine to have the header under linux, actually I also the intel-iommu header under linux. Yes, the difference is that VT-d runs on x86 and on ia64. So there is no single arch where the header could be placed. The

Re: [PATCH 1/2 v15] iommu/fsl: Add additional iommu attributes required by the PAMU driver.

2013-06-20 Thread Joerg Roedel
Varun, On Wed, Apr 24, 2013 at 05:05:50PM +0530, Varun Sethi wrote: Added the following domain attributes for the FSL PAMU driver: 1. Added new iommu stash attribute, which allows setting of the LIODN specific stash id parameter through IOMMU API. 2. Added an attribute for

Re: [PATCH 3/3 v16] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-06-24 Thread Joerg Roedel
On Thu, Jun 20, 2013 at 09:31:28PM +0530, Varun Sethi wrote: This patch provides the PAMU driver (fsl_pamu.c) and the corresponding IOMMU API implementation (fsl_pamu_domain.c). The PAMU hardware driver (fsl_pamu.c) has been derived from the work done by Ashish Kalra and Timur Tabi. AlexW,

Re: kvm PCI assignment VFIO ramblings

2011-08-04 Thread Joerg Roedel
On Sat, Jul 30, 2011 at 12:20:08PM -0600, Alex Williamson wrote: On Sat, 2011-07-30 at 09:58 +1000, Benjamin Herrenschmidt wrote: - The -minimum- granularity of pass-through is not always a single device and not always under SW control But IMHO, we need to preserve the granularity of

Re: kvm PCI assignment VFIO ramblings

2011-08-04 Thread Joerg Roedel
Hi Ben, thanks for your detailed introduction to the requirements for POWER. Its good to know that the granularity problem is not x86-only. On Sat, Jul 30, 2011 at 09:58:53AM +1000, Benjamin Herrenschmidt wrote: In IBM POWER land, we call this a partitionable endpoint (the term endpoint here

Re: kvm PCI assignment VFIO ramblings

2011-08-04 Thread Joerg Roedel
On Mon, Aug 01, 2011 at 02:27:36PM -0600, Alex Williamson wrote: It's not clear to me how we could skip it. With VT-d, we'd have to implement an emulated interrupt remapper and hope that the guest picks unused indexes in the host interrupt remapping table before it could do anything useful

Re: kvm PCI assignment VFIO ramblings

2011-08-05 Thread Joerg Roedel
On Fri, Aug 05, 2011 at 08:26:11PM +1000, Benjamin Herrenschmidt wrote: On Thu, 2011-08-04 at 12:41 +0200, Joerg Roedel wrote: On Mon, Aug 01, 2011 at 02:27:36PM -0600, Alex Williamson wrote: It's not clear to me how we could skip it. With VT-d, we'd have to implement an emulated

Re: kvm PCI assignment VFIO ramblings

2011-08-05 Thread Joerg Roedel
On Fri, Aug 05, 2011 at 08:42:38PM +1000, Benjamin Herrenschmidt wrote: Right. In fact to try to clarify the problem for everybody, I think we can distinguish two different classes of constraints that can influence the grouping of devices: 1- Hard constraints. These are typically devices

Re: kvm PCI assignment VFIO ramblings

2011-08-22 Thread Joerg Roedel
On Mon, Aug 22, 2011 at 02:30:26AM -0400, Avi Kivity wrote: On 08/20/2011 07:51 PM, Alex Williamson wrote: We need to address both the description and enforcement of device groups. Groups are formed any time the iommu does not have resolution between a set of devices. On x86, this

Re: kvm PCI assignment VFIO ramblings

2011-08-22 Thread Joerg Roedel
On Sat, Aug 20, 2011 at 12:51:39PM -0400, Alex Williamson wrote: We had an extremely productive VFIO BoF on Monday. Here's my attempt to capture the plan that I think we agreed to: We need to address both the description and enforcement of device groups. Groups are formed any time the

Re: kvm PCI assignment VFIO ramblings

2011-08-23 Thread Joerg Roedel
On Mon, Aug 22, 2011 at 08:52:18PM -0400, aafabbri wrote: You have to enforce group/iommu domain assignment whether you have the existing uiommu API, or if you change it to your proposed ioctl(inherit_iommu) API. The only change needed to VFIO here should be to make uiommu fd assignment

Re: kvm PCI assignment VFIO ramblings

2011-08-23 Thread Joerg Roedel
On Tue, Aug 23, 2011 at 02:54:43AM -0400, Benjamin Herrenschmidt wrote: Possibly, the question that interest me the most is what interface will KVM end up using. I'm also not terribly fan with the (perceived) discrepancy between using uiommu to create groups but using the group fd to actually

Re: kvm PCI assignment VFIO ramblings

2011-08-24 Thread Joerg Roedel
On Tue, Aug 23, 2011 at 03:30:06PM -0400, Alex Williamson wrote: On Tue, 2011-08-23 at 07:01 +1000, Benjamin Herrenschmidt wrote: Could be tho in what form ? returning sysfs pathes ? I'm at a loss there, please suggest. I think we need an ioctl that returns some kind of array of devices

Re: kvm PCI assignment VFIO ramblings

2011-08-24 Thread Joerg Roedel
On Tue, Aug 23, 2011 at 01:33:14PM -0400, Aaron Fabbri wrote: On 8/23/11 10:01 AM, Alex Williamson alex.william...@redhat.com wrote: The iommu domain would probably be allocated when the first device is bound to vfio. As each device is bound, it gets attached to the group. DMAs are done

Re: kvm PCI assignment VFIO ramblings

2011-08-25 Thread Joerg Roedel
On Thu, Aug 25, 2011 at 11:20:30AM -0600, Alex Williamson wrote: On Thu, 2011-08-25 at 12:54 +0200, Roedel, Joerg wrote: We need to solve this differently. ARM is starting to use the iommu-api too and this definitly does not work there. One possible solution might be to make the iommu-ops

Re: kvm PCI assignment VFIO ramblings

2011-08-26 Thread Joerg Roedel
On Fri, Aug 26, 2011 at 09:07:35AM -0500, Alexander Graf wrote: On 26.08.2011, at 04:33, Roedel, Joerg wrote: The reason is that you mean the usability for the programmer and I mean it for the actual user of qemu :) No, we mean the actual user of qemu. The reason being that making a

Re: kvm PCI assignment VFIO ramblings

2011-08-28 Thread Joerg Roedel
On Sun, Aug 28, 2011 at 04:14:00PM +0300, Avi Kivity wrote: On 08/26/2011 12:24 PM, Roedel, Joerg wrote: The biggest problem with this approach is that it has to happen in the context of the given process. Linux can't really modify an mm which which belong to another context in a safe way.

Re: kvm PCI assignment VFIO ramblings

2011-08-30 Thread Joerg Roedel
On Fri, Aug 26, 2011 at 12:04:22PM -0600, Alex Williamson wrote: On Thu, 2011-08-25 at 20:05 +0200, Joerg Roedel wrote: If we really expect segment numbers that need the full 16 bit then this would be the way to go. Otherwise I would prefer returning the group-id directly and partition

Re: kvm PCI assignment VFIO ramblings

2011-08-30 Thread Joerg Roedel
On Sun, Aug 28, 2011 at 05:04:32PM +0300, Avi Kivity wrote: On 08/28/2011 04:56 PM, Joerg Roedel wrote: This can't be secured by a lock, because it introduces potential A-B--B-A lock problem when two processes try to take each others mm. It could probably be solved by a task-real_mm pointer

Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check.

2014-07-04 Thread Joerg Roedel
On Tue, Jun 24, 2014 at 07:27:15PM +0530, Varun Sethi wrote: /* window size is 2^(WSE+1) bytes */ - return __ffs(addrspace_size) - 1; + return fls64(addrspace_size) - 2; This looks bogus, why do you replace ffs (find-first-bit) by fls (find-last-bit)? Joerg

Re: [PATCH 2/3] iommu/fsl: Fix the device domain attach condition.

2014-07-04 Thread Joerg Roedel
Hmm, On Tue, Jun 24, 2014 at 07:27:16PM +0530, Varun Sethi wrote: - old_domain_info = find_domain(dev); + old_domain_info = dev-archdata.iommu_domain; if (old_domain_info old_domain_info-domain != dma_domain) { spin_unlock_irqrestore(device_domain_lock, flags);

Re: [PATCH] iommu: Add empty stub for iommu_group_get_by_id()

2013-12-30 Thread Joerg Roedel
On Thu, Nov 21, 2013 at 05:41:14PM +1100, Alexey Kardashevskiy wrote: Almost every function in include/linux/iommu.h has an empty stub but the iommu_group_get_by_id() did not get one by mistake. This adds an empty stub for iommu_group_get_by_id() for IOMMU_API disabled config.

Re: [PATCH 0/9] dma_debug: add debug_dma_mapping_error support to architectures that support DMA_DEBUG_API

2012-11-26 Thread Joerg Roedel
On Mon, Nov 26, 2012 at 11:57:19AM +0100, Marek Szyprowski wrote: I've took all the patches to the next-dma-debug branch in my tree, I sorry that You have to wait so long for it. My branch is based on Joerg's dma-debug branch and I've included it for testing in linux-next branch. Joerg:

Re: [PATCH 0/9] dma_debug: add debug_dma_mapping_error support to architectures that support DMA_DEBUG_API

2012-11-26 Thread Joerg Roedel
Hi Shuah, On Fri, Nov 23, 2012 at 02:29:02PM -0700, Shuah Khan wrote: x86 - done in the first patch that added the feature. ARM64: dma_debug: add debug_dma_mapping_error support c6x: dma_debug: add debug_dma_mapping_error support ia64: dma_debug: add debug_dma_mapping_error support

Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.

2012-12-02 Thread Joerg Roedel
Hmm, we need to work out a good abstraction for this. On Tue, Nov 20, 2012 at 07:24:56PM +0530, Varun Sethi wrote: Added the following domain attributes required by FSL PAMU driver: 1. Subwindows field added to the iommu domain geometry attribute. Are the Subwindows mapped with full size or do

Re: [PATCH 0/9] dma_debug: add debug_dma_mapping_error support to architectures that support DMA_DEBUG_API

2012-12-02 Thread Joerg Roedel
Hi Marek, On Mon, Nov 26, 2012 at 11:57:19AM +0100, Marek Szyprowski wrote: I've took all the patches to the next-dma-debug branch in my tree, I sorry that You have to wait so long for it. My branch is based on Joerg's dma-debug branch and I've included it for testing in linux-next branch.

Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.

2012-12-03 Thread Joerg Roedel
On Mon, Dec 03, 2012 at 04:57:29PM +, Sethi Varun-B16395 wrote: -Original Message- From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- boun...@lists.linux-foundation.org] On Behalf Of Joerg Roedel Sent: Sunday, December 02, 2012 7:33 PM To: Sethi Varun-B16395

Re: [PATCH 0/4] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

2013-01-06 Thread Joerg Roedel
Hi Varun, On Thu, Jan 03, 2013 at 05:21:09AM +, Sethi Varun-B16395 wrote: It's been a while since I submitted this patch. I have tried to address your comments regarding the subwindow attribute. I would really appreciate if I can get some feedback on this patch. I have some ideas in mind

Re: [PATCH 2/6] powerpc/fsl_pci: Store the platform device information corresponding to the pci controller.

2013-02-27 Thread Joerg Roedel
On Tue, Feb 26, 2013 at 06:16:10AM +, Sethi Varun-B16395 wrote: This patch is not present in Joerg's tree and the add_device API in the PAMU driver requires this patch. Will this patch be part of v3.9-rc1? Joerg ___ Linuxppc-dev

Re: [PATCH 1/6 v8] iommu/fsl: Store iommu domain information pointer in archdata.

2013-02-27 Thread Joerg Roedel
On Mon, Feb 18, 2013 at 06:22:14PM +0530, Varun Sethi wrote: Add a new field in the device (powerpc) archdata structure for storing iommu domain information pointer. This pointer is stored when the device is attached to a particular domain. Signed-off-by: Varun Sethi

Re: [PATCH 3/6] powerpc/fsl_pci: Added defines for the FSL PCI controller BRR1 register.

2013-02-27 Thread Joerg Roedel
On Mon, Feb 18, 2013 at 06:22:16PM +0530, Varun Sethi wrote: Macros for checking FSL PCI controller version. Signed-off-by: Varun Sethi varun.se...@freescale.com --- arch/powerpc/include/asm/pci-bridge.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 5/6 v8] iommu/fsl: Add addtional attributes specific to the PAMU driver.

2013-02-27 Thread Joerg Roedel
On Mon, Feb 18, 2013 at 06:22:18PM +0530, Varun Sethi wrote: Added the following domain attributes for the FSL PAMU driver: 1. Added new iommu stash attribute, which allows setting of the LIODN specific stash id parameter through IOMMU API. 2. Added an attribute for enabling/disabling DMA

Re: [PATCH v2] powerpc: Fix incorrect PPC32 PAMU dependency

2016-04-07 Thread Joerg Roedel
On Wed, Mar 16, 2016 at 11:15:44PM -0500, Andy Fleming wrote: > The Freescale PAMU can be enabled on both 32 and 64-bit Power > chips. Commit 477ab7a19cec8409e4e2dd10e7348e4cac3c06e5 > (iommu: Make more drivers depend on COMPILE_TEST) > restricted PAMU to PPC32. PPC covers both. > >

Re: [v7, 4/5] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-04-05 Thread Joerg Roedel
; > Acked-by: Wolfram Sang <w...@the-dreams.de> Acked-by: Joerg Roedel <jroe...@suse.de> ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH -next] soc/qbman: fix implicit header dependency now causing build fails

2017-05-03 Thread Joerg Roedel
.h - so > we explicitly add it here. > > Fixes: 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h") > Cc: Joerg Roedel <jroe...@suse.de> > Cc: Scott Wood <o...@buserror.net> > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Paul G

Re: [PATCH -next] soc/qbman: fix implicit header dependency now causing build fails

2017-05-03 Thread Joerg Roedel
Hi Stephen, On Wed, May 03, 2017 at 07:15:24PM +1000, Stephen Rothwell wrote: > It looks like there is at least one more: > > drivers/soc/fsl/qbman/qman.c: In function 'qman_init_fq': > drivers/soc/fsl/qbman/qman.c:1787:4: error: implicit declaration of function > 'dma_map_single'

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Joerg Roedel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > > There is nothing arch specific about PCI or dma-debug, so move this > > call to common code just after registering the bus type. > > I assume

Re: [PATCH 0/7 v7] Support for fsl-mc bus and its devices in SMMU

2018-09-25 Thread Joerg Roedel
On Mon, Sep 10, 2018 at 07:19:14PM +0530, Nipun Gupta wrote: > Nipun Gupta (7): > Documentation: fsl-mc: add iommu-map device-tree binding for fsl-mc > bus > iommu/of: make of_pci_map_rid() available for other devices too > iommu/of: support iommu configuration for fsl-mc devices >

Re: [PATCH 1/2] iommu: Tidy up window attributes

2018-09-25 Thread Joerg Roedel
On Wed, Sep 19, 2018 at 11:12:57AM +0100, Robin Murphy wrote: > The external interface to get/set window attributes is already > abstracted behind iommu_domain_{get,set}_attr(), so there's no real > reason for the internal interface to be different. Since we only have > one window-based driver

Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode

2019-04-12 Thread Joerg Roedel
On Tue, Apr 09, 2019 at 08:53:03PM +0800, Zhen Lei wrote: > +static int __init iommu_dma_mode_setup(char *str) > +{ > + if (!str) > + goto fail; > + > + if (!strncmp(str, "passthrough", 11)) > + iommu_default_dma_mode = IOMMU_DMA_MODE_PASSTHROUGH; > + else if

Re: [PATCH v7 1/1] iommu: enhance IOMMU dma mode build options

2019-05-27 Thread Joerg Roedel
Hi Zhen Lei, On Mon, May 20, 2019 at 09:59:47PM +0800, Zhen Lei wrote: > arch/ia64/kernel/pci-dma.c| 2 +- > arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++- > arch/s390/pci/pci_dma.c | 2 +- > arch/x86/kernel/pci-dma.c | 7 ++--- >

Re: [PATCH] iommu: spapr_tce: Disable compile testing to fix build on book3s_32 config

2020-04-18 Thread Joerg Roedel
On Tue, Apr 14, 2020 at 04:26:30PM +0200, Krzysztof Kozlowski wrote: > Reported-by: Geert Uytterhoeven > Fixes: e93a1695d7fb ("iommu: Enable compile testing for some of drivers") > Signed-off-by: Krzysztof Kozlowski > --- > drivers/iommu/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-18 Thread Joerg Roedel
Hi Christoph, On Tue, Apr 14, 2020 at 02:25:05PM +0200, Christoph Hellwig wrote: > +static inline bool dma_map_direct(struct device *dev, > + const struct dma_map_ops *ops) > +{ > + if (likely(!ops)) > + return true; > + if (!dev->dma_ops_bypass) > +

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Joerg Roedel
On Sun, Apr 19, 2020 at 10:00:58AM +0200, Christoph Hellwig wrote: > The difference is that NULL ops mean imply the direct mapping is always > used, dma_ops_bypass means a direct mapping is used if no bounce buffering > using swiotlb is needed, which should also answer your first question. > The

Re: [PATCH 00/13] iommu: Remove usage of dev->archdata.iommu

2020-06-30 Thread Joerg Roedel
On Thu, Jun 25, 2020 at 03:08:23PM +0200, Joerg Roedel wrote: > Joerg Roedel (13): > iommu/exynos: Use dev_iommu_priv_get/set() > iommu/vt-d: Use dev_iommu_priv_get/set() > iommu/msm: Use dev_iommu_priv_get/set() > iommu/omap: Use dev_iommu_priv_get/set() > i

[PATCH 00/13] iommu: Remove usage of dev->archdata.iommu

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Hi, here is a patch-set to remove the usage of dev->archdata.iommu from the IOMMU code in the kernel and replace its uses by the iommu per-device private data field. The changes also remove the field entirely from the architectures which no longer need it. On Powe

[PATCH 02/13] iommu/vt-d: Use dev_iommu_priv_get/set()

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- .../gpu/drm/i915/selftests/mock_gem_device.c | 10 -- drivers/iommu/intel/iommu.c|

[PATCH 01/13] iommu/exynos: Use dev_iommu_priv_get/set()

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- drivers/iommu/exynos-iommu.c | 20 +-- .../media/platform/s5p-mfc/s5p_mfc_iommu.h|

[PATCH 04/13] iommu/omap: Use dev_iommu_priv_get/set()

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- drivers/iommu/omap-iommu.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/driv

[PATCH 05/13] iommu/rockchip: Use dev_iommu_priv_get/set()

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- drivers/iommu/rockchip-iommu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/io

[PATCH 06/13] iommu/tegra: Use dev_iommu_priv_get/set()

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- drivers/iommu/tegra-gart.c | 8 drivers/iommu/tegra-smmu.c | 8 2 files changed, 8 insertions(+), 8 deleti

[PATCH 08/13] iommu/mediatek: Do no use dev->archdata.iommu

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel The iommu private pointer is already used in the Mediatek IOMMU v1 driver, so move the dma_iommu_mapping pointer into 'struct mtk_iommu_data' and do not use dev->archdata.iommu anymore. Signed-off-by: Joerg Roedel --- drivers/iommu/mtk_iommu.h| 2 ++ drivers/io

[PATCH 10/13] ia64: Remove dev->archdata.iommu pointer

2020-06-25 Thread Joerg Roedel
From: Joerg Roedel There are no users left, all drivers have been converted to use the per-device private pointer offered by IOMMU core. Signed-off-by: Joerg Roedel --- arch/ia64/include/asm/device.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/ia64/include/asm/device.h b/arch

[PATCH] mm: Move p?d_alloc_track to separate header file

2020-06-09 Thread Joerg Roedel
From: Joerg Roedel The functions are only used in two source files, so there is no need for them to be in the global header. Move them to the new header and include it only where needed. Signed-off-by: Joerg Roedel --- include/linux/mm.h| 45

Re: [mainline][Oops][bisected 2ba3e6 ] 5.7.0 boot fails with kernel panic on powerpc

2020-06-03 Thread Joerg Roedel
hi Abdul, On Wed, Jun 03, 2020 at 04:20:57PM +0530, Abdul Haleem wrote: > Greeting's > > Today's mainline kernel panics when booting on my powerpc lpar Thanks for the report, I am looking into it with my limited powerpc knowledge. But I have an idea and will send you something to test later

Re: [mainline][Oops][bisected 2ba3e6 ] 5.7.0 boot fails with kernel panic on powerpc

2020-06-03 Thread Joerg Roedel
On Wed, Jun 03, 2020 at 04:20:57PM +0530, Abdul Haleem wrote: > @Joerg, Could you please have a look? Can you please try the attached patch? diff --git a/include/asm-generic/5level-fixup.h b/include/asm-generic/5level-fixup.h index 58046ddc08d0..afbab31fbd7e 100644 ---

[PATCH] mm: Fix pud_alloc_track()

2020-06-04 Thread Joerg Roedel
From: Joerg Roedel The pud_alloc_track() needs to do different checks based on whether __ARCH_HAS_5LEVEL_HACK is defined, like it already does in pud_alloc(). Otherwise it causes boot failures on PowerPC. Provide the correct implementations for both possible settings of __ARCH_HAS_5LEVEL_HACK

Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v3

2021-04-07 Thread Joerg Roedel
On Thu, Apr 01, 2021 at 05:52:36PM +0200, Christoph Hellwig wrote: > Diffstat: > arch/powerpc/include/asm/fsl_pamu_stash.h | 12 > drivers/gpu/drm/msm/adreno/adreno_gpu.c |5 > drivers/iommu/amd/iommu.c | 23 > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 75

Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver

2021-03-04 Thread Joerg Roedel
On Mon, Mar 01, 2021 at 09:42:40AM +0100, Christoph Hellwig wrote: > Diffstat: > arch/powerpc/include/asm/fsl_pamu_stash.h | 12 > drivers/gpu/drm/msm/adreno/adreno_gpu.c |2 > drivers/iommu/amd/iommu.c | 23 > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 85

Re: [PATCH 04/11] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-08-02 Thread Joerg Roedel
er memory > encryption technologies, the use of PATTR_HOST_MEM_ENCRYPT can be > updated, as required, to use PATTR_SME. > > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Joerg Roedel > Cc:

Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-08-02 Thread Joerg Roedel
> > Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel

Re: [PATCH 05/11] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-08-02 Thread Joerg Roedel
gt; Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel

Re: [PATCH 02/11] x86/sev: Add an x86 version of prot_guest_has()

2021-08-02 Thread Joerg Roedel
nsen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Co-developed-by: Andi Kleen > Signed-off-by: Andi Kleen > Co-developed-by: Kuppuswamy Sathyanarayanan > > Signed-off-by: Kuppuswamy Sathyanarayanan > > Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel

Re: [PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

2021-08-02 Thread Joerg Roedel
On Tue, Jul 27, 2021 at 05:26:09PM -0500, Tom Lendacky wrote: > @@ -48,7 +47,7 @@ static void sme_sev_setup_real_mode(struct > trampoline_header *th) > if (prot_guest_has(PATTR_HOST_MEM_ENCRYPT)) > th->flags |= TH_FLAGS_SME_ACTIVE; > > - if (sev_es_active()) { > + if

Re: [PATCH 09/11] x86/sev: Remove the now unused mem_encrypt_active() function

2021-08-02 Thread Joerg Roedel
On Tue, Jul 27, 2021 at 05:26:12PM -0500, Tom Lendacky wrote: > The mem_encrypt_active() function has been replaced by prot_guest_has(), > so remove the implementation. > > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel

Re: [PATCH 08/11] mm: Remove the now unused mem_encrypt_active() function

2021-08-02 Thread Joerg Roedel
On Tue, Jul 27, 2021 at 05:26:11PM -0500, Tom Lendacky wrote: > The mem_encrypt_active() function has been replaced by prot_guest_has(), > so remove the implementation. > > Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel

Re: [PATCH v2 0/9] iommu: Convert dart & iommufd to the new domain_alloc_paging()

2023-10-26 Thread Joerg Roedel
On Wed, Sep 27, 2023 at 08:47:30PM -0300, Jason Gunthorpe wrote: > Jason Gunthorpe (9): > iommu: Move IOMMU_DOMAIN_BLOCKED global statics to ops->blocked_domain > iommu/vt-d: Update the definition of the blocking domain > iommu/vt-d: Use ops->blocked_domain > iommufd: Convert to

Re: [PATCH v2 0/9] iommu: Convert dart & iommufd to the new domain_alloc_paging()

2023-10-26 Thread Joerg Roedel
On Thu, Oct 26, 2023 at 12:34:54PM +0200, Sven Peter wrote: > Acked-by: Sven Peter Thanks, the Dart patches are now also applied.

Re: [PATCH v8 00/24] iommu: Make default_domain's mandatory

2023-09-25 Thread Joerg Roedel
On Wed, Sep 13, 2023 at 10:43:33AM -0300, Jason Gunthorpe wrote: > Jason Gunthorpe (24): > iommu: Add iommu_ops->identity_domain > iommu: Add IOMMU_DOMAIN_PLATFORM > powerpc/iommu: Setup a default domain and remove set_platform_dma_ops > iommu: Add IOMMU_DOMAIN_PLATFORM for S390 >

Re: [PATCH] powerpc/iommu: Do not do platform domain attach atctions after probe

2023-10-06 Thread Joerg Roedel
On Thu, Oct 05, 2023 at 10:35:11AM -0300, Jason Gunthorpe wrote: > arch/powerpc/kernel/iommu.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Applied, thanks. -- Jörg Rödel jroe...@suse.de SUSE Software Solutions Germany GmbH Frankenstraße 146 90461 Nürnberg Germany (HRB

Re: [PATCH v2 0/3] Remove iommu_group_remove_device() from fsl

2023-05-23 Thread Joerg Roedel
On Tue, May 16, 2023 at 09:35:25PM -0300, Jason Gunthorpe wrote: > With POWER SPAPR now having a real iommu driver and using the normal group > lifecycle stuff fixing FSL will leave only VFIO's no-iommu support as a > user for the iommu_group_add/remove_device() calls. This will help > simplify

Re: [PATCH v2 0/3] Remove iommu_group_remove_device() from fsl

2023-06-01 Thread Joerg Roedel
On Wed, May 31, 2023 at 05:04:04PM +1000, Michael Ellerman wrote: > Great, yep consider it: > > Tested-by: Michael Ellerman Alright, applied them for 6.5.

Re: [PATCH v2] powerpc: iommu: Bring back table group release_ownership() call

2024-02-02 Thread Joerg Roedel
On Fri, Jan 26, 2024 at 09:09:18AM -0600, Shivaprasad G Bhat wrote: > The commit 2ad56efa80db ("powerpc/iommu: Setup a default domain and > remove set_platform_dma_ops") refactored the code removing the > set_platform_dma_ops(). It missed out the table group > release_ownership() call which would