From: Joerg Roedel <joro@8bytes.org>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: iommu@lists.linux-foundation.org
Subject: Re: [PATCH] iommu: Allow page responses without PASID
Date: Tue, 30 Jun 2020 11:49:50 +0200 [thread overview]
Message-ID: <20200630094949.GG28824@8bytes.org> (raw)
In-Reply-To: <20200616144712.748818-1-jean-philippe@linaro.org>
On Tue, Jun 16, 2020 at 04:47:14PM +0200, Jean-Philippe Brucker wrote:
> Some PCIe devices do not expect a PASID value in PRI Page Responses.
> If the "PRG Response PASID Required" bit in the PRI capability is zero,
> then the OS should not set the PASID field. Similarly on Arm SMMU,
> responses to stall events do not have a PASID.
>
> Currently iommu_page_response() systematically checks that the PASID in
> the page response corresponds to the one in the page request. This can't
> work with virtualization because a page response coming from a guest OS
> won't have a PASID if the passed-through device does not require one.
>
> Add a flag to page requests that declares whether the corresponding
> response needs to have a PASID. When this flag isn't set, allow page
> responses without PASID.
>
> Reported-by: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> include/uapi/linux/iommu.h | 6 +++++-
> drivers/iommu/iommu.c | 23 +++++++++++++++++------
> 2 files changed, 22 insertions(+), 7 deletions(-)
Applied, thanks.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
prev parent reply other threads:[~2020-06-30 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 14:47 [PATCH] iommu: Allow page responses without PASID Jean-Philippe Brucker
2020-06-30 9:49 ` Joerg Roedel [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=20200630094949.GG28824@8bytes.org \
--to=joro@8bytes.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.