All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Brian Woods <brian.woods@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v4 5/5] amd/iommu: skip bridge devices when updating IOMMU page tables
Date: Wed, 14 Nov 2018 12:57:40 +0100	[thread overview]
Message-ID: <20181114115740.1050-6-roger.pau@citrix.com> (raw)
In-Reply-To: <20181114115740.1050-1-roger.pau@citrix.com>

Bridges are not behind an IOMMU, and are already special cased and
silently skipped in amd_iommu_add_device. Apply the same special
casing when updating page tables.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Brian Woods <brian.woods@amd.com>
---
 xen/drivers/passthrough/amd/iommu_map.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 6a2c877d34..62292a9015 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -593,6 +593,10 @@ static int update_paging_mode(struct domain *d, unsigned long dfn)
         /* Update device table entries using new root table and paging mode */
         for_each_pdev( d, pdev )
         {
+            if ( is_hardware_domain(d) &&
+                 pdev->type == DEV_TYPE_PCI_HOST_BRIDGE )
+                continue;
+
             bdf = PCI_BDF2(pdev->bus, pdev->devfn);
             iommu = find_iommu_for_device(pdev->seg, bdf);
             if ( !iommu )
-- 
2.19.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-11-14 11:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 11:57 [PATCH v4 0/5] x86/pvh: fix fixes for PVH Dom0 Roger Pau Monne
2018-11-14 11:57 ` [PATCH v4 1/5] vpci: fix updating the command register Roger Pau Monne
2018-11-16 12:00   ` Jan Beulich
2018-11-16 14:32     ` Roger Pau Monné
2018-11-19  8:26       ` Jan Beulich
2018-11-19 11:09         ` Roger Pau Monné
2018-11-19 11:31           ` Jan Beulich
2018-11-14 11:57 ` [PATCH v4 2/5] vpci: fix deferral of long operations Roger Pau Monne
2018-11-14 12:08   ` Paul Durrant
2018-11-16 12:11   ` Jan Beulich
2018-11-16 14:57     ` Roger Pau Monné
2018-11-19  8:27       ` Jan Beulich
2018-11-14 11:57 ` [PATCH v4 3/5] vpci/msix: carve p2m hole for MSIX MMIO regions Roger Pau Monne
2018-11-19 14:56   ` Jan Beulich
2018-11-20 14:35     ` Roger Pau Monné
2018-11-14 11:57 ` [PATCH v4 4/5] amd/iommu: assign iommu devices to Xen Roger Pau Monne
2018-11-14 12:33   ` Andrew Cooper
2018-11-14 13:53     ` Jan Beulich
2018-11-14 16:09     ` Roger Pau Monné
2018-11-15 15:34   ` Jan Beulich
2018-11-15 16:00     ` Roger Pau Monné
2018-11-14 11:57 ` Roger Pau Monne [this message]
2018-11-15 15:40   ` [PATCH v4 5/5] amd/iommu: skip bridge devices when updating IOMMU page tables Jan Beulich
2018-11-15 15:48     ` Roger Pau Monné
2018-11-15 16:13       ` 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=20181114115740.1050-6-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=brian.woods@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    --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.