You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.
mpool_locks_enabled begin with false initially, It is set to true only after Hafnium's own stage-1 page table is intialized.
/* Enable locks now that mm is initialised. */
dlog_enable_lock();
mpool_enable_locks();
According to the comment, it appears that the author thought lock should be enabled because Hafnium's stage-1 page table is initialized. Stage-1 page table does not appear relevant. But, presence of multiple, competing threads should have triggered switching from false to true.
In the current code, there is only one thread available when one_time_init() is executed. Therefore, it should be safe to move both dlog_enable_lock() and mpool_enable_locks() to the end of one_time_init(), where TLB invalidation is turned on.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
mpool_locks_enabled begin with false initially, It is set to true only after Hafnium's own stage-1 page table is intialized.
/* Enable locks now that mm is initialised. */
dlog_enable_lock();
mpool_enable_locks();
According to the comment, it appears that the author thought lock should be enabled because Hafnium's stage-1 page table is initialized. Stage-1 page table does not appear relevant. But, presence of multiple, competing threads should have triggered switching from false to true.
In the current code, there is only one thread available when one_time_init() is executed. Therefore, it should be safe to move both dlog_enable_lock() and mpool_enable_locks() to the end of one_time_init(), where TLB invalidation is turned on.
The text was updated successfully, but these errors were encountered: