Index: head/sys/amd64/vmm/io/iommu.c =================================================================== --- head/sys/amd64/vmm/io/iommu.c +++ head/sys/amd64/vmm/io/iommu.c @@ -158,7 +158,6 @@ { int error, bus, slot, func; vm_paddr_t maxaddr; - const char *name; device_t dev; if (!iommu_enable) @@ -203,12 +202,7 @@ if (dev == NULL) continue; - /* skip passthrough devices */ - name = device_get_name(dev); - if (name != NULL && strcmp(name, "ppt") == 0) - continue; - - /* everything else belongs to the host domain */ + /* Everything belongs to the host domain. */ iommu_add_device(host_domain, pci_get_rid(dev)); } Index: head/sys/amd64/vmm/io/ppt.c =================================================================== --- head/sys/amd64/vmm/io/ppt.c +++ head/sys/amd64/vmm/io/ppt.c @@ -363,6 +363,7 @@ return (EBUSY); ppt->vm = vm; + iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } @@ -385,6 +386,7 @@ ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); + iommu_add_device(iommu_host_domain(), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); }