[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] VT-d: skip IOMMU bitmap cleanup for phantom devices

commit 9d92140d0255e14d8c3eaba7edc931327eb96fd0
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Sep 16 11:02:48 2021 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Sep 16 11:02:48 2021 +0200

    VT-d: skip IOMMU bitmap cleanup for phantom devices
    Doing the cleanup also for phantom devices is at best redundant with
    doing it for the corresponding real device. I couldn't force myself into
    checking all the code paths whether it really is: It seems better to
    explicitly skip this step in such cases.
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
 xen/drivers/passthrough/vtd/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/vtd/iommu.c 
index 9827ab184d..aeb1dddc88 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1733,7 +1733,7 @@ static int domain_context_unmap(struct domain *domain, u8 
         return -EINVAL;
-    if ( ret || QUARANTINE_SKIP(domain) )
+    if ( ret || QUARANTINE_SKIP(domain) || pdev->devfn != devfn )
         return ret;
generated by git-patchbot for /home/xen/git/xen.git#master



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.