Lines 1-7
Link Here
|
1 |
--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2016-07-18 11:56:20 UTC |
1 |
--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2018-02-26 16:03:24 UTC |
2 |
+++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c |
2 |
+++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c |
3 |
@@ -541,8 +541,7 @@ bool VBOXCALL supdrvOSGetForcedAsyncTsc |
3 |
@@ -44,6 +44,7 @@ |
|
|
4 |
#include <sys/fcntl.h> |
5 |
#include <sys/conf.h> |
6 |
#include <sys/uio.h> |
7 |
+#include <sys/smp.h> /* mp_maxcpus */ |
4 |
|
8 |
|
|
|
9 |
#include "../SUPDrvInternal.h" |
10 |
#include <VBox/version.h> |
11 |
@@ -140,6 +141,14 @@ static SUPDRVDEVEXT g_VBoxDrvFre |
12 |
static int VBoxDrvFreeBSDModuleEvent(struct module *pMod, int enmEventType, void *pvArg) |
13 |
{ |
14 |
int rc; |
15 |
+ |
16 |
+ /* Refuse to load if mp_maxcpus is wrong */ |
17 |
+ if (MAXCPU != mp_maxcpus) { |
18 |
+ printf("vboxdrv: MAXCPU != mp_maxcpus (%d != %d)\n", |
19 |
+ MAXCPU, mp_maxcpus); |
20 |
+ return EINVAL; |
21 |
+ } |
22 |
+ |
23 |
switch (enmEventType) |
24 |
{ |
25 |
case MOD_LOAD: |
26 |
@@ -541,8 +550,7 @@ bool VBOXCALL supdrvOSGetForcedAsyncTsc |
27 |
|
5 |
bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) |
28 |
bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) |
6 |
{ |
29 |
{ |
7 |
- /** @todo verify this. */ |
30 |
- /** @todo verify this. */ |