mhi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: Slark Xiao <slark_xiao@163.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
	"quic_hemantk@quicinc.com" <quic_hemantk@quicinc.com>,
	mhi@lists.linux.dev
Subject: Re: Does MHI driver support DMA remapping?
Date: Thu, 13 Oct 2022 09:07:21 +0200	[thread overview]
Message-ID: <CAMZdPi_9t-8qHQep87+sfVrWVUJ3-xo0TFY+q4gxFRr18fmMNA@mail.gmail.com> (raw)
In-Reply-To: <7ac21c73.2acb.183cf5fff45.Coremail.slark_xiao@163.com>

Hi Slark,

On Thu, 13 Oct 2022 at 05:25, Slark Xiao <slark_xiao@163.com> wrote:
>
> Hi,
>   I have a question about the DMA feature on our MHI driver. Does MHI support DMA remapping feature?
>   This is the reference description from Windows OS:
>
> To ensure compatibility with Kernel DMA Protection and DMAGuard Policy, PCIe device drivers can opt into Direct Memory Access (DMA) remapping.
>
> DMA remapping for device drivers protects against memory corruption and malicious DMA attacks, and provides a higher level of compatibility for devices. Also, devices with DMA remapping-compatible drivers can start and perform DMA regardless of lock screen status.

I assume this is all about IOMMU? then AFAIK it should be supported by
the driver, not because the driver does anything special to handle it,
but because it uses the standard dma helpers. So if there is an IOMMU
in between, indicated in e.g. devicetree or ACPI, the different device
IOVA spaces will be managed/isolated automatically via the IOMMU
layer/driver.

Regards,
Loic

       reply	other threads:[~2022-10-13  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7ac21c73.2acb.183cf5fff45.Coremail.slark_xiao@163.com>
2022-10-13  7:07 ` Loic Poulain [this message]
2022-10-14 11:17   ` Re:Re: Does MHI driver support DMA remapping? Slark Xiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMZdPi_9t-8qHQep87+sfVrWVUJ3-xo0TFY+q4gxFRr18fmMNA@mail.gmail.com \
    --to=loic.poulain@linaro.org \
    --cc=mani@kernel.org \
    --cc=mhi@lists.linux.dev \
    --cc=quic_hemantk@quicinc.com \
    --cc=slark_xiao@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).