[Bug 219913] emulators/virtualbox-ose-kmod: if the MAXCPU option is not the default for the running kernel, then 'kldload vboxdrv.ko' will result in a kernel panic

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 28 Jun 2024 18:32:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219913

Craig Leres <leres@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #244203|0                           |1
        is obsolete|                            |
 Attachment #244203|maintainer-approval?(vbox@F |
              Flags|reeBSD.org),                |
                   |maintainer-approval?(emulat |
                   |ion@FreeBSD.org)            |
 Attachment #251748|                            |maintainer-approval?(vbox@F
              Flags|                            |reeBSD.org)

--- Comment #9 from Craig Leres <leres@freebsd.org> ---
Created attachment 251748
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=251748&action=edit
patch

Here's an updated patch tested with 14.1-RELEASE-p1. I built a custom (amd64)
kernel with options MAXCPU=512 and verified it still works as intended:

    Jun 28 11:14:16 sea kernel: vboxdrv: MAXCPU != mp_maxcpus (1024 != 512)
    Jun 28 11:14:16 sea syslogd: last message repeated 1 times
    Jun 28 11:14:16 sea kernel: module_register_init: MOD_LOAD (vboxdrv,
0xffffffff8569f4f0, 0) error 22

I also tested the freebsd-built virtualbox-ose-kmod-6.1.50 package and when I
attempted to load that version of the module with my 512 cpu kernel it said:

    Jun 28 11:15:59 sea kernel: KLD vboxdrv.ko: depends on kernel - not
available or version mismatch

It gives the same error when I tried to load in (a) a custom kenrel with
MAXCPU=1024 (the default) and (b) the GENERIC 14.1-RELEASE (p0) kernel. At this
point it's not clear to me how to use this kernel module with any systems!

Here's a thread that appears relevant:

   
https://forums.freebsd.org/threads/virtualbox-kernel-module-fails-to-load-on-freebsd-13-1-release.85191/

-- 
You are receiving this mail because:
You are on the CC list for the bug.