Hardware: Librem 15v3
OS: openSUSE Tumbleweed; current kernel: 4.17.3-1
I want to run a virtual machine with OpenWrt under libvirt+qemu+kvm, with wireless card attached to it using IOMMU.
This was working under QubesOS, which is using XEN (ofc not with OpenWrt, but with their net-vm, but it doesn’t matter here). Now I wanted to recreate something similar under openSUSE with KVM.
The problem is that as soon as I turn on the VM the host system goes into hard freeze. Even SysRq keys are not working. In
dmesg --follow there are no significant messages before freeze.
What I’ve done so far:
- Enabled iommu with kernel command-line arguments:
igfx_offis required, because without it after booting you can see some random colors pattern on screen and the system is frozen). Using
iommu=ptmakes no difference.
options vfio-pci ids=168c:0034in
/etc/modprobe.d/. This causes the wireless card to be detached from host ath9k driver at boot. It’s not required, as libvirt can do this at runtime. Even I can do it manually as described here (there is attaching to pci-stub, but it works the same for vfio-pci). This seems not to be the cause of freeze.