From: Auger Eric <eric.auger@redhat.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>,
iommu@lists.linux-foundation.org,
LKML <linux-kernel@vger.kernel.org>,
Joerg Roedel <joro@8bytes.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
David Woodhouse <dwmw2@infradead.org>
Cc: "Tian, Kevin" <kevin.tian@intel.com>, Raj Ashok <ashok.raj@intel.com>
Subject: Re: [PATCH v3 7/8] iommu/vt-d: Avoid sending invalid page response
Date: Wed, 20 Nov 2019 22:07:27 +0100 [thread overview]
Message-ID: <f7296c44-e816-c878-5225-d9c0c9fedfe2@redhat.com> (raw)
In-Reply-To: <1574186193-30457-8-git-send-email-jacob.jun.pan@linux.intel.com>
Hi Jacob,
On 11/19/19 6:56 PM, Jacob Pan wrote:
> Page responses should only be sent when last page in group (LPIG) or
> private data is present in the page request. This patch avoids sending
> invalid descriptors.
>
> Fixes: 5d308fc1ecf53 ("iommu/vt-d: Add 256-bit invalidation descriptor
> support")
> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
R-b sent on v2
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
> ---
> drivers/iommu/intel-svm.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
> index 71b85b892c56..4eecc24412dc 100644
> --- a/drivers/iommu/intel-svm.c
> +++ b/drivers/iommu/intel-svm.c
> @@ -686,11 +686,10 @@ static irqreturn_t prq_event_thread(int irq, void *d)
> if (req->priv_data_present)
> memcpy(&resp.qw2, req->priv_data,
> sizeof(req->priv_data));
> + resp.qw2 = 0;
> + resp.qw3 = 0;
> + qi_submit_sync(&resp, iommu);
> }
> - resp.qw2 = 0;
> - resp.qw3 = 0;
> - qi_submit_sync(&resp, iommu);
> -
> head = (head + sizeof(*req)) & PRQ_RING_MASK;
> }
>
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-11-20 21:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1574186193-30457-1-git-send-email-jacob.jun.pan@linux.intel.com>
[not found] ` <1574186193-30457-2-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 20:59 ` [PATCH v3 1/8] iommu/vt-d: Fix CPU and IOMMU SVM feature matching checks Auger Eric
[not found] ` <1574186193-30457-4-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 20:59 ` [PATCH v3 3/8] iommu/vt-d: Reject SVM bind for failed capability check Auger Eric
[not found] ` <1574186193-30457-5-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 21:01 ` [PATCH v3 4/8] iommu/vt-d: Avoid duplicated code for PASID setup Auger Eric
[not found] ` <1574186193-30457-6-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 21:02 ` [PATCH v3 5/8] iommu/vt-d: Fix off-by-one in PASID allocation Auger Eric
[not found] ` <1574186193-30457-7-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 21:06 ` [PATCH v3 6/8] iommu/vt-d: Replace Intel specific PASID allocator with IOASID Auger Eric
2019-11-20 23:19 ` Jacob Pan
[not found] ` <1574186193-30457-8-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 21:07 ` Auger Eric [this message]
[not found] ` <1574186193-30457-3-git-send-email-jacob.jun.pan@linux.intel.com>
2019-11-20 21:08 ` [PATCH v3 2/8] iommu/vt-d: Match CPU and IOMMU paging mode Auger Eric
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=f7296c44-e816-c878-5225-d9c0c9fedfe2@redhat.com \
--to=eric.auger@redhat.com \
--cc=ashok.raj@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.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