diff mbox series

x86/iommu: add comment regarding setting of need_sync

Message ID 20190722154552.73458-1-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/iommu: add comment regarding setting of need_sync | expand

Commit Message

Roger Pau Monné July 22, 2019, 3:45 p.m. UTC
Clarify why relaxed hardware domains don't need iommu page-table
syncing.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/iommu.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jan Beulich July 23, 2019, 10:34 a.m. UTC | #1
On 22.07.2019 17:45, Roger Pau Monne wrote:
> Clarify why relaxed hardware domains don't need iommu page-table
> syncing.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 79ec6719f5..f8c3bf53bd 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -185,6 +185,10 @@  void __hwdom_init iommu_hwdom_init(struct domain *d)
     register_keyhandler('o', &iommu_dump_p2m_table, "dump iommu p2m table", 0);
 
     hd->status = IOMMU_STATUS_initializing;
+    /*
+     * NB: relaxed hw domains don't need sync because all ram is already
+     * mapped in the iommu page tables.
+     */
     hd->need_sync = iommu_hwdom_strict && !iommu_use_hap_pt(d);
     if ( need_iommu_pt_sync(d) )
     {