Summary: | QEMU / KVM Q35 V4.X PCIe Virtual and Physical (Passthrough) Devices not detected | ||
---|---|---|---|
Product: | Base System | Reporter: | John Hartley <drum> |
Component: | kern | Assignee: | freebsd-virtualization (Nobody) <virtualization> |
Status: | Open --- | ||
Severity: | Affects Some People | CC: | accounts.steven.roch, christian.rohmann, freebsd, freebsd, mzaferyahsi, wyatt |
Priority: | --- | Keywords: | regression |
Version: | 12.1-STABLE | ||
Hardware: | amd64 | ||
OS: | Any |
Description
John Hartley
2020-01-27 01:43:16 UTC
So I am trying to understand how to classify this: does this issue have to do with a defect in the qemu port, a defect in the base system, or both? (In reply to Mark Linimon from comment #1) Hi Mark, I believe the bug is in the Base as relates to PCIe Device Driver and its behaviour with a particular "hardware" type (PCEe Gen4). It would seem that the place to start looking in the PCIe device discovery code. I have obviously on tested this on virtual machine, but it could be that similar issue occur on physical machine (depending on quality of equation). Cheers, John Hartley. Hello! I experienced what I believe to have been this issue with LXC/QEMU. A workaround I discovered is to specify "pc-q35-2.6" in the QEMU machine config. My related thread - https://discuss.linuxcontainers.org/t/lxc-vm-running-freebsd-cant-see-hard-disk/8214/15 Hi Wyatt, yes this work around results in use of Gen3/Gen3 PCIe emulation. I have raised bug reports on various NIC/SCSI & VirtIO issues... I also am running a pfsense machine and have deliberately avoided upgrading this so I do not hit these uncovered bugs. I did test with 11.4 and believe that the issue with netmap is resolved, but virtio issues are not. Cheers, John Hartley. I can confirm the issue still existing in Proxmox 6.2-9 with and 'pve-qemu-kvm/stable 5.0.0-9 amd64' when trying PCIe-passthrough of LSI HBA with option PCIe-device enabled. FreeNAS did not recognize the HBA until I manually set machine to pc-q35-3.1 as suggested by John Hartley. (In reply to John Hartley from comment #2) Hi Mark, this should have been "depending on the quality of the emulation". Has there been much testing with physical Gen4 PCIe machines ? These are still few and far between at the moment, last I looked only AMD had Gen4 PCIe machines. In general though testing via emulation first is a good way to go as emulation is able to deliver new spec "hardware" faster than it can be produced in metal. Cheers, John Hartley. has anyone been able to test this lately? i believe quite a few issues to be resolved in 13.2 (In reply to Mina Galić from comment #7) Hi Mina Galic, my latest testing has shown that unfortunately FreeBSD 13.1 & 13.2 have regressed and you cannot boot ISO with modern firmware (UEFI): QEMU kVM: - Machine type: Q35 with OVMF / UEFI - QEMU & Libvirt API Version 8.0.0 - QEMU Hypervisor Version: 6.2.0 Does not boot from CD-ROM at all. So looks like need to raise new bug, report. Cheers from Oz, John Hartley. (In reply to Mina Galić from comment #7) Hi Mina Galic, my latest testing has shown that unfortunately FreeBSD 13.1 & 13.2 have regressed and you cannot boot ISO with modern firmware (UEFI): QEMU kVM: - Machine type: Q35 with OVMF / UEFI - QEMU & Libvirt API Version 8.0.0 - QEMU Hypervisor Version: 6.2.0 Does not boot from CD-ROM at all. So looks like need to raise new bug, report. Cheers from Oz, John Hartley. (In reply to John Hartley from comment #9) H Mina Galic, I have now done further testing with 13.2. You can get this up and running Q35 V4.2 & 6.2 but you need to ensure that is is using specific OVMF (UEFI) firmwaare. My libvirt configuraton to achieve this: <WORKS> ... <os> <type arch='x86_64' machine='pc-q35-6.2'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> <nvram>/home/XXXX/Documents/current.dev.freebsd/OVMF_VARS.fd</nvram> </os> ... </WORKS> The default UEFI / OVMF libvirt configuration is: <FAILS> ... <os firmware='efi'> <type arch='x86_64' machine='pc-q35-6.2'>hvm</type> </os> ... </FAILS> This result in it loading a different OVMF version, which then fails UEFI boot. With the working boot e1000e (Intel 1GbE on PCIe bus) if found ok. So it looks like 13.2 has fixed the problem with PCIe Devices, but I have not tested with real devices via PCIe passthrough... Cheers, John Hartley. |