Message ID | 1572454800-17976-1-git-send-email-arbab@linux.ibm.com (mailing list archive) |
---|---|
Headers | show |
Series | powerpv/powernv: Restore pnv_npu_try_dma_set_bypass() | expand |
On Wed, Oct 30, 2019 at 11:59:49AM -0500, Reza Arbab wrote: > With recent kernels, TCE tables for NPU devices are no longer being > configured. That task was performed by pnv_npu_try_dma_set_bypass(), a > function that got swept away in recent overhauling of dma code. > > Patches 1-4 here bring the lost function back and reintegrate it with > the updated generic iommu bypass infrastructure. > > Patch 5 fixes a regression in behavior when a requested dma mask can not > be fulfilled. > > Patches 6-8 are cleanup. I put these later in the set because they > aren't bisectable until after the restored code is wired back in. > > Patches 9-11 refactor pnv_pci_ioda_iommu_bypass_supported(). It seems > wrong for a boolean *_supported() function to have side effects. They > reintroduce a pci controller based dma_set_mask() hook. If that's > undesirable, these last three patches can be dropped. How do you even use this code? Nothing in the kernel even calls dma_set_mask for NPU devices, as we only suport vfio pass through.
On Wed, Oct 30, 2019 at 06:53:41PM +0100, Christoph Hellwig wrote: >How do you even use this code? Nothing in the kernel even calls >dma_set_mask for NPU devices, as we only suport vfio pass through. You use it by calling dma_set_mask() for the *GPU* device. The purpose of pnv_npu_try_dma_set_bypass() is to then propagate the same bypass configuration to all the NPU devices associated with that GPU.
On Wed, Oct 30, 2019 at 01:08:51PM -0500, Reza Arbab wrote: > On Wed, Oct 30, 2019 at 06:53:41PM +0100, Christoph Hellwig wrote: >> How do you even use this code? Nothing in the kernel even calls >> dma_set_mask for NPU devices, as we only suport vfio pass through. > > You use it by calling dma_set_mask() for the *GPU* device. The purpose of > pnv_npu_try_dma_set_bypass() is to then propagate the same bypass > configuration to all the NPU devices associated with that GPU. Which in-kernel driver, which PCI ID?
On Wed, Oct 30, 2019 at 07:13:59PM +0100, Christoph Hellwig wrote: >On Wed, Oct 30, 2019 at 01:08:51PM -0500, Reza Arbab wrote: >> On Wed, Oct 30, 2019 at 06:53:41PM +0100, Christoph Hellwig wrote: >>> How do you even use this code? Nothing in the kernel even calls >>> dma_set_mask for NPU devices, as we only suport vfio pass through. >> >> You use it by calling dma_set_mask() for the *GPU* device. The purpose of >> pnv_npu_try_dma_set_bypass() is to then propagate the same bypass >> configuration to all the NPU devices associated with that GPU. > >Which in-kernel driver, which PCI ID? Aha, it's this again. Didn't catch your meaning at first. Point taken.
On Wed, Oct 30, 2019 at 01:32:01PM -0500, Reza Arbab wrote:
> Aha, it's this again. Didn't catch your meaning at first. Point taken.
It's not _me_. It that you (plural) keep ignoring how Linux development
works.