Page MenuHomeFreeBSD

D7666.diff
No OneTemporary

D7666.diff

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);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 12, 6:59 AM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29570700
Default Alt Text
D7666.diff (1 KB)

Event Timeline