From: Baolu Lu<baolu.lu@xxxxxxxxxxxxxxx>this sounds an ordering problem. clearing context should be after
Sent: Wednesday, November 16, 2022 12:36 PM
On 11/16/22 11:53 AM, Tian, Kevin wrote:
Unfortunately domain_context_clear() needs reference to info->domainFrom: Lu Baolu<baolu.lu@xxxxxxxxxxxxxxx>clear context after blocking translation.
Sent: Monday, November 14, 2022 9:41 AM
@@ -4562,7 +4538,10 @@ static void intel_iommu_release_device(struct
device *dev)
{
struct device_domain_info *info = dev_iommu_priv_get(dev);
- dmar_remove_one_dev_info(dev);
+ iommu_disable_pci_caps(info);
+ domain_context_clear(info);
+ device_block_translation(dev);
(for domain id when flushing cache), which is cleared in
device_block_translation().
blocking translation in concept.