[PATCH 13/18] iommu: remove DOMAIN_ATTR_GEOMETRY

2021-03-16 Thread Christoph Hellwig
The geometry information can be trivially queried from the iommu_domain struture. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/iommu.c | 20 +++- drivers/vfio/vfio_iommu_type1.c | 26 -- drivers/vhost/vdpa.c

[PATCH 12/18] iommu: remove DOMAIN_ATTR_PAGING

2021-03-16 Thread Christoph Hellwig
DOMAIN_ATTR_PAGING is never used. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/iommu.c | 5 - include/linux/iommu.h | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b212bf0261820b..9a4cda390993e6 100644

[PATCH 11/18] iommu/fsl_pamu: remove the snoop_id field

2021-03-16 Thread Christoph Hellwig
The snoop_id is always set to ~(u32)0. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 5 ++--- drivers/iommu/fsl_pamu_domain.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu

[PATCH 10/18] iommu/fsl_pamu: enable the liodn when attaching a device

2021-03-16 Thread Christoph Hellwig
Instead of a separate call to enable all devices from the list, just enablde the liodn one the device is attached to the iommu domain. This also remove the DOMAIN_ATTR_FSL_PAMU_ENABLE iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 47

[PATCH 09/18] iommu/fsl_pamu: merge handle_attach_device into fsl_pamu_attach_device

2021-03-16 Thread Christoph Hellwig
No good reason to split this functionality over two functions. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 59 +++-- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b

[PATCH 08/18] iommu/fsl_pamu: merge pamu_set_liodn and map_liodn

2021-03-16 Thread Christoph Hellwig
Merge the two fuctions that configure the ppaace into a single coherent function. I somehow doubt we need the two pamu_config_ppaace calls, but keep the existing behavior just to be on the safe side. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 65

[PATCH 07/18] iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call

2021-03-16 Thread Christoph Hellwig
Add a fsl_pamu_configure_l1_stash API that qman_portal can call directly instead of indirecting through the iommu attr API. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- arch/powerpc/include/asm/fsl_pamu_stash.h | 12 +++- drivers/iommu/fsl_pamu_domain.c | 16

[PATCH 06/18] iommu/fsl_pamu: remove ->domain_window_enable

2021-03-16 Thread Christoph Hellwig
use the iommu_domain_geometry structure instead. Remove the now unused ->domain_window_enable iommu method. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 182 +++- drivers/iommu/fsl_pamu_domain.h | 17 --- drivers/io

[PATCH 05/18] iommu/fsl_pamu: remove support for multiple windows

2021-03-16 Thread Christoph Hellwig
The only domains allocated forces use of a single window. Remove all the code related to multiple window support, as well as the need for qman_portal to force a single window. Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers

[PATCH 04/18] iommu/fsl_pamu: merge iommu_alloc_dma_domain into fsl_pamu_domain_alloc

2021-03-16 Thread Christoph Hellwig
Keep the functionality to allocate the domain together. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 34 ++--- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu

[PATCH 03/18] iommu/fsl_pamu: remove support for setting DOMAIN_ATTR_GEOMETRY

2021-03-16 Thread Christoph Hellwig
The default geometry is the same as the one set by qman_port given that FSL_PAMU depends on having 64-bit physical and thus DMA addresses. Remove the support to update the geometry and remove the now pointless geom_size field. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers

[PATCH 02/18] iommu/fsl_pamu: remove fsl_pamu_get_domain_attr

2021-03-16 Thread Christoph Hellwig
None of the values returned by this function are ever queried. Also remove the DOMAIN_ATTR_FSL_PAMUV1 enum value that is not otherwise used. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 30 -- include/linux/iommu.h

[PATCH 01/18] iommu: remove the unused domain_window_disable method

2021-03-16 Thread Christoph Hellwig
domain_window_disable is wired up by fsl_pamu, but never actually called. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 48 - include/linux/iommu.h | 2 -- 2 files changed, 50 deletions(-) diff --git

cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v2

2021-03-16 Thread Christoph Hellwig
Hi all, there are a bunch of IOMMU APIs that are entirely unused, or only used as a private communication channel between the FSL PAMU driver and it's only consumer, the qbman portal driver. So this series drops a huge chunk of entirely unused FSL PAMU functionality, then drops all kinds of

Re: [PATCH v5 01/11] file: Export __receive_fd() to modules

2021-03-15 Thread Christoph Hellwig
On Mon, Mar 15, 2021 at 01:37:11PM +0800, Xie Yongji wrote: > Export __receive_fd() so that some modules can use > it to pass file descriptor between processes. I really don't think any non-core code should do that, especilly not modular mere driver code.

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-15 Thread Christoph Hellwig
On Fri, Mar 12, 2021 at 04:18:24PM +, Robin Murphy wrote: >> Let me know what you think of the version here: >> >> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup >> >> I'll happily switch the patch to you as the author if you're fine with >> that as well. > > I

Re: [PATCH 15/17] iommu: remove DOMAIN_ATTR_NESTING

2021-03-14 Thread Christoph Hellwig
On Sun, Mar 14, 2021 at 11:44:52AM +0100, Auger Eric wrote: > As mentionned by Robin, there are series planning to use > DOMAIN_ATTR_NESTING to get info about the nested caps of the iommu (ARM > and Intel): > > [Patch v8 00/10] vfio: expose virtual Shared Virtual Addressing to VMs > patches 1, 2,

Re: [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system

2021-03-11 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 04:29:51PM +, Al Viro wrote: > On Tue, Mar 09, 2021 at 04:53:42PM +0100, Christoph Hellwig wrote: > > Just use the generic anon_inode file system. > > Umm... The only problem I see here is the lifetime rules for > that module, and that's not so

Re: [PATCH 4/9] drm: remove the drm file system

2021-03-11 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 04:32:34PM +, Al Viro wrote: > On Tue, Mar 09, 2021 at 04:53:43PM +0100, Christoph Hellwig wrote: > > Just use the generic anon_inode file system. > > Are you changing the lifetime rules for that module? The core drm module is pinned by the actual d

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-11 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 06:39:57PM +, Robin Murphy wrote: >> Actually... Just mirroring the iommu_dma_strict value into >> struct iommu_domain should solve all of that with very little >> boilerplate code. > > Yes, my initial thought was to directly replace the attribute with a > common flag

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 10:15:01AM +0100, Christoph Hellwig wrote: > On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > > On 2021-03-01 08:42, Christoph Hellwig wrote: > >> Use explicit methods for setting and querying the information instead. > > > > N

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > On 2021-03-01 08:42, Christoph Hellwig wrote: >> Use explicit methods for setting and querying the information instead. > > Now that everyone's using iommu-dma, is there any point in bouncing this > through the dri

Re: [Freedreno] [PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-10 Thread Christoph Hellwig
On Fri, Mar 05, 2021 at 10:00:12AM +, Will Deacon wrote: > > But one thing I'm not sure about is whether > > IO_PGTABLE_QUIRK_ARM_OUTER_WBWA is something that other devices > > *should* be using as well, but just haven't gotten around to yet. > > The intention is certainly that this would be

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > On 2021-03-01 08:42, Christoph Hellwig wrote: >> Use explicit methods for setting and querying the information instead. > > Now that everyone's using iommu-dma, is there any point in bouncing this > through the dri

Re: make alloc_anon_inode more useful

2021-03-10 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 04:05:45AM +, Matthew Wilcox wrote: > On Tue, Mar 09, 2021 at 04:53:39PM +0100, Christoph Hellwig wrote: > > this series first renames the existing alloc_anon_inode to > > alloc_anon_inode_sb to clearly mark it as requiring a superblock. > > &

Re: make alloc_anon_inode more useful

2021-03-10 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 12:54:52PM -0400, Jason Gunthorpe wrote: > On Tue, Mar 09, 2021 at 04:53:39PM +0100, Christoph Hellwig wrote: > > Hi all, > > > > this series first renames the existing alloc_anon_inode to > > alloc_anon_inode_sb to clearly mark i

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-10 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 10:39:05PM -0800, Minchan Kim wrote: > > -struct inode *alloc_anon_inode(struct super_block *s) > > +struct inode *alloc_anon_inode_sb(struct super_block *s) > > { > > static const struct address_space_operations anon_aops = { > > .set_page_dirty =

[PATCH 8/9] z3fold: remove the z3fold file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- mm/z3fold.c | 38 ++ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index e7cd9298b221f5..e0749a3d8987de 100644 --- a/mm/z3fold.c +++ b

[PATCH 9/9] zsmalloc: remove the zsmalloc file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- mm/zsmalloc.c | 48 +++- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a6449a2ad861de..a7d2f471935447 100644

[PATCH 7/9] iomem: remove the iomem file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- kernel/resource.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 0fd091a3f2fc66..12560553c26796 100644 --- a/kernel

[PATCH 6/9] virtio_balloon: remove the balloon-kvm file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- drivers/virtio/virtio_balloon.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index

[PATCH 5/9] vmw_balloon: remove the balloon-vmware file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- drivers/misc/vmw_balloon.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 5d057a05ddbee8..be4be32f858253

[PATCH 4/9] drm: remove the drm file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/drm_drv.c | 64 ++- 1 file changed, 3 insertions(+), 61 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 87e7214a8e3565

[PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system

2021-03-09 Thread Christoph Hellwig
Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- arch/powerpc/platforms/pseries/cmm.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c

[PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-09 Thread Christoph Hellwig
Rename alloc_inode to free the name for a new variant that does not need boilerplate to create a super_block first. Signed-off-by: Christoph Hellwig --- arch/powerpc/platforms/pseries/cmm.c | 2 +- drivers/dma-buf/dma-buf.c| 2 +- drivers/gpu/drm/drm_drv.c| 2 +- drivers

[PATCH 2/9] fs: add an argument-less alloc_anon_inode

2021-03-09 Thread Christoph Hellwig
Add a new alloc_anon_inode helper that allocates an inode on the anon_inode file system. Signed-off-by: Christoph Hellwig --- fs/anon_inodes.c| 15 +-- include/linux/anon_inodes.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/fs/anon_inodes.c b

make alloc_anon_inode more useful

2021-03-09 Thread Christoph Hellwig
Hi all, this series first renames the existing alloc_anon_inode to alloc_anon_inode_sb to clearly mark it as requiring a superblock. It then adds a new alloc_anon_inode that works on the anon_inode file system super block, thus removing tons of boilerplate code. The few remainig callers of

[PATCH 17/17] iommu: remove iommu_domain_set_attr

2021-03-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 17 - include/linux/iommu.h | 27 --- 2 files changed, 44 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 8490aefd4b41f8..b04e6cefe8520d 100644 --- a/drivers/iommu

[PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 40 +++-- drivers/iommu/iommu.c | 9 ++ include/linux/iommu.h | 9 +- 4 files changed, 29 insertions

[PATCH 15/17] iommu: remove DOMAIN_ATTR_NESTING

2021-03-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 40 ++--- drivers/iommu/arm/arm-smmu/arm-smmu.c | 30 ++-- drivers/iommu/intel/iommu.c | 28 +-- drivers/iommu/iommu.c | 8

[PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-01 Thread Christoph Hellwig
Use explicit methods for setting and querying the information instead. Also remove the now unused iommu_domain_get_attr functionality. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd/iommu.c | 23 ++--- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 47

[PATCH 13/17] iommu: remove DOMAIN_ATTR_GEOMETRY

2021-03-01 Thread Christoph Hellwig
The geometry information can be trivially queried from the iommu_domain struture. Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 20 +++- drivers/soc/fsl/qbman/qman_portal.c | 1 + drivers/vfio/vfio_iommu_type1.c | 26

[PATCH 12/17] iommu: remove DOMAIN_ATTR_PAGING

2021-03-01 Thread Christoph Hellwig
DOMAIN_ATTR_PAGING is never used. Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 5 - include/linux/iommu.h | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b212bf0261820b..9a4cda390993e6 100644 --- a/drivers/iommu

[PATCH 11/17] iommu/fsl_pamu: remove the snoop_id field

2021-03-01 Thread Christoph Hellwig
The snoop_id is always set to ~(u32)0. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 5 ++--- drivers/iommu/fsl_pamu_domain.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index

[PATCH 10/17] iommu/fsl_pamu: enable the liodn when attaching a device

2021-03-01 Thread Christoph Hellwig
Instead of a separate call to enable all devices from the list, just enablde the liodn one the device is attached to the iommu domain. This also remove the DOMAIN_ATTR_FSL_PAMU_ENABLE iommu_attr. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 47

[PATCH 09/17] iommu/fsl_pamu: merge handle_attach_device into fsl_pamu_attach_device

2021-03-01 Thread Christoph Hellwig
No good reason to split this functionality over two functions. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 59 +++-- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu

[PATCH 08/17] iommu/fsl_pamu: merge pamu_set_liodn and map_liodn

2021-03-01 Thread Christoph Hellwig
Merge the two fuctions that configure the ppaace into a single coherent function. I somehow doubt we need the two pamu_config_ppaace calls, but keep the existing behavior just to be on the safe side. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 65

[PATCH 07/17] iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call

2021-03-01 Thread Christoph Hellwig
Add a fsl_pamu_configure_l1_stash API that qman_portal can call directly instead of indirecting through the iommu attr API. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/fsl_pamu_stash.h | 12 +++- drivers/iommu/fsl_pamu_domain.c | 16 +++- drivers

[PATCH 06/17] iommu/fsl_pamu: remove ->domain_window_enable

2021-03-01 Thread Christoph Hellwig
use the iommu_domain_geometry structure instead. Remove the now unused ->domain_window_enable iommu method. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 182 +++- drivers/iommu/fsl_pamu_domain.h | 17 --- drivers/iommu/iomm

[PATCH 05/17] iommu/fsl_pamu: remove support for multiple windows

2021-03-01 Thread Christoph Hellwig
The only domains allocated forces use of a single window. Remove all the code related to multiple window support, as well as the need for qman_portal to force a single window. Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu.c

[PATCH 04/17] iommu/fsl_pamu: merge iommu_alloc_dma_domain into fsl_pamu_domain_alloc

2021-03-01 Thread Christoph Hellwig
Keep the functionality to allocate the domain together. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 34 ++--- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c

[PATCH 03/17] iommu/fsl_pamu: remove support for setting DOMAIN_ATTR_GEOMETRY

2021-03-01 Thread Christoph Hellwig
The default geometry is the same as the one set by qman_port given that FSL_PAMU depends on having 64-bit physical and thus DMA addresses. Remove the support to update the geometry and remove the now pointless geom_size field. Signed-off-by: Christoph Hellwig --- drivers/iommu

[PATCH 02/17] iommu/fsl_pamu: remove fsl_pamu_get_domain_attr

2021-03-01 Thread Christoph Hellwig
None of the values returned by this function are ever queried. Also remove the DOMAIN_ATTR_FSL_PAMUV1 enum value that is not otherwise used. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 30 -- include/linux/iommu.h | 4 2

[PATCH 01/17] iommu: remove the unused domain_window_disable method

2021-03-01 Thread Christoph Hellwig
domain_window_disable is wired up by fsl_pamu, but never actually called. Signed-off-by: Christoph Hellwig --- drivers/iommu/fsl_pamu_domain.c | 48 - include/linux/iommu.h | 2 -- 2 files changed, 50 deletions(-) diff --git a/drivers/iommu

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

2021-03-01 Thread Christoph Hellwig
Hi all, there are a bunch of IOMMU APIs that are entirely unused, or only used as a private communication channel between the FSL PAMU driver and it's only consumer, the qbman portal driver. So this series drops a huge chunk of entirely unused FSL PAMU functionality, then drops all kinds of

Re: [RFC PATCH] blk-core: remove blk_put_request()

2021-02-24 Thread Christoph Hellwig
On Wed, Feb 24, 2021 at 09:48:21AM -0700, Jens Axboe wrote: > Would make sense to rename blk_get_request() to blk_mq_alloc_request() > and then we have API symmetry. The get/put don't make sense when there > are no references involved. > > But it's a lot of churn for very little reward, which is

Re: [PATCH] virtio: don't prompt CONFIG_VIRTIO_PCI_MODERN

2021-02-19 Thread Christoph Hellwig
On Fri, Feb 19, 2021 at 03:45:09AM -0500, Jason Wang wrote: > We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a > lot of confusion. E.g it may break various default configs which want > virtio devices. > > So this patch fixes this by hide the prompot and document the >

Re: [PATCH v5 4/8] x86/mm/tlb: Flush remote and local TLBs concurrently

2021-02-18 Thread Christoph Hellwig
Given that the last patch killed the last previously existing user of on_each_cpu_cond_mask there are now the only users. > if (info->freed_tables) { > - smp_call_function_many(cpumask, flush_tlb_func, > -(void *)info, 1); > +

Re: [PATCH 12/13] target, vhost-scsi: don't switch cpus on completion

2021-02-10 Thread Christoph Hellwig
> struct se_device *se_dev = se_cmd->se_dev; > - int cpu = se_cmd->cpuid; > + int cpu; > + > + if (se_cmd->se_cmd_flags & SCF_IGNORE_CPUID_COMPL) > + cpu = smp_processor_id(); > + else > + cpu = se_cmd->cpuid; > >

Re: [PATCH 11/13] target: replace work per cmd in completion path

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 06:38:43AM -0600, Mike Christie wrote: > Doing a work per cmd can lead to lots of threads being created. > This patch just replaces the completion work per cmd with a per cpu > list. Combined with the first patches this allows tcm loop on top of > initiators like iser to go

Re: [PATCH 07/13] target: cleanup cmd flag bits

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 06:38:39AM -0600, Mike Christie wrote: > We have a couple holes in the cmd flags definitions. This cleans > up the definitions to fix that and make it easier to read. > > Signed-off-by: Mike Christie > Reviewed-by: Chaitanya Kulkarni Looks good, Reviewe

Re: [PATCH 05/13] tcm loop: use blk cmd allocator for se_cmds

2021-02-10 Thread Christoph Hellwig
ly > kill the tcm_loop_cmd_cache. > > Signed-off-by: Mike Christie Looks good, Reviewed-by: Christoph Hellwig ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 02/13] target: split target_submit_cmd_map_sgls

2021-02-10 Thread Christoph Hellwig
Can you just kill off target_submit_cmd_map_sgls entirely and just open code the two calls in the three callers? ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 01/13] target: move t_task_cdb initialization

2021-02-10 Thread Christoph Hellwig
tracing code. This moves it to transport_init_se_cmd so we don't > hit NULL pointer crashes. > > Signed-off-by: Mike Christie Looks good, Reviewed-by: Christoph Hellwig ___ Virtualization mailing list Virtualization@lists.linux

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-09 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 12:14:49PM -0500, Konrad Rzeszutek Wilk wrote: > > ring buffer or whatever because you know I/O will be copied anyway > > and none of all the hard work higher layers do to make the I/O suitable > > for a normal device apply. > > I lost you here. Sorry, are you saying have

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-05 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 02:36:38PM -0500, Konrad Rzeszutek Wilk wrote: > > So what? If you guys want to provide a new capability you'll have to do > > work. And designing a new protocol based around the fact that the > > hardware/hypervisor is not trusted and a copy is always required makes > >

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-03 Thread Christoph Hellwig
On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote: > Your comment makes sense but then that would require the cooperation > of these vendors and the cloud providers to agree on something meaningful. > I am also not sure whether the end result would be better than hardening > this

Re: [PATCH 2/2] block: remove unnecessary argument from blk_execute_rq

2021-01-21 Thread Christoph Hellwig
On Thu, Jan 21, 2021 at 03:29:05PM +0100, Guoqing Jiang wrote: > We can remove 'q' from blk_execute_rq as well after the previous change > in blk_execute_rq_nowait. Same trivial nits as for the other one. Otherwise this looks good to me. ___

Re: [PATCH 1/2] block: remove unnecessary argument from blk_execute_rq_nowait

2021-01-21 Thread Christoph Hellwig
On Thu, Jan 21, 2021 at 03:29:04PM +0100, Guoqing Jiang wrote: > The 'q' is not used since commit a1ce35fa4985 ("block: remove dead > elevator code"), also update the comment of the function. And more importantly it never really was needed to start with given that we can triviall derive it from

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-01-13 Thread Christoph Hellwig
On Tue, Jan 12, 2021 at 04:07:29PM +0100, Martin Radev wrote: > The size of the buffer being bounced is not checked if it happens > to be larger than the size of the mapped buffer. Because the size > can be controlled by a device, as it's the case with virtio devices, > this can lead to memory

Re: [RFC v2 01/13] mm: export zap_page_range() for driver use

2020-12-23 Thread Christoph Hellwig
On Wed, Dec 23, 2020 at 02:32:07PM +0800, Yongji Xie wrote: > Now I want to map/unmap some pages in an userland vma dynamically. The > vm_insert_page() is being used for mapping. In the unmapping case, it > looks like the zap_page_range() does what I want. So I export it. > Otherwise, we need some

Re: [RFC v2 01/13] mm: export zap_page_range() for driver use

2020-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2020 at 10:52:09PM +0800, Xie Yongji wrote: > Export zap_page_range() for use in VDUSE. Err, no. This has absolutely no business being used by drivers. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-17 Thread Christoph Hellwig
On Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote: > The dma_declare_coherent_memory allows to associate vdev0buffer memory region > to the remoteproc virtio device (vdev parent). This region is used to > allocated > the rpmsg buffers. > The memory for the rpmsg buffer is allocated

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
Btw, I also still don't understand why remoteproc is using dma_declare_coherent_memory to start with. The virtio code has exactly one call to dma_alloc_coherent vring_alloc_queue, a function that already switches between two different allocators. Why can't we just add a third allocator

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 01:07:28PM +, Alexander Lobakin wrote: > But lots of subsystems like netdev for example uses dev->parent for > DMA operations. I know that their pointers go directly to the > platform/PCI/etc. device, but still. Oh, every drivers is perfectly fine to use ->parent as it

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 11:46:59AM +0100, Arnaud POULIQUEN wrote: > Hi all, > > On 11/16/20 10:19 AM, Christoph Hellwig wrote: > > I just noticed this showing up in Linus' tree and I'm not happy. > > > > This whole model of the DMA subdevices in remoteproc is simply

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 04:51:49AM -0500, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2020 at 09:19:50AM +0000, Christoph Hellwig wrote: > > I just noticed this showing up in Linus' tree and I'm not happy. > > > > This whole model of the DMA subdevices in remoteproc is simpl

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
I just noticed this showing up in Linus' tree and I'm not happy. This whole model of the DMA subdevices in remoteproc is simply broken. We really need to change the virtio code pass an expicit DMA device ( similar to what e.g. the USB and RDMA code does), instead of faking up devices with broken

[PATCH 8/9] nvdimm: simplify revalidate_disk handling

2020-09-01 Thread Christoph Hellwig
, and remove the revalidate_disk methods given that it can only be triggered from add_disk, which is right before the manual calls. Signed-off-by: Christoph Hellwig --- drivers/nvdimm/blk.c | 3 +-- drivers/nvdimm/btt.c | 3 +-- drivers/nvdimm/bus.c | 9 +++-- drivers/nvdimm/nd.h | 2 +- drivers

[PATCH 9/9] block: remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Remove the now unused helper. Signed-off-by: Christoph Hellwig --- drivers/md/md.h | 2 +- fs/block_dev.c| 19 --- include/linux/genhd.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/md/md.h b/drivers/md/md.h index d9c4e6b7e9398d

[PATCH 6/9] nvme: opencode revalidate_disk in nvme_validate_ns

2020-09-01 Thread Christoph Hellwig
called from the open code when first opening the device. Which is of course totally pointless as we have a valid size since the initial scan, and will get an updated view through the asynchronous notifiation everytime the size changes. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.

[PATCH 5/9] block: use revalidate_disk_size in set_capacity_revalidate_and_notify

2020-09-01 Thread Christoph Hellwig
Only virtio_blk and xen-blkfront set the revalidate argument to true, and both do not implement the ->revalidate_disk method. So switch to the helper that just updates the size instead. Signed-off-by: Christoph Hellwig --- block/genhd.c | 7 +++ include/linux/genhd.h | 4 ++--

[PATCH 2/9] block: don't clear bd_invalidated in check_disk_size_change

2020-09-01 Thread Christoph Hellwig
with the bd_invalidated event. revalidate_disk() on the other hand is mostly used to propagate a size update from the gendisk to the block device, which is entirely unrelated. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs

remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Hi Jens, this series removes the revalidate_disk() function, which has been a really odd duck in the last years. The prime reason why most people use it is because it propagates a size change from the gendisk to the block_device structure. But it also calls into the rather ill defined

[PATCH 3/9] block: rename bd_invalidated

2020-09-01 Thread Christoph Hellwig
Replace bd_invalidate with a new BDEV_NEED_PART_SCAN flag in a bd_flags variable to better describe the condition. Signed-off-by: Christoph Hellwig --- block/genhd.c | 2 +- drivers/block/nbd.c | 8 fs/block_dev.c| 10 +- include/linux

[PATCH 1/9] Documentation/filesystems/locking.rst: remove an incorrect sentence

2020-09-01 Thread Christoph Hellwig
unlock_native_capacity is never called from check_disk_change(), and while revalidate_disk can be called from it, it can also be called from two other places at the moment. Signed-off-by: Christoph Hellwig --- Documentation/filesystems/locking.rst | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH 4/9] block: add a new revalidate_disk_size helper

2020-09-01 Thread Christoph Hellwig
helper that just performs the update of the block device size from the gendisk one, and switch all drivers that do not implement ->revalidate_disk to use the new helper instead of revalidate_disk() Signed-off-by: Christoph Hellwig --- drivers/block/rbd.c | 2 +- drivers/block/rnbd/r

[PATCH 7/9] sd: open code revalidate_disk

2020-09-01 Thread Christoph Hellwig
Instead of calling revalidate_disk just do the work directly by calling sd_revalidate_disk, and revalidate_disk_size where needed. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi

Re: Is: virtio_gpu_object_shmem_init issues? Was:Re: upstream boot error: general protection fault in swiotlb_map

2020-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2020 at 11:06:51AM -0400, Konrad Rzeszutek Wilk wrote: > So it fails at > > 683 dev_WARN_ONCE(dev, 1, > > 684 "swiotlb addr %pad+%zu overflow (mask %llx, bus > limit %llx).\n", > 685

Re: [PATCH v9 01/84] signal: export kill_pid_info()

2020-07-22 Thread Christoph Hellwig
On Wed, Jul 22, 2020 at 12:07:59AM +0300, Adalbert Laz??r wrote: > From: Mathieu Tarral > > This function is used by VM introspection code to ungracefully shutdown > a guest at the request of the introspection tool. > > A security application will use this as the last resort to stop the >

Re: [PATCH 02/10] block: virtio-blk: check logical block size

2020-07-21 Thread Christoph Hellwig
On Tue, Jul 21, 2020 at 01:52:31PM +0300, Maxim Levitsky wrote: > Linux kernel only supports logical block sizes which are power of two, > at least 512 bytes and no more that PAGE_SIZE. > > Check this instead of crashing later on. > > Note that there is no need to check physical block size since

Re: [PATCH 01/10] block: introduce blk_is_valid_logical_block_size

2020-07-21 Thread Christoph Hellwig
> +/** > + * blk_check_logical_block_size - check if logical block size is supported > + * by the kernel > + * @size: the logical block size, in bytes > + * > + * Description: > + * This function checks if the block layers supports given block size > + **/ > +bool

Re: [PATCH V6 4/5] iommu/dma-iommu: Use the dev->coherent_dma_mask

2020-07-10 Thread Christoph Hellwig
Btw, what is the current state of converting intel-iommu to the dma-iommu code? ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-07-01 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:46:09PM -0700, Stefano Stabellini wrote: > > I could imagine some future Xen hosts setting a flag somewhere in the > > platform capability saying "no xen specific flag, rely on > > "VIRTIO_F_ACCESS_PLATFORM". Then you set that accordingly in QEMU. > > How about that? >

Re: [PATCH 0/8] Convert the intel iommu driver to the dma-iommu api

2020-05-29 Thread Christoph Hellwig
On Thu, May 28, 2020 at 06:00:44PM -0600, Logan Gunthorpe wrote: > > This issue is most likely in the i915 driver and is most likely caused by > > the driver not respecting the return value of the dma_map_ops::map_sg > > function. You can see the driver ignoring the return value here: > >

Re: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-23 Thread Christoph Hellwig
On Thu, Apr 23, 2020 at 01:37:17PM +0100, Stefan Hajnoczi wrote: > A virtio_blk block device can still be referenced after hot unplug by > userspace processes that hold the file descriptor. In this case > virtblk_getgeo() can be invoked after virtblk_remove() was called. For > example, a program

Re: [PATCH 0/1] KVM support for VMD devices

2020-04-23 Thread Christoph Hellwig
On Wed, Apr 22, 2020 at 01:14:44PM -0400, Jon Derrick wrote: > The two patches (Linux & QEMU) add support for passthrough VMD devices > in QEMU/KVM. VMD device 28C0 already supports passthrough natively by > providing the Host Physical Address in a shadow register to the guest > for correct bridge

Re: [PATCH v3] vhost: disable for OABI

2020-04-20 Thread Christoph Hellwig
On Thu, Apr 16, 2020 at 06:20:20PM -0400, Michael S. Tsirkin wrote: > vhost is currently broken on the some ARM configs. > > The reason is that that uses apcs-gnu which is the ancient OABI that is been > deprecated for a long time. > > Given that virtio support on such ancient systems is not

Re: improve use_mm / unuse_mm v2

2020-04-17 Thread Christoph Hellwig
On Thu, Apr 16, 2020 at 08:17:44PM -0700, Matthew Wilcox wrote: > On Thu, Apr 16, 2020 at 07:31:55AM +0200, Christoph Hellwig wrote: > > this series improves the use_mm / unuse_mm interface by better > > documenting the assumptions, and my taking the set_fs manipulations

[PATCH 1/3] kernel: move use_mm/unuse_mm to kthread.c

2020-04-15 Thread Christoph Hellwig
These helpers are only for use with kernel threads, and I will tie them more into the kthread infrastructure going forward. Also move the prototypes to kthread.h - mmu_context.h was a little weird to start with as it otherwise contains very low-level MM bits. Signed-off-by: Christoph Hellwig

<    1   2   3   4   5   6   7   8   9   10   >