Re: [PATCH v3 2/5] iommu/amd: Fix DTE clearing and rename iommu_ignore_device()
Jason Gunthorpe <[email protected]>
| Newsgroups | dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <178759520117.3131778.15279605903087565179.b4-review@b4> |
> [ ... 52 lines skipped ... ]
> +/*
> + * Invalidate a DTE by clearing the Valid bit first.
> + * Note: Lockless; Not to be used on a fully probed
> + * device with live dev_data.
> + */
> +static void amd_iommu_disable_dte(struct dev_table_entry *ptr)
> +{
> + struct dev_table_entry new = {};
> +
> + write_dte_lower128(ptr, &new);
> + write_dte_upper128(ptr, &new);
> +}
No need just call update_dte256() with a 0'd new. This is how all the
update flows work, and it flushes the DTE which this looks like it has
been missing all long.
--
Jason