-
Notifications
You must be signed in to change notification settings - Fork 44
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
svsm_paging: Ensure page alignment during invalidation #572
svsm_paging: Ensure page alignment during invalidation #572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why this change is needed. Question(s): Can it cause problems elsewhere when we only enforce the alignment at this one call-site? Or would it be better to align the addresses in the page_state_change()
platform call-backs?
Hi Joerg, I checked all of the call sites for |
Boot memory regions aren't always page-aligned. For example, kernel_fs_end cannot always be page-aligned because the size of the FS area has to match that of its original image exactly. Make sure the memory region always has a page-aligned size in invalidate_boot_memory_region(). The starting address is always checked during page invalidation so just assume the caller will do the right thing. Signed-off-by: Peter Fang <[email protected]>
492763b
to
369da23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good the me now.
Boot memory regions aren't always page-aligned. For example, kernel_fs_end cannot always be page-aligned because the size of the FS area has to match that of its original image exactly. Make sure the memory region always has a page-aligned size in
invalidate_boot_memory_region(). The starting address is always checked during page invalidation so just assume the caller will do the right thing.