-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Hello everyone,
While working with the SVSM code base, I encountered a small but hard to debug (at least for me :)).
When mapping a memory region using PageTable::map_region_4k, setting the shared flag should allocate the resulting memory region as shared addresses. The function correctly sets the address bit to do that, but then calls PageTable::map_4k, which always forces a private page address. The 2m versions of these functions have the same issue.
Since both functions are public APIs, I am not sure if just removing the call to make_private_address in map_4k would be safe. I unfortunately could not get rust-analyzer to a point where it reliably reports symbol usage across the project. One way to address this would be to just inline the call to map_{4k,2m} in the respective map_region function.
Regards
Matthias