Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Lu Baolu
Hi Alex, On 11/11/21 8:32 AM, Alex Williamson wrote: When supporting only the .map and .unmap callbacks of iommu_ops, the IOMMU driver can make assumptions about the size and alignment used for mappings based on the driver provided pgsize_bitmap. VT-d previously used essentially PAGE_MASK for

Re: [PATCH v2] memory: mtk-smi: Fix a null dereference for the ostd

2021-11-11 Thread Yong Wu
Hi AngeloGioacchino, Thanks very much for your help review. On Thu, 2021-11-11 at 14:41 +0100, AngeloGioacchino Del Regno wrote: > Il 08/11/21 09:24, Yong Wu ha scritto: > > We add the ostd setting for mt8195. It introduces a KE for the > > previous SoC which doesn't have ostd setting. This is

Re: [PATCH v2] memory: mtk-smi: Fix a null dereference for the ostd

2021-11-11 Thread AngeloGioacchino Del Regno
Il 08/11/21 09:24, Yong Wu ha scritto: We add the ostd setting for mt8195. It introduces a KE for the previous SoC which doesn't have ostd setting. This is the log: Unable to handle kernel NULL pointer dereference at virtual address 0080 ... pc :

RE: [RFC 02/20] vfio: Add device class for /dev/vfio/devices

2021-11-11 Thread Liu, Yi L
Hi Jason, > From: Jason Gunthorpe > Sent: Wednesday, November 3, 2021 9:26 PM > > On Tue, Nov 02, 2021 at 09:53:29AM +, Liu, Yi L wrote: > > > > vfio_uninit_group_dev(_state->vdev); > > > kfree(mdev_state->pages); > > > kfree(mdev_state->vconfig); > > > kfree(mdev_state); > > > > >

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Giovanni Cabiddu
I was able to hit the issue that this patch is fixing using the memory allocator in QATlib (https://github.com/intel/qatlib/) which uses vfio to map and unmap memory. This patch fixes the problem. On Wed, Nov 10, 2021 at 05:32:50PM -0700, Alex Williamson wrote: > When supporting only the .map

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Ajay Garg
Thanks Alex, Baolu. The patch fixes things at my end. No kernel-flooding is seen now (tested starting/stopping vm > 10 times). Thanks and Regards, Ajay On Thu, Nov 11, 2021 at 6:03 AM Alex Williamson wrote: > > When supporting only the .map and .unmap callbacks of iommu_ops, > the IOMMU driver