All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Brian Woods <brian.woods@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables
Date: Tue, 20 Nov 2018 09:45:13 -0700	[thread overview]
Message-ID: <5BF43A1902000078001FE31E@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20181120160153.45259-7-roger.pau@citrix.com>

>>> On 20.11.18 at 17:01, <roger.pau@citrix.com> wrote:
> Bridges are not behind an IOMMU, and are already special cased and
> skipped in amd_iommu_add_device. Apply the same special casing when
> updating page tables.
> 
> This is required or else update_paging_mode will fail and return an
> error to the caller (amd_iommu_{un}map_page) which will destroy the
> domain.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Cc: Brian Woods <brian.woods@amd.com>
> ---
> Changes since v4:
>  - Invert condition order so they match the order in
>    amd_iommu_add_device.
>  - Expand commit message to spell out why this is required.

Thanks. Nevertheless ...

> --- a/xen/drivers/passthrough/amd/iommu_map.c
> +++ b/xen/drivers/passthrough/amd/iommu_map.c
> @@ -612,6 +612,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 ( pdev->type == DEV_TYPE_PCI_HOST_BRIDGE &&
> +                 is_hardware_domain(d) )
> +                continue;

... before spreading the issue I'd still like to see clarification of /
justification for the is_hardware_domain() part of the condition
you clone. Suravee, Brian?

Jan


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

  reply	other threads:[~2018-11-20 16:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 16:01 [PATCH v5 0/6] x86/pvh: fixes for PVH Dom0 Roger Pau Monne
2018-11-20 16:01 ` [PATCH v5 1/6] vpci: fix updating the command register Roger Pau Monne
2018-11-26 11:20   ` Jan Beulich
2018-11-20 16:01 ` [PATCH v5 2/6] vpci: fix deferral of long operations Roger Pau Monne
2018-11-26 11:26   ` Jan Beulich
2018-11-26 11:41   ` Jan Beulich
2018-11-26 11:57     ` Paul Durrant
2018-11-20 16:01 ` [PATCH v5 3/6] vpci/msix: carve p2m hole for MSIX MMIO regions Roger Pau Monne
2018-11-20 16:01 ` [PATCH v5 4/6] pci: add a segment parameter to pci_hide_device Roger Pau Monne
2018-11-26 11:29   ` Jan Beulich
2018-11-20 16:01 ` [PATCH v5 5/6] amd/iommu: assign iommu devices to Xen Roger Pau Monne
2018-11-20 16:14   ` Jan Beulich
2018-11-20 16:01 ` [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables Roger Pau Monne
2018-11-20 16:45   ` Jan Beulich [this message]
2018-11-20 23:26     ` Woods, Brian
2018-11-21  9:21       ` Jan Beulich
2018-11-21 10:37         ` Roger Pau Monné
2018-11-21 10:58           ` Jan Beulich
2018-11-21 11:51             ` Roger Pau Monné
2018-11-21 13:23               ` Jan Beulich
2018-11-22 12:47                 ` Roger Pau Monné
2018-11-22 13:20                   ` Jan Beulich
2018-11-23 14:36                     ` Roger Pau Monné
     [not found]                       ` <60B388B7020000D60063616D@prv1-mh.provo.novell.com>
2018-11-26  8:42                         ` 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=5BF43A1902000078001FE31E@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=brian.woods@amd.com \
    --cc=roger.pau@citrix.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.