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

Re: [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 14 Jun 2023 14:58:14 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C31FW8rDQZ34AXSmE05cOQ8VaLOiOmCoIwOGo8ckfl4=; b=cK5GPI7HmWkvg3XW0rRCfQkybIUn/fJt6p2ZCGOB44M+3LRHZVYuB8ddQ3Yi+J6MA1dvb8q1wFEuDrKVhC7cKKobLVB36R9BVhU7Ca4LktOlEDkbnZ4kaftl4icohNmC1PjV8GLoNL+AGT54PuI4N2w8uO2rmQDekeKmWZCFxDahV9NxS3UjYVfOmQn1QljS4CAHT3SXteArLN0HXR0ItGB9r0wjdbhquyUzYqRK8CvN15YjAW4l39ckJ6FQy3CCo6CjB61Ng8hOLpViaYMdtdGlM6MCzlFuGNf9FafHwLllE0F3gyCuJUORVPro4Sa9t+J6j4M7K8RbBt4UZF7e5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6eutXjqWIUhrcsHZs8i5gIuQik2phOChUk/iYZvi2/LQB8PRdv4YbBcCAc1+mm3pvSorNDm6rbjwuydYFC4QxK8n9S4x1fK9qQumIvdXfuvHGRb9ZvAsZzYCSSuZbCXqXvqneUbR7sGPZM3f37S3MnzrYpsWWz9JeyslCkxqR6SThj1v5b3fTAcSuWBPcn1SASDvvzWUL9CEC0PiDMLvIVwxUP/uTG7+19+yGANApvgOSnzrrXkSdgHBRDyA2kaQWiugkmvjfN8JHOnjrEKafqNug5Bl3lojh949BMhqXd1lHHttPkyXDbgf9cxF0z87AnewCPyL3oSuhW4Ql6vHQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 14 Jun 2023 12:59:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

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