vbox6: silence stack-size limit warning

Our stack slots are 1M per thread including room for metadata.
Therefore, this patch reduces the stack demand of EMT threads to
1M - 16K.
This commit is contained in:
Christian Helmuth 2023-09-25 17:15:22 +02:00
parent a7a7c56ad6
commit c6881a8126
3 changed files with 15 additions and 1 deletions

View File

@ -1 +1 @@
d57e9deed61e070270fa153e610e3081f996ee24
a1376cc9dbcced9ff29f37da20ddc54363e24f3d

View File

@ -13,3 +13,4 @@ gcc-12.patch
pgmphys.patch
sup_ioctl_query_func_size.patch
disk_geometry.patch
stack_size.patch

View File

@ -0,0 +1,13 @@
Limit EMT stack size to prevent warning.
--- a/src/virtualbox6/src/VBox/VMM/VMMR3/VM.cpp
+++ b/src/virtualbox6/src/VBox/VMM/VMMR3/VM.cpp
@@ -492,7 +492,7 @@
for (i = 0; i < cCpus; i++)
{
rc = RTThreadCreateF(&pUVM->aCpus[i].vm.s.ThreadEMT, vmR3EmulationThread, &pUVM->aCpus[i],
- _1M, RTTHREADTYPE_EMULATION,
+ _1M - _16K, RTTHREADTYPE_EMULATION,
RTTHREADFLAGS_WAITABLE | RTTHREADFLAGS_COM_MTA,
cCpus > 1 ? "EMT-%u" : "EMT", i);
if (RT_FAILURE(rc))