Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2020 23:40:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 241774] FreeBSD 11.3 & 12.0 has broken SCSI & Networking on KVM/QEMU Q35 with OVMF
Message-ID:  <bug-241774-27103-2BkZnI5yon@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241774-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-241774-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241774

--- Comment #39 from MattS <matt@snowtrek.org> ---
On my Host OS unRAID 6.8.0, i440fx with seabios or OVFM FreeBSD just hangs =
on
boot. One of the unRAID developers (jonp) spent a little time on it, and was
also unsuccessful. It's possible that it's an unRAID specific issue. Not su=
re
at this point.

https://forums.unraid.net/topic/84692-freebsd-113-no-network-interface-afte=
r-upgrade/page/2/?tab=3Dcomments#comment-809306

I was able to get virtio NIC working on 12.1 with TommyP's patch. (Thank yo=
u!)

***************************************
What is/are the CPU/s for your host OS?

cat /proc/cpuinfo (unRAID 6.8 running Linux 4.19.88 kernel)
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 158
model name      : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
stepping        : 10
microcode       : 0xca
cpu MHz         : 4299.634
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca =
cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb
rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds=
_cpl
vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic mov=
be
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefet=
ch
cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi
flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 er=
ms
invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1
xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_cle=
ar
flush_l1d
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf=
 mds
swapgs taa itlb_multihit
bogomips        : 6384.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:
***************************************
Libvirt version:
5.8.0
QEMU version:
4.1.1
***************************************
Did you verify that the relevant virtual technology features are enabled on=
 the
host: IOMMU for AMD and VT/D (?) for Intel?

I'm not sure how to show this on unRAID, but VT/D is enabled and PCIe ACS
Override is enabled for better IMMO grouping. I have a variety of VMs and
Dockers working. Ubuntu, Windows 10, FreeBSD 11.2, MacOS, Kali Linux. Multi=
ple
GPU's, NIC, audio, and USB cards passed through to VMs.=20
****************************************
How are you creating/managing your VMs on the host?

VM configuration is done via GUI (see attached) with an option to edit XML =
if
needed. By default, the template network adapter type is "virtio", I then h=
ave
to switch to XML view and change to e1000.

XML below is just a default configuration with NIC changed to e1000 (FreeBSD
11.3, Q35-4.1

<?xml version=3D'1.0' encoding=3D'UTF-8'?>
<domain type=3D'kvm' id=3D'21'>
  <name>cylon20</name>
  <uuid>522c2643-079b-7464-7120-70fdc2f7ec57</uuid>
  <description>FreeBSD 11.3</description>
  <metadata>
    <vmtemplate xmlns=3D"unraid" name=3D"FreeBSD" icon=3D"freebsd.png" os=
=3D"freebsd"/>
  </metadata>
  <memory unit=3D'KiB'>4194304</memory>
  <currentMemory unit=3D'KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement=3D'static'>4</vcpu>
  <cputune>
    <vcpupin vcpu=3D'0' cpuset=3D'1'/>
    <vcpupin vcpu=3D'1' cpuset=3D'7'/>
    <vcpupin vcpu=3D'2' cpuset=3D'5'/>
    <vcpupin vcpu=3D'3' cpuset=3D'11'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch=3D'x86_64' machine=3D'pc-q35-4.1'>hvm</type>
    <loader readonly=3D'yes'
type=3D'pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
=20=20=20
<nvram>/etc/libvirt/qemu/nvram/522c2643-079b-7464-7120-70fdc2f7ec57_VARS-pu=
re-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode=3D'host-passthrough' check=3D'none'>
    <topology sockets=3D'1' cores=3D'2' threads=3D'2'/>
  </cpu>
  <clock offset=3D'utc'>
    <timer name=3D'rtc' tickpolicy=3D'catchup'/>
    <timer name=3D'pit' tickpolicy=3D'delay'/>
    <timer name=3D'hpet' present=3D'no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type=3D'file' device=3D'cdrom'>
      <driver name=3D'qemu' type=3D'raw'/>
      <source file=3D'/mnt/user/isos/FreeBSD-11.3-RELEASE-amd64-dvd1.iso'/>
      <backingStore/>
      <target dev=3D'hda' bus=3D'sata'/>
      <readonly/>
      <boot order=3D'2'/>
      <alias name=3D'sata0-0-0'/>
      <address type=3D'drive' controller=3D'0' bus=3D'0' target=3D'0' unit=
=3D'0'/>
    </disk>
    <disk type=3D'file' device=3D'disk'>
      <driver name=3D'qemu' type=3D'raw' cache=3D'writeback'/>
      <source file=3D'/mnt/user/domains/cylon20/vdisk1.img'/>
      <backingStore/>
      <target dev=3D'hdc' bus=3D'sata'/>
      <boot order=3D'1'/>
      <alias name=3D'sata0-0-2'/>
      <address type=3D'drive' controller=3D'0' bus=3D'0' target=3D'0' unit=
=3D'2'/>
    </disk>
    <controller type=3D'pci' index=3D'0' model=3D'pcie-root'>
      <alias name=3D'pcie.0'/>
    </controller>
    <controller type=3D'pci' index=3D'1' model=3D'pcie-root-port'>
      <model name=3D'pcie-root-port'/>
      <target chassis=3D'1' port=3D'0x10'/>
      <alias name=3D'pci.1'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x02' fu=
nction=3D'0x0'
multifunction=3D'on'/>
    </controller>
    <controller type=3D'pci' index=3D'2' model=3D'pcie-root-port'>
      <model name=3D'pcie-root-port'/>
      <target chassis=3D'2' port=3D'0x11'/>
      <alias name=3D'pci.2'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x02'
function=3D'0x1'/>
    </controller>
    <controller type=3D'pci' index=3D'3' model=3D'pcie-root-port'>
      <model name=3D'pcie-root-port'/>
      <target chassis=3D'3' port=3D'0x12'/>
      <alias name=3D'pci.3'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x02'
function=3D'0x2'/>
    </controller>
    <controller type=3D'pci' index=3D'4' model=3D'pcie-root-port'>
      <model name=3D'pcie-root-port'/>
      <target chassis=3D'4' port=3D'0x13'/>
      <alias name=3D'pci.4'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x02'
function=3D'0x3'/>
    </controller>
    <controller type=3D'virtio-serial' index=3D'0'>
      <alias name=3D'virtio-serial0'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x02' slot=3D'0x00'
function=3D'0x0'/>
    </controller>
    <controller type=3D'sata' index=3D'0'>
      <alias name=3D'ide'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x1f'
function=3D'0x2'/>
    </controller>
    <controller type=3D'usb' index=3D'0' model=3D'ich9-ehci1'>
      <alias name=3D'usb'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x07'
function=3D'0x7'/>
    </controller>
    <controller type=3D'usb' index=3D'0' model=3D'ich9-uhci1'>
      <alias name=3D'usb'/>
      <master startport=3D'0'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x07' fu=
nction=3D'0x0'
multifunction=3D'on'/>
    </controller>
    <controller type=3D'usb' index=3D'0' model=3D'ich9-uhci2'>
      <alias name=3D'usb'/>
      <master startport=3D'2'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x07'
function=3D'0x1'/>
    </controller>
    <controller type=3D'usb' index=3D'0' model=3D'ich9-uhci3'>
      <alias name=3D'usb'/>
      <master startport=3D'4'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x07'
function=3D'0x2'/>
    </controller>
    <interface type=3D'bridge'>
      <mac address=3D'52:54:00:bc:6a:0e'/>
      <source bridge=3D'br0'/>
      <target dev=3D'vnet1'/>
      <model type=3D'e1000'/>
      <alias name=3D'net0'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x01' slot=3D'0x00'
function=3D'0x0'/>
    </interface>
    <serial type=3D'pty'>
      <source path=3D'/dev/pts/1'/>
      <target type=3D'isa-serial' port=3D'0'>
        <model name=3D'isa-serial'/>
      </target>
      <alias name=3D'serial0'/>
    </serial>
    <console type=3D'pty' tty=3D'/dev/pts/1'>
      <source path=3D'/dev/pts/1'/>
      <target type=3D'serial' port=3D'0'/>
      <alias name=3D'serial0'/>
    </console>
    <channel type=3D'unix'>
      <source mode=3D'bind'
path=3D'/var/lib/libvirt/qemu/channel/target/domain-21-cylon20/org.qemu.gue=
st_agent.0'/>
      <target type=3D'virtio' name=3D'org.qemu.guest_agent.0'
state=3D'disconnected'/>
      <alias name=3D'channel0'/>
      <address type=3D'virtio-serial' controller=3D'0' bus=3D'0' port=3D'1'=
/>
    </channel>
    <input type=3D'tablet' bus=3D'usb'>
      <alias name=3D'input0'/>
      <address type=3D'usb' bus=3D'0' port=3D'1'/>
    </input>
    <input type=3D'mouse' bus=3D'ps2'>
      <alias name=3D'input1'/>
    </input>
    <input type=3D'keyboard' bus=3D'ps2'>
      <alias name=3D'input2'/>
    </input>
    <graphics type=3D'vnc' port=3D'5901' autoport=3D'yes' websocket=3D'5701'
listen=3D'0.0.0.0' keymap=3D'en-us'>
      <listen type=3D'address' address=3D'0.0.0.0'/>
    </graphics>
    <video>
      <model type=3D'qxl' ram=3D'65536' vram=3D'65536' vgamem=3D'16384' hea=
ds=3D'1'
primary=3D'yes'/>
      <alias name=3D'video0'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x01'
function=3D'0x0'/>
    </video>
    <memballoon model=3D'virtio'>
      <alias name=3D'balloon0'/>
      <address type=3D'pci' domain=3D'0x0000' bus=3D'0x03' slot=3D'0x00'
function=3D'0x0'/>
    </memballoon>
  </devices>
  <seclabel type=3D'dynamic' model=3D'dac' relabel=3D'yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>
+++++++++++++++++++++++++++++++++++++++
-uuid 522c2643-079b-7464-7120-70fdc2f7ec57 \
-no-user-config \
-nodefaults \
-chardev socket,id=3Dcharmonitor,fd=3D37,server,nowait \
-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \
-rtc base=3Dutc,driftfix=3Dslew \
-global kvm-pit.lost_tick_policy=3Ddelay \
-no-hpet \
-no-shutdown \
-boot strict=3Don \
-device
pcie-root-port,port=3D0x10,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multifunctio=
n=3Don,addr=3D0x2
\
-device pcie-root-port,port=3D0x11,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr=
=3D0x2.0x1 \
-device pcie-root-port,port=3D0x12,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr=
=3D0x2.0x2 \
-device pcie-root-port,port=3D0x13,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,addr=
=3D0x2.0x3 \
-device ich9-usb-ehci1,id=3Dusb,bus=3Dpcie.0,addr=3D0x7.0x7 \
-device
ich9-usb-uhci1,masterbus=3Dusb.0,firstport=3D0,bus=3Dpcie.0,multifunction=
=3Don,addr=3D0x7
\
-device ich9-usb-uhci2,masterbus=3Dusb.0,firstport=3D2,bus=3Dpcie.0,addr=3D=
0x7.0x1 \
-device ich9-usb-uhci3,masterbus=3Dusb.0,firstport=3D4,bus=3Dpcie.0,addr=3D=
0x7.0x2 \
-device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.2,addr=3D0x0 \
-drive
file=3D/mnt/user/isos/FreeBSD-11.3-RELEASE-amd64-dvd1.iso,format=3Draw,if=
=3Dnone,id=3Ddrive-sata0-0-0,readonly=3Don
\
-device ide-cd,bus=3Dide.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,bootindex=
=3D2 \
-drive
file=3D/mnt/user/domains/cylon20/vdisk1.img,format=3Draw,if=3Dnone,id=3Ddri=
ve-sata0-0-2,cache=3Dwriteback
\
-device
ide-hd,bus=3Dide.2,drive=3Ddrive-sata0-0-2,id=3Dsata0-0-2,bootindex=3D1,wri=
te-cache=3Don
\
-netdev tap,fd=3D41,id=3Dhostnet0 \
-device e1000,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:bc:6a:0e,bus=3Dpci=
.1,addr=3D0x0
\
-chardev pty,id=3Dcharserial0 \
-device isa-serial,chardev=3Dcharserial0,id=3Dserial0 \
-chardev socket,id=3Dcharchannel0,fd=3D42,server,nowait \
-device
virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel0,id=3Dch=
annel0,name=3Dorg.qemu.guest_agent.0
\
-device usb-tablet,id=3Dinput0,bus=3Dusb.0,port=3D1 \
-vnc 0.0.0.0:1,websocket=3D5701 \
-k en-us \
-device
qxl-vga,id=3Dvideo0,ram_size=3D67108864,vram_size=3D67108864,vram64_size_mb=
=3D0,vgamem_mb=3D16,max_outputs=3D1,bus=3Dpcie.0,addr=3D0x1
\
-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.3,addr=3D0x0 \
-sandbox
on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resourcecontrol=3D=
deny \
-msg timestamp=3Do
+++++++++++++++++++++++++++++++++++++++

pciconf does not show any intel NIC device detected. (same with passed thro=
ugh
Intel NIC).=20

When I compile 11.3 kernel without NETMAP, I see NIC interface detected as
"none2@pci0:1:0:0", but still does  not work. (see attached)

See DMESG output screenshots. "em0: Unable to allocate bus resource: interr=
upt"

***************************************

Okay, I fail at adding attachments...

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241774-27103-2BkZnI5yon>