dalmemail / haiku-nvmm

[GSoC 2024] Hardware virtualization for Haiku’s QEMU port
Other
4 stars 0 forks source link

Use NO_PRIVATE_MAP #20

Closed dalmemail closed 1 month ago

dalmemail commented 1 month ago

@waddlesplash said: "Are you sure? Don't we want NO_PRIVATE_MAP here as this is all shared memory?".

I switched to REGION_PRIVATE_MAP because REGION_NO_PRIVATE_MAP panics (_mutex_lock(): double lock, and a couple others I don't remember). Since I fixed a lot of stuff there I should check whether it keeps panicking (I expect so) or not. Also, I should re-read all that part of Haiku's vm code since I clearly don't fully understand the difference between REGION_PRIVATE_MAP and REGION_NO_PRIVATE_MAP.

waddlesplash commented 1 month ago

REGION_NO_PRIVATE_MAP is equivalent to mmap's MAP_SHARED flag, so you can read about what that means in mmap manpages. REGION_PRIVATE_MAP is the opposite, of course.