diff --git a/qubes/ext/pci.py b/qubes/ext/pci.py index 4bbfe0304..6dc2ed65b 100644 --- a/qubes/ext/pci.py +++ b/qubes/ext/pci.py @@ -226,6 +226,9 @@ def on_device_pre_attached_pci(self, vm, event, device, options): raise qubes.exc.QubesException( 'Invalid PCI device: {}'.format(device.ident)) + if isinstance(vm, qubes.vm.adminvm.AdminVM): + raise qubes.exc.QubesException("Can't attach PCI device to dom0") + if vm.virt_mode == 'pvh': raise qubes.exc.QubesException( "Can't attach PCI device to VM in pvh mode")