Re: CURRENT: Operation not supported by device

From: Corvin Khne <corvink_at_FreeBSD.org>
Date: Wed, 29 Mar 2023 11:08:28 UTC
On Wed, 2023-03-29 at 12:44 +0200, Evilham wrote:
> Hello,
> 
> I've been using bhyve for a while now and in the past couple days 
> (though I'm not sure when it started, certainly less than two 
> weeks ago), I've been getting this message when trying to start a 
> VM on CURRENT:
> 
> # # This is after unloading vmm
> # sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d 
>   disk0.img test
> *** vmm.ko is not loaded
> # kldload vmm
> # sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d 
>   disk0.img test
> Launching virtual machine "test" ...
> device emulation initialization error: Operation not supported by 
> device
> # bhyvectl --vm=test --destroy
> # kldunload vmm
> 
> 
> FWIW, there have been no changes on the BIOS, as can be seen vmm 
> loads without issues or warnings.
> I usually use vm-bhyve, but was trying to discard that by going 
> back to the basics.
> 
> Would greatly appreciate pointers as to where to look in order to 
> be able to use bhyve again :-).
> 
> This is the CPU as reported on dmesg:
> 
> CPU: AMD Ryzen 7 PRO 2700U w/ Radeon Vega Mobile Gfx (2196.04-MHz 
> K8-class CPU)
>   Origin="AuthenticAMD"  Id=0x810f10  Family=0x17  Model=0x11 
>   Stepping=0
>  
> Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,
> PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>  
> Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,
> MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
>   AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
>   AMD 
>  
> Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,
> OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
>   Structured Extended 
>  
> Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFL
> USHOPT,SHA>
>   XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
>   AMD Extended Feature Extensions ID 
>   EBX=0x1007<CLZERO,IRPerf,XSaveErPtr,IBPB>
>   SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
>   TSC: P-state invariant, performance statistics
> 
> And on with sysctl dev.cpu.0 (there are 0-7 of these)
> dev.cpu.0.cx_method: C1/hlt C2/io
> dev.cpu.0.cx_usage_counters: 415801 517428
> dev.cpu.0.cx_usage: 44.55% 55.44% last 2765us
> dev.cpu.0.cx_lowest: C8
> dev.cpu.0.cx_supported: C1/1/1 C2/2/400
> dev.cpu.0.freq_levels: 2200/2681 1700/1615 1600/1460
> dev.cpu.0.freq: 2200
> dev.cpu.0.%parent: acpi0
> dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
> dev.cpu.0.%location: handle=\_PR_.C000
> dev.cpu.0.%driver: cpu
> dev.cpu.0.%desc: ACPI CPU
> 
> Thanks in advance for any pointers!
> --
> Evilham
> 

Hi Evilham,

I've already seen this issue on one of my AMD devices too. Could you
please test the following patch:
https://reviews.freebsd.org/D39310


-- 
Kind regards,
Corvin