-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ARM64 MMU fixes #72706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARM64 MMU fixes #72706
Conversation
Existing code confused table usage and table reference counts together. This obviously doesn't work. A table with one reference to it and one populated PTE is not the same as a table with 2 references to it and no PTe in use. So split the two concepts and adjust the code accordingly. A page needs to have its PTE usage count drop to zero before the last reference is released. When both counts are 0 then the page is free. Signed-off-by: Nicolas Pitre <[email protected]>
91d2f9c to
452be2a
Compare
This code was never formally tested before... and without the preceding commit it obviously didn't work either. Signed-off-by: Nicolas Pitre <[email protected]>
|
@npitre this f7e1164 is now causing a test to fail in main:
|
|
It is probably worth it adding qemu_cortex_a53 as an integration platform in the test. |
|
It seems the PTE is of value zero. So this is the case of table being referenced but PTE not in use (as described in the commit message for usage count change). If a test for invalid PTE is added before the assert to continue, the test passed. Though I am not sure if that is the correct fix. |
|
Needed fix in #74269 |
Looking at my own code I couldn't convince myself it was OK.
So I wrote a test and guess what? The code was broken... of course.
Here's the fix which required a slight rethinking of the page table
usage tracking. And more tests.