On Tue, Mar 10, 2026 at 09:35:04 +0100, Pavel Hrdina wrote:
From: Pavel Hrdina <phrdina@redhat.com>
The following interface XML will crash libvirt when attached to running VM:
<interface type='network'> <source network='hostdev_net'/> </interface>
Instead of trying to figure out every single place where hostdev is used as struct directly and allocating empty private data check if iommufd is configured as that will happen only for <hostdev> device where the private data are correctly allocated.
This patch is best viewed with `git show -w`.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/qemu/qemu_hotplug.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-)
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>