-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add ukvmem
Aarch64
page fault handler
#908
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.
@mogasergiu only a few minor comments from me 👍🏼
In the titles of the commit messages we don't put the whole path, but rather a namespace identifier (when in doubt check the git history). In this case you can replace include/arch/arm/arm64
with arch/arm64
.
Also, if I'm not mistaken, you can remove the dependencies and rebase so that this can be merged.
@@ -104,6 +104,10 @@ struct ukarch_pagetable { | |||
#define PAGE_ATTR_SHAREABLE_IS (1 << PAGE_ATTR_SHAREABLE_SHIFT) | |||
#define PAGE_ATTR_SHAREABLE_OS (2 << PAGE_ATTR_SHAREABLE_SHIFT) | |||
|
|||
/* Page fault error code bits */ |
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.
We define the rest of ESR bits in arch.h
maybe you could move these for consistency there too
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.
Actually, I am not so sure, I now remember that the reason why I did this is because x86 also does this in arch/x86/x86_64/include/uk/asm/paging.h
.
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.
Yes, but in the scope of plat re-arch these will be moved into arch/
too.
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 understand. IMO this should still stay this way to be consistent with x86. When plat re-arch comes, I believe this migration should be all part of the same commit. Therefore, I would like to keep it like this for now, because there is going to be some time until plat re-arch comes around.
Hi, thanks a lot for taking a look :D. Unfortunately, this PR depends on #848, so that would probably need to be merged first :/. |
Implement `Add PT_Lx_PTE_SET_PADDR()`, which allows to set the physical address in a page table entry. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Define the bits required to tell whether a page fault was generated due to a read, write or execute action. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Implement the equivalent page fault intermediary handler of the x86 one, by using the `AArch64` specific equivalent bitfields to check for the type of the fault. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Since you cannot use `ukvmem` without the paging API's, it makes sense to add a dependency on the `CONFIG_PAGING` configuration entry. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
1225981
to
01603d2
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.
Reviewed-by: Michalis Pappas michalis@unikraft.io
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.
Approved-by: Razvan Deaconescu razvand@unikraft.io
Define the bits required to tell whether a page fault was generated due to a read, write or execute action. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com> Reviewed-by: Michalis Pappas <michalis@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #908
Implement the equivalent page fault intermediary handler of the x86 one, by using the `AArch64` specific equivalent bitfields to check for the type of the fault. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com> Reviewed-by: Michalis Pappas <michalis@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #908
Since you cannot use `ukvmem` without the paging API's, it makes sense to add a dependency on the `CONFIG_PAGING` configuration entry. Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com> Reviewed-by: Michalis Pappas <michalis@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #908
Prerequisite checklist
checkpatch.pl
on your commit series before opening this PR;Base target
arm64
kvm
Additional configuration
Description of changes
Add the required functionalities to implement a basic
ukvmem
page fault handler forAarch64
. This PR depends on #907 #772 #848 , therefore it includes them.NOTE
This is part of a larger set of Pull Requests. To make things easier and to ensure that things build as expected, it is recommended that testing is done based on #912, which includes everything. The splitting has been done to ease the review process.