Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147473117
D7666.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7666.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7666: Leave ppt devices in the host domain when they are not attached to a VM.
Attached
Detach File
Event Timeline
Log In to Comment