feat: vm-native-setup target-machine refit and identity knobs

This commit is contained in:
2026-10-10 02:29:34 +02:00
parent d47e1d5fa0
commit b1444cc722
4 changed files with 249 additions and 36 deletions
+13 -5
View File
@@ -65,7 +65,7 @@ cd vfio-native/packaging
| Package | What it is |
| --- | --- |
| `vfio-native` | the three commands, the patches, the ACPI tables, the benchmark, the libvirt hook |
| `vfio-native-qemu` | QEMU 11.1.1 with the platform-identity patches, in `/opt/qemu-native` |
| `vfio-native-qemu` | QEMU 11.1.2 with the platform-identity patches, in `/opt/qemu-native` |
| `vfio-native-kvm-dkms` | the patched KVM modules, rebuilt by DKMS for every installed 7.2.x kernel |
The modules land in `updates/dkms/`, which modprobe prefers, but nothing reloads them for you.
@@ -144,10 +144,18 @@ vm-native-setup -d win11 -p full -c 8 -m 16 -r -u auto -y
| `-s` | Secure Boot with enrolled keys, `on` (default) or `off` |
| `-u` | USB passthrough: `none`, `auto`, or `vid:pid,...,0000:bb:dd.f` |
| `-r` | randomise the hardware identity: serials, MAC, memory module |
| `-S` | refit to a real machine's dumped SMBIOS (Method B) |
| `-y` | no prompts |
It backs the domain up first and prints the revert command. Re-running it is safe.
To present as a specific machine instead of this host, fill the target keys in the
domain's `identity.env` (`SYS_PRODUCT`, `BIOS_*`, `CPU_*`, ...): the tool then authors
SMBIOS type 0-4/17 as `-smbios type=` field args (Method A), so a new-laptop refit is a
few field edits. `-S <dmi-blob>` instead splits a real machine's dumped DMI table into
`-smbios file=` blobs for byte-perfect fidelity (Method B); mixing is per structure type.
Either wires the ICH9 USB set, disables HPET, and needs `-p full`.
### 5. Check it worked
```sh
@@ -274,9 +282,9 @@ and ship with a cover letter and a selftest in `patches/kvm/`.
either alone leaves it standing. `EXPERIMENTAL-0006` is built into the DKMS package but off by
default; it is not upstream material, because it hands the guest raw host CPUID.
**QEMU** - eight patchsets against v11.1.1: `01-firmware`, `02-disk-identity`, `03-pci-ids`,
`04-fw-cfg`, `05-usb-hid`, `06-audio`, and `07-edid` and `08-cpu-misc`, which clear no check by
themselves and are carried for other detectors.
**QEMU** - ten patchsets against v11.1.2: `01-firmware`, `02-disk-identity`, `03-pci-ids`,
`04-fw-cfg`, `05-usb-hid`, `06-audio`, `09-firmware-chain` and `10-smbios`, and `07-edid` and
`08-cpu-misc`, which clear no check by themselves and are carried for other detectors.
---
@@ -366,7 +374,7 @@ the whole trail, including the two wrong turns.
```
patches/kvm/ five upstream-style kernel patches, a cover letter, plus one experimental
patches/qemu/ eight patchsets against QEMU 11.1.1
patches/qemu/ ten patchsets against QEMU 11.1.2
packaging/ three AUR-shaped packages: tools, patched QEMU, DKMS modules
scripts/ setup, verify, GPU, libvirt hook, module install
scripts/generate-tables.py raw SMBIOS type 7/26/27/28/29 blobs for -smbios file=