From 47e70115197f1803c162388cee8f450cea4e4bbf Mon Sep 17 00:00:00 2001 From: Sandwich Date: Sun, 6 Sep 2026 05:04:18 +0200 Subject: [PATCH] feat: use the igb nic model for the guest --- docs/GUEST-SETUP.md | 15 ++++++++------- packaging/vfio-native/PKGBUILD | 2 +- scripts/setup-vm.sh | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/GUEST-SETUP.md b/docs/GUEST-SETUP.md index f73b14b..79cab99 100644 --- a/docs/GUEST-SETUP.md +++ b/docs/GUEST-SETUP.md @@ -75,11 +75,11 @@ Enable-NetFirewallRule -DisplayGroup "Remote Desktop" Put your public key in `C:\ProgramData\ssh\administrators_authorized_keys` for an Administrator account. `vm-native-verify` uses that key. -SSH into the guest fails with `Corrupted MAC on input` until the host has the e1000e offload rule +SSH into the guest fails with `Corrupted MAC on input` until the host has the NIC offload rule from the `vfio-native` package. The emulated NIC's TX offloads corrupt integrity-checked traffic on -the host side of the tap; SMB tolerates it, SSH does not. The package installs a udev rule that -turns the offloads off on every libvirt tap as it appears, and `vm-native-setup` says so if it is -missing. +the host side of the tap; SMB tolerates it, SSH does not. This holds for both `igb` and `e1000e`. +The package installs a udev rule that turns the offloads off on every libvirt tap as it appears, +and `vm-native-setup` says so if it is missing. ## 3. Make the NVMe driver boot-critical @@ -127,9 +127,10 @@ Two things it asks or warns about: Before the first boot, if the host has less free memory than the guest's RAM, free and compact it so the guest lands on transparent hugepages; `vm-native-setup` prints the two commands when it -applies. The NIC stays `e1000e`, so the network survives the driver removal in the next step. Do not use -virtiofs for host files: it is a virtio device the scanner names, and its shared memory backing -blocks transparent hugepages for the whole guest. Share over SMB on the e1000e link instead. +applies. The NIC stays `igb`, so the network survives the driver removal in the next step: Windows +has an in-box driver for the Intel 82576 it emulates. Do not use virtiofs for host files: it is a +virtio device the scanner names, and its shared memory backing blocks transparent hugepages for the +whole guest. Share over SMB on the `igb` link instead. ## 5. Remove the virtio drivers and the agents diff --git a/packaging/vfio-native/PKGBUILD b/packaging/vfio-native/PKGBUILD index 4a5c22c..72edbf1 100644 --- a/packaging/vfio-native/PKGBUILD +++ b/packaging/vfio-native/PKGBUILD @@ -48,7 +48,7 @@ package() { # this coexists with whatever hook the host already has. install -Dm755 scripts/libvirt-hook-cpu-isolation.sh \ "${pkgdir}/etc/libvirt/hooks/qemu.d/10-cpu-isolation.sh" - # e1000e offloads corrupt integrity-checked traffic on libvirt taps; host-wide by nature + # emulated NIC offloads corrupt integrity-checked traffic on libvirt taps; host-wide by nature install -Dm644 scripts/99-vfio-native-vnet-offload.rules \ "${pkgdir}/usr/lib/udev/rules.d/99-vfio-native-vnet-offload.rules" } diff --git a/scripts/setup-vm.sh b/scripts/setup-vm.sh index eec2e14..4c32535 100755 --- a/scripts/setup-vm.sh +++ b/scripts/setup-vm.sh @@ -661,7 +661,7 @@ if conformant and E["CONVERT"] == "1": s = re.sub(r"\s*", "", s) s = re.sub(r".*?", "", s, flags=re.S) s = re.sub(r"", "", s) - s = re.sub(r"(\s*)?", "", s) + s = re.sub(r"(\s*)?", "", s) if prof == "full": s = re.sub(r"", "", s, flags=re.S)