[Bug 274389] bhyve in 15-CURRENT unable to boot OpenBSD anymore

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 10 Oct 2023 01:13:25 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274389

            Bug ID: 274389
           Summary: bhyve in 15-CURRENT unable to boot OpenBSD anymore
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: jailbird@fdf.net

I've been using this script to run an OpenBSD VM ever since bhyve landed:

#!/bin/sh
RAM=1G
VM=vpn
VMROOT=/usr/local/vm
CPUS=2

bhyvectl --vm=${VM} --destroy > /dev/null 2>&1
while [ 1 ]; do
        bhyve -A -D -H -P -w -S -u -c ${CPUS} -m ${RAM} \
-s 0,amd_hostbridge \
-s 3,virtio-blk,/dev/zvol/tank/vm/${VM} \
-s 10,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
-s 20,virtio-rnd \
-s 31,lpc \
-l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd ${VM}
        bhyve_exit=$?
        if [ $bhyve_exit -ne 0 ]; then
                break
        fi
done

case $bhyve_exit in
        0|1|2)
                bhyvectl --vm=${VM} --destroy > /dev/null 2>&1
                ;;
esac

exit $bhyve_exit


This has worked up until about a month ago. Now the VM throws "io address
conflict" and "can't map i/o space" errors. Adding -W and/or -x doesn't help,
and adding -Y causes the boot loader to hang.

This is what happens now:

probing: pc0 com0 com1 mem[640K 1000M 16M 3M]
disk: hd0
>> OpenBSD/amd64 BOOTX64 3.65
switching console to com0
>> OpenBSD/amd64 BOOTX64 3.65
boot>
NOTE: random seed is being reused.
booting hd0a:/bsd: 17233228+4138000+368672+0+1241088
[1360125+128+1320504+1012965]=0x19730a0
entry point at 0x1001000
[ using 3694752 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.3-current (GENERIC.MP) #1358: Thu Aug 31 09:39:50 MDT 2023
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1032982528 (985MB)
avail mem = 981991424 (936MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x3fbcf000 (11 entries)
bios0: vendor BHYVE version "14.0" date 10/17/2021
bios0: FreeBSD BHYVE
efi0 at bios0: UEFI 2.7
efi0: BHYVE rev 0x10000
acpi0 at bios0: ACPI 5.1
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC HPET MCFG SPCR
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz, 2397.78 MHz, 06-3f-02
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,FMA3,CX16,xTPR,PCID,DCA,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MD_CLEAR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line
8-way L2 cache, 20MB 64b/line 20-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 134MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz, 2397.67 MHz, 06-3f-02
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,FMA3,CX16,xTPR,PCID,DCA,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MD_CLEAR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line
8-way L2 cache, 20MB 64b/line 20-way L3 cache
cpu1: smt 0, core 0, package 1
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 32 pins
acpihpet0 at acpi0: 16777216 Hz
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PC00)
acpipci0 at acpi0 PC00
com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at acpi0 COM2 addr 0x2f8/0x8 irq 3: ns16550a, 16 byte fifo
com2 at acpi0 COM3 addr 0x3e8/0x8 irq 4: ns16550a, 16 byte fifo
com3 at acpi0 COM4 addr 0x2e8/0x8 irq 3: ns16550a, 16 byte fifo
acpicmos0 at acpi0
"Bhyve_V_Gen_Counter_V1" at acpi0 not configured
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: bhyve
pci0 at mainbus0 bus 0
0:3:0: io address conflict 0xc000/0x80
0:10:0: io address conflict 0xc080/0x40
0:20:0: io address conflict 0xc0c0/0x20
pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432 rev 0x00
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00virtio0:
can't map i/o space
: Cannot attach (5)
virtio1 at pci0 dev 10 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio1: address 1e:17:37:23:2f:cb
virtio1: msix per-VQ
virtio2 at pci0 dev 20 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio2
virtio2: msix per-VQ
pcib0 at pci0 dev 31 function 0 "Intel 82371SB ISA" rev 0x00
isa0 at pcib0
isadma0 at isa0
efifb at mainbus0 not configured
vm_run error -1, errno 5

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