I have 2 the same network cards.
One of them will be the WAN side of pfsense which runs in qemu.
I'd like to isolate this card, instead of bridging it, and give it to pfsense solely.
Code:
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:82a2]
Kernel driver in use: r8169
Kernel modules: r8169
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
Subsystem: TP-LINK Technologies Co., Ltd. TG-3468 Gigabit PCI Express Network Adapter [7470:3468]
Kernel driver in use: r8169
Kernel modules: r8169
I have tried to add a vfio.conf in /lib/modprobe.d which contains:
Code:
options vfio-pci ids=02:00.0|10ec:8168
First of all I am not sure whether the syntax is right. Cause by adding the device "10ec:8168" I will passthrough bot NICS. So i added the bus.
It did not work.
Secondly I tried by overriding the device by cat-ting "vfio-pci" in
/sys/bus/pci/devices/0000:02:00.0/driver_override
Also this did not work because after boot it defaulted.
Third, I tried by using vfio-bind.
This command does not seems to be available on current.
Also the following does not work:
Code:
virsh nodedev-dettach pci_0000_02_00_0
error: Failed to detach device pci_0000_02_00_0
error: argument unsupported: VFIO device assignment is currently not supported on this system
To be sure the kernel module vfio-pci was loaded I did a
returned with :
Code:
Module Size Used by
vfio_pci 16384 0
vfio_pci_core 69632 1 vfio_pci
vfio_virqfd 16384 1 vfio_pci_core
vfio_iommu_type1 45056 0
vfio 32768 2 vfio_pci_core,vfio_iommu_type1
So that seems to be OK.
I did a grep on vfio in dmesg and I got
Code:
[ 3018.707503] vfio_pci: add [0002:0000[ffffffff:ffffffff]] class 0x000000/00000000
That looks OK, isn't it ?
However qemu still complains that the host is not able to put pci devices in passthrough.
And, yes, I have enabled the correct BIOS options (VT-X etc...).
Anyone suggestions ?
br,
ST