diff options
author | Jacob Pan <[email protected]> | 2020-01-02 08:18:09 +0800 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2020-01-07 14:05:57 +0100 |
commit | 5f75585e19cc7018bf2016aa771632081ee2f313 (patch) | |
tree | 8c733fbb0ccbde4c163ab0c49b21bf0e1442b243 | |
parent | 59a623374dc38f7724457c59753c3f02fac6aed6 (diff) |
iommu/vt-d: Avoid sending invalid page response
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 <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Signed-off-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
-rw-r--r-- | drivers/iommu/intel-svm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index f0410e29fbc1..7c6a6e8b1c96 100644 --- a/drivers/iommu/intel-svm.c +++ b/drivers/iommu/intel-svm.c @@ -679,11 +679,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; } |