-
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
plat/kvm: Align the bootstack base address #1047
plat/kvm: Align the bootstack base address #1047
Conversation
3c49812
to
f23e141
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.
Thank you for making these changes 🙏! One minor comment.
plat/kvm/arm/entry64.S
Outdated
@@ -40,6 +40,7 @@ | |||
* paging_init (it invalidates our stack) | |||
*/ | |||
.section .bss | |||
.align 16 |
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 that, unlike x86, we do not have an explicit aligning of the stack like the andq $~0xf, %rsp
. Would it be worth adding this to ARM as well, just to double make sure.
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.
Based on offline discussion, updated PR to:
- Remove changes in x86_64, the alignment is enforced there on runtime already
- Update arm64 to enforce alignment on runtime too
f23e141
to
ab3eda0
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.
I do not like how this is inconsistent with x86, as there is no __STACK_ALIGN_SIZE
, but, alas, this is getting out of scope and will maybe be addressed by plat re-arch, hopefully.
Reviewed-by: Sergiu Moga sergiu@unikraft.io
Agreed. In fact I didn't like the |
ab3eda0
to
a00a380
Compare
280c695 introduces a regression to the alignment of the bootstack. Update __libkvmplat_entry to enforce the correct alignment before assigning to the sp. Signed-off-by: Michalis Pappas <michalis@unikraft.io>
a00a380
to
be5b0b5
Compare
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
Signed-off-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
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
arm64
,x86_64
]kvm
]app-python3
or N/A]Additional configuration
Description of changes
The base address of the stack must be 16-byte aligned on both arm64 and x86_64. Fix the alignent where this is currently missing.