bhyve bhyve can't passthru pci device into it

Raffeale

Active Member

Reaction score: 30
Messages: 190

Today, I installed win7 x64 in in bhyve, the system started okay, but mouse is not working (there is usb device hasn't been drived in the deivce mamanger). and network adapter can't access internet, so I want to passthru the wifi card to win7
I add pptdevs="2/0/0" into rc.conf
I run start.sh script to start bhyve
script:
bhyve -c 2 -m 4G -H -w -s 0,hostbridge -s 3,ahci-cd,./virtio.iso,sectorsize=512 -s 4,ahci-hd,win7.img,sectorsize=512 -s 5,virtio-net,tap10 -s 7,passthru,2/0/0 -s 29,fbuf,tcp=0.0.0.0:5900,wait -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd win7
I got these error message:
Code:
passthru requires guest memory wired.
device emulation initialization error , No such file or directory

I search a lot but no solution for that.

I have enable hw.vmm.admvi.enable=1
following is my part of dmesg
Code:
Jan 18 00:48:03 Raffeale kernel: AMD-Vi: IVRS Info VAsize = 64 PAsize = 48 GVAsize = 2 flags:0
Jan 18 00:48:03 Raffeale kernel: driver bug: Unable to set devclass (class: ppc devname: (unknown))
Jan 18 00:48:03 Raffeale kernel: ivhd0: <AMD-Vi/IOMMU ivhd with EFR> on acpi0
Jan 18 00:48:03 Raffeale kernel: ivhd0: Flag:b0<IotlbSup,Coherent>
Jan 18 00:48:03 Raffeale kernel: ivhd0: Features(type:0x11) MsiNumPPR = 0 PNBanks= 2 PNCounters= 0
Jan 18 00:48:03 Raffeale kernel: ivhd0: Extended features[31:0]:22294ada<PPRSup,NXSup,GTSup,IASup> HATS = 0x2 GATS = 0x0 GLXSup = 0x1 SmiFSup = 0x1 SmiFRC = 0x2 GAMSup = 0x1 DualPortLogSup = 0x2 DualEventLogSup = 0x2
Jan 18 00:48:03 Raffeale kernel: ivhd0: Extended features[62:32]:4f77ef<USSup> Max PASID: 0x2f DevTblSegSup = 0x3 MarcSup = 0x1
Jan 18 00:48:03 Raffeale kernel: ivhd0: supported paging level:7, will use only: 4
Jan 18 00:48:03 Raffeale kernel: ivhd0: device range: 0x0 - 0xffff
Jan 18 00:48:03 Raffeale kernel: ivhd0: PCI cap 0x190b640f@0x40 feature:19<IOTLB,EFR,CapExt>
Jan 18 00:48:03 Raffeale kernel: ivhd1: <AMD-Vi/IOMMU ivhd with EFR> on acpi0
Jan 18 00:48:03 Raffeale kernel: ivhd1: Flag:b0<IotlbSup,Coherent>
Jan 18 00:48:03 Raffeale kernel: ivhd1: Features(type:0x11) MsiNumPPR = 0 PNBanks= 2 PNCounters= 0
Jan 18 00:48:03 Raffeale kernel: ivhd1: Extended features[31:0]:22294ada<PPRSup,NXSup,GTSup,IASup> HATS = 0x2 GATS = 0x0 GLXSup = 0x1 SmiFSup = 0x1 SmiFRC = 0x2 GAMSup = 0x1 DualPortLogSup = 0x2 DualEventLogSup = 0x2
Jan 18 00:48:03 Raffeale kernel: ivhd1: Extended features[62:32]:4f77ef<USSup> Max PASID: 0x2f DevTblSegSup = 0x3 MarcSup = 0x1
Jan 18 00:48:03 Raffeale kernel: ivhd1: supported paging level:7, will use only: 4
Jan 18 00:48:03 Raffeale kernel: ivhd1: device range: 0x0 - 0xffff
Jan 18 00:48:03 Raffeale kernel: ivhd1: PCI cap 0x190b640f@0x40 feature:19<IOTLB,EFR,CapExt>
Jan 18 00:48:03 Raffeale kernel: __pm_runtime_resume not implemented -- see your local kernel hacker
Jan 18 00:48:03 Raffeale kernel: pm_runtime_mark_last_busy not implemented -- see your local kernel hacker
Jan 18 00:48:03 Raffeale kernel: __pm_runtime_suspend not implemented -- see your local kernel hacker
Jan 18 00:48:03 Raffeale kernel: __pm_runtime_resume not implemented -- see your local kernel hacker
Jan 18 00:48:03 Raffeale kernel: pm_runtime_mark_last_busy not implemented -- see your local kernel hacker
Jan 18 00:48:03 Raffeale kernel: __pm_runtime_suspend not implemented -- see your local kernel hacker
Jan 18 00:48:08 Raffeale kernel: re0: link state changed to UP

there is a error message about driver set devclass , i have no idea ,please help me! my cpu is Ryzen5 3500U and wifi is ac9250


I have already load vmm, if_bridge and virito kernel module
 

jmos

Active Member

Reaction score: 76
Messages: 103

i got these error message:
passthru requires guest memory wired.
Add the option "-S", and the guest memory is wired. But let me say: Win7 was the only OS I didn't use bhyve…
 
OP
R

Raffeale

Active Member

Reaction score: 30
Messages: 190

when I use -S option to script and run it,I got "unable to setup memory(17)"
 
OP
R

Raffeale

Active Member

Reaction score: 30
Messages: 190

it works, but when I passthrough wifi and ethernet card to it ,the ethernet card could use ,.device manager said wifi can't start .
 
OP
R

Raffeale

Active Member

Reaction score: 30
Messages: 190

when I open securelevel the passthrough is not work, it said /dev/pci permission denied
 
Top