On Fri, Feb 08, 2019 at 10:35:37AM +0100, Roger Pau Monné wrote: > What about hot-unplug? The proper flow there would be to ask the > stubdomain to detach the device, and only deassign it after the > stubdomain has reported successful detach. I think that's already the > case. I think so. The approach with handling stubdomain permission in {create,destroy}_irq seems to work, the patch will follow. There is one code path where I haven't managed to properly extract possible stubdomain in use: pci_remove_device() -> pci_cleanup_msi() -> msi_free_irqs() -> msi_free_irq() -> destroy_irq() For now I've hardcoded hardware_domain there (in msi_free_irqs). Can it happen when device is still assigned to some domU? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?