From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Lars Segerlund <lars.segerlund-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: problems with iommu and userspace DMA to hugepages, how to add iommu mapings from userspace.
Date: Thu, 10 Nov 2016 07:04:32 -0700 [thread overview]
Message-ID: <20161110070432.0520e389@t450s.home> (raw)
In-Reply-To: <CAF-VNarFte4k0bAEjYkUMaCeWXqFZZdn-EHFPGKj8M7y9iCd+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 10 Nov 2016 12:16:19 +0100
Lars Segerlund <lars.segerlund-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I am getting these errors from a userspace 'device driver' ,
>
> [599805.585424] DMAR: DRHD: handling fault status reg 202
> [599805.585431] DMAR: DMAR:[DMA Read] Request device [03:00.0] fault addr
> 4c0008000
> DMAR:[fault reason 06] PTE Read access is not set
>
> Basicly i mapp a dma engine in a PCIe card by uio to a userspace library,
> and then allocate hugepages ( continous ), do a virt to phys translation
> via /proc/self/.... setup a dma and turn it on.
>
> The message tells me I lack iommu mappings for the memory regions i try to
> read/write , so far so good nothing unexpected.
>
> My problem is that I have to run with intel_iommu=on iommu=pt flags to the
> kernel due to other hard/software on the machine, I can't turn iommu off
> completely.
>
> So I have the question is it possible to add iommu mappings from userspace
> ? through iommu groups in /sys/.. ?
>
> So far all applications that does something similar either uses vfio or
> some kernel driver callback and I would prefer not to do this.
> ( I had high hopes for dpdk pmd driver but so far no luck ).
vfio is the right way to do this.
prev parent reply other threads:[~2016-11-10 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 11:16 problems with iommu and userspace DMA to hugepages, how to add iommu mapings from userspace Lars Segerlund
[not found] ` <CAF-VNarFte4k0bAEjYkUMaCeWXqFZZdn-EHFPGKj8M7y9iCd+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-10 14:04 ` Alex Williamson [this message]
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=20161110070432.0520e389@t450s.home \
--to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=lars.segerlund-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).