Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310308

Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management driver

From Marc Zyngier <marc.zyngier@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management driver
Date 2016-01-15 18:40 +0100
Message-ID <qRgvW-RW-33@gated-at.bofh.it> (permalink)
References (1 earlier) <qPLXd-3He-55@gated-at.bofh.it> <qReaK-7SU-23@gated-at.bofh.it> <qRekq-7Xi-25@gated-at.bofh.it> <qReu6-80G-19@gated-at.bofh.it> <qRgcy-Lu-5@gated-at.bofh.it>
Organization ARM Ltd

Show all headers | View raw


On 15/01/16 17:16, Sinan Kaya wrote:
>>>> This doesn't seem to tie into KVM or VFIO, and as far as I can tell
>>>> there's no mechanism for associating channels with a particular virtual
>>>> address space (i.e. no configuration of an external or internal IOMMU),
>>>> nor pinning of guest pages to allow for DMA to occur safely.
>>>
>>> I'm using VFIO platform driver for this purpose. VFIO platform driver is 
>>> capable of assigning any platform device to a guest machine with this driver. 
>>
>> Typically VFIO-platform also comes with a corresponding reset driver.
>> You don't need one?
> 
> The HIDMA channel driver resets the channel before using it. That's why, I never
> bothered with writing a reset driver on the hypervisor.
> 
>>
>>> You just unbind the HIDMA channel driver from the hypervisor and bind to vfio
>>> driver using the very same approach you'd use with PCIe. 
>>>
>>> Of course, this all assumes the presence of an IOMMU driver on the system. VFIO
>>> driver uses the IOMMU driver to create the mappings. 
>>
>> No IOMMU was described in the DT binding. It sounds like you'd need an
>> optional (not present in the guest) iommus property per-channel
> 
> You are right. I missed that part. I'll update the device-tree binding documentation.
> 
>>
>>> The mechanism used here is not different from VFIO PCI from user perspective.
>>>
>>>>
>>>> Given that, I'm at a loss as to how this would be used in a hypervisor
>>>> context. What am I missing?
>>>>
>>>> Are there additional patches, or do you have some userspace that works
>>>> with this in some limited configuration?
>>>
>>> No, these are the only patches. We have one patch for the QEMU but from kernel
>>> perspective this is it. 
>>
>> Do you have a link to that? Seeing it would help to ease my concerns.
> 
> The QEMU driver has not been posted yet. As far as I know, it just discovers the memory
> resources on the platform object and creates mappings for the guest machine only. 
> 
> Shanker Donthineni and Vikram Sethi will post the QEMU patch later.

Then may I suggest you both synchronize your submissions? I'd really
like to hear from the QEMU maintainers that they are satisfied with that
side of the story as well.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v12 0/7] dma: add Qualcomm Technologies HIDMA driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-11 15:50 +0100
  [PATCH V12 4/7] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-11 15:50 +0100
  [PATCH V12 2/7] dma: hidma: Add Device Tree support Sinan Kaya <okaya@codeaurora.org> - 2016-01-11 15:50 +0100
    Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Mark Rutland <mark.rutland@arm.com> - 2016-01-15 16:20 +0100
      Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Mark Rutland <mark.rutland@arm.com> - 2016-01-15 16:40 +0100
        Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 18:10 +0100
          Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Mark Rutland <mark.rutland@arm.com> - 2016-01-18 12:50 +0100
      Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 18:00 +0100
        Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Mark Rutland <mark.rutland@arm.com> - 2016-01-18 13:00 +0100
          Re: [PATCH V12 2/7] dma: hidma: Add Device Tree support Sinan Kaya <okaya@codeaurora.org> - 2016-01-18 15:10 +0100
  [PATCH V12 6/7] dma: qcom_hidma: add debugfs hooks Sinan Kaya <okaya@codeaurora.org> - 2016-01-11 15:50 +0100
  [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-11 15:50 +0100
    Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Mark Rutland <mark.rutland@arm.com> - 2016-01-15 16:10 +0100
      Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 16:20 +0100
        Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Mark Rutland <mark.rutland@arm.com> - 2016-01-15 16:30 +0100
          Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 18:20 +0100
            Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Marc Zyngier <marc.zyngier@arm.com> - 2016-01-15 18:40 +0100
              Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 23:50 +0100
                Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Marc Zyngier <marc.zyngier@arm.com> - 2016-01-18 10:10 +0100
          Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-22 19:40 +0100
      Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Marc Zyngier <marc.zyngier@arm.com> - 2016-01-15 16:20 +0100
        Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Mark Rutland <mark.rutland@arm.com> - 2016-01-15 16:40 +0100
          Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 17:10 +0100
            Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-20 23:20 +0100
        Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 16:50 +0100
          Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Marc Zyngier <marc.zyngier@arm.com> - 2016-01-15 18:30 +0100
            Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Sinan Kaya <okaya@codeaurora.org> - 2016-01-15 18:50 +0100
              Re: [PATCH V12 3/7] dma: add Qualcomm Technologies HIDMA management  driver Marc Zyngier <marc.zyngier@arm.com> - 2016-01-15 19:10 +0100

csiph-web