All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids
Date: Wed, 14 Jun 2023 14:58:14 +0200	[thread overview]
Message-ID: <5c12e29a-ea85-b216-fedd-a8028a82d3ac@suse.com> (raw)
In-Reply-To: <20230614083236.64574-1-roger.pau@citrix.com>

On 14.06.2023 10:32, Roger Pau Monne wrote:
> When the passed domain is DomIO iterate over the list of DomIO
> assigned devices and flush each pseudo-domid found.
> 
> invalidate_all_domain_pages() does call amd_iommu_flush_all_pages()
> with DomIO as a parameter,

Does it? Since the full function is visible in the patch (because of
the "While there ..." change), it seems pretty clear that it doesn't:
for_each_domain() iterates over ordinary domains only.

> and hence the underlying
> _amd_iommu_flush_pages() implementation must be capable of flushing
> all pseudo-domids used by the quarantine domain logic.

While it didn't occur to me right away when we discussed this, it
may well be that I left alone all flushing when introducing the pseudo
domain IDs simply because no flushing would ever happen for the
quarantine domain.

> While there fix invalidate_all_domain_pages() to only attempt to flush
> the domains that have IOMMU enabled, otherwise the flush is pointless.

For the moment at least it looks to me as if this change alone wants
to go in.

Jan


  reply	other threads:[~2023-06-14 12:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  8:32 [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids Roger Pau Monne
2023-06-14 12:58 ` Jan Beulich [this message]
2023-06-14 13:23   ` Roger Pau Monné
2023-06-14 13:51     ` 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=5c12e29a-ea85-b216-fedd-a8028a82d3ac@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.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.