Solved sysctl: unknown oid 'hw.vmm.topology.cores_per_package' at line 10

Hello.

After *years* of trying and questions asked,I've been able to fix error 12 and error 43 in Windows when I do the passthru of my RTX 2080 ti to a Windows 10-11 vm. I found a version of bhyve that just works from a random guy on Reddit and it worked even for me. What I've realized as soon as I went into the system properties of Windows is that it uses 2 cpu,even if I have declared 8 cpu between the bhyve parameters (2x2x2),like this :

Code:
bhyve -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \
-s 0,hostbridge \
-s 1,ahci-hd,/mnt/$vmdisk0'p2'/bhyve/img/Windows/Windows10-ltsc.img \
-s 4,ahci-hd,/dev/$vmdisk5 \
-s 8:0,passthru,2/0/0 \
-s 8:1,passthru,2/0/1 \
-s 8:2,passthru,2/0/2 \
-s 8:3,passthru,2/0/3 \
-s 13,virtio-net,tap17 \
-s 29,fbuf,tcp=0.0.0.0:5917,w=1600,h=950,wait \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \
vm0:17 < /dev/null & sleep 2 && vncviewer 0:17

Take in consideration that my PC has a total of 16 cpus available :

Code:
# sysctl hw.ncpu
hw.ncpu: 16

I've read that I can increase the cores that Windows can use by declaring these parameters inside the file /etc/sysctl.conf. For example,I could do :

Code:
hw.vmm.topology.cores_per_package=6
hw.vmm.topology.threads_per_core=2

Unfortunately those parameters aren't accepted on FreeBSD 14 :

Code:
sysctl: unknown oid 'hw.vmm.topology.cores_per_package' at line 10
sysctl: unknown oid 'hw.vmm.topology.threads_per_core' at line 11

if they are deprecated,what are the parameters that can be used to increase the Windows cpus ? I see only 2 cpus in Windows.
 
The syntax is:
bhyve -c <number of CPUs> [additional options]

From bhyve() manual:

SYNOPSIS
bhyve [-AaCDeHhPSuWwxY]
[-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]

In your case it should be
Code:
bhyve -c 8,sockets=2,cores=2,threads=2

Can you link me to that version of bhyve that resolves error 43 and code 12?

Thank you for you posts over the years all over the internet as I managed to passthrough my AMD RX6600 but I didn't resolve error 43, I just bypassed it with script that enables/disables GPU in windows on login/shutdown, code 12 was resolved with disabling BIOS setting above 4g decode and resizable BAR.
 
yes. So hard to find that it stopped working on my FreeBSD 14.0 p6 / ZFS system. It does not work anymore. I don't know why. But it still works on my secondary system. It is another 14.0 p6 system,but installed on the UFS disk. Anyway. I didn't nothing special. I'm using the bhyve executable shipped by the version of FreeBSD that I'm using.

I'm trying to contact some bhyve developer that wants to gather some informations about my system with the aim to understand why sometimes it works,but no one is replying to me.
 
So... I should compare the systems to see which differences there are because I want to understand why it does work on the system B but not in the A. Curiosity killed the cat.
 
Back
Top