All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Paul Durrant <paul@xen.org>, Kevin Tian <kevin.tian@intel.com>
Subject: [PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices
Date: Wed, 15 Sep 2021 11:13:16 +0200	[thread overview]
Message-ID: <57c75e32-df31-c886-b2b2-86d0f82a57d0@suse.com> (raw)
In-Reply-To: <6b7fa64a-bd6b-353c-30cb-ec25b850cbed@suse.com>

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@suse.com>

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1733,7 +1733,7 @@ static int domain_context_unmap(struct d
         return -EINVAL;
     }
 
-    if ( ret || QUARANTINE_SKIP(domain) )
+    if ( ret || QUARANTINE_SKIP(domain) || pdev->devfn != devfn )
         return ret;
 
     /*



  parent reply	other threads:[~2021-09-15  9:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  9:11 [PATCH 0/4] IOMMU/PCI: respect device specifics Jan Beulich
2021-09-15  9:12 ` [PATCH 1/4] VT-d: defer "no DRHD" check when (un)mapping devices Jan Beulich
2021-09-16  8:05   ` Tian, Kevin
2021-09-15  9:12 ` [PATCH 2/4] VT-d: consider hidden devices when unmapping Jan Beulich
2021-09-16  8:18   ` Tian, Kevin
2021-09-16  8:31     ` Jan Beulich
2021-09-15  9:13 ` Jan Beulich [this message]
2021-09-16  8:19   ` [PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices Tian, Kevin
2021-09-15  9:13 ` [PATCH 4/4] AMD/IOMMU: consider hidden devices when flushing device I/O TLBs Jan Beulich

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=57c75e32-df31-c886-b2b2-86d0f82a57d0@suse.com \
    --to=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=paul@xen.org \
    --cc=xen-devel@lists.xenproject.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.