-
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/arm64: Firecracker support on arm64 #989
Conversation
plat/kvm/arm/firecracker_bpt64.S
Outdated
|
||
/* ------------------- Memory Map of Firecracker on Arm64 ----------------- | ||
* | ||
* 0x0000000000000000 - 0x0000000007ffffff Devices: 0 - 2GiB |
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.
2GiB should correspond to 0x000000007fffffff
instead of 0x0000000007fffff
.
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, fixed
72c063d
to
8d84cfb
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.
Minor repetitive comments for you to lose your sanity 🐕🦺.
plat/kvm/include/kvm-arm64/image.h
Outdated
@@ -6,7 +6,11 @@ | |||
#ifndef __KVM_ARM64_IMAGE_H__ | |||
#define __KVM_ARM64_IMAGE_H__ | |||
|
|||
#if defined(CONFIG_KVM_VMM_QEMU) |
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.
Now that Simon mentioned it. Maybe we can just go with #if
?
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 will fix thanks
plat/kvm/arm/qemu_bpt64.S
Outdated
|
||
#include <arm/arm64/pagetable.S> | ||
|
||
#include <arch/reloc.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.
I believe it should be uk/reloc.h
now
plat/kvm/arm/firecracker_bpt64.S
Outdated
ur_pte arm64_bpt_l2_pt511, PTE_TYPE_TABLE | ||
#else | ||
pte_zero , 1 | ||
#endif /* CONFIG_PAGING */ |
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.
!CONFIG_PAGING
plat/kvm/arm/firecracker_bpt64.S
Outdated
ur_pte arm64_bpt_l2_pt0, PTE_TYPE_TABLE | ||
ur_pte arm64_bpt_l2_pt1, PTE_TYPE_TABLE | ||
pte_zero , 509 | ||
#ifdef CONFIG_PAGING |
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.
Ditto for #if
plat/kvm/arm/firecracker_bpt64.S
Outdated
arm64_bpt_l2_pt1: | ||
pte_fill 0x0000008000000000, 512, 2, PTE_BLOCK_NORMAL_RW | ||
|
||
#ifdef CONFIG_PAGING |
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.
Ditto 🐦
plat/kvm/arm/qemu_bpt64.S
Outdated
ur_pte arm64_bpt_l2_pt511, PTE_TYPE_TABLE | ||
#else | ||
pte_zero , 1 | ||
#endif /* CONFIG_PAGING */ |
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.
!CONFIG_PAGING
plat/kvm/arm/qemu_bpt64.S
Outdated
pte_zero , 509 | ||
#ifdef CONFIG_PAGING | ||
ur_pte arm64_bpt_l2_pt511, PTE_TYPE_TABLE | ||
#else |
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.
/* CONFIG_PAGING */
🐶
plat/kvm/arm/firecracker_bpt64.S
Outdated
pte_zero , 509 | ||
#ifdef CONFIG_PAGING | ||
ur_pte arm64_bpt_l2_pt511, PTE_TYPE_TABLE | ||
#else |
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.
/* CONFIG_PAGING */
🦤
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.
Sorry meant with an !
of course 🤓 ☝️
EDIT: No, I am dumb it's fine 🤦♂️ 😆
plat/kvm/arm/qemu_bpt64.S
Outdated
arm64_bpt_l2_pt1: | ||
pte_fill 0x0000008000000000, 512, 2, PTE_BLOCK_DEVICE_nGnRE | ||
|
||
#ifdef CONFIG_PAGING |
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.
Ditto for #if
plat/kvm/arm/qemu_bpt64.S
Outdated
ur_pte arm64_bpt_l2_pt0, PTE_TYPE_TABLE | ||
ur_pte arm64_bpt_l2_pt1, PTE_TYPE_TABLE | ||
pte_zero , 509 | ||
#ifdef CONFIG_PAGING |
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.
Ditto 🦜
a236474
to
79d924c
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.
FC, meet the superior architecture! 💪
Reviewed-by: Sergiu Moga sergiu@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
The memory map of Firecracker on Arm64 is: 0x0000000000000000 - 0x000000007fffffff Devices: 0 - 2GiB 0x0000000080000000 - 0x000000ffffffffff DRAM: 2GiB - 1024GiB https://github.com/firecracker-microvm/firecracker 441fc98a src/vmm/src/arch/aarch64/layout.rs Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
79d924c
to
a24c625
Compare
Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Sergiu Moga <sergiu@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #989
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
arm_64
]kvm
]Additional configuration
Enables using
CONFIG_KVM_VMM_FIRECRACKER
onarm64
.Description of changes
This PR enables Firecracker support on
arm64
. It introduces a set of boot pagetables for Firecracker and updatesConfig.uk
to allow usingCONFIG_KVM_VMM_FIRECRACER
onarm64
. Remaining work such as the linux boot probotol on arm64 and ns16550 are handled on depending PRs.GitHub-Depends-On: #988
GitHub-Depends-On: #986
GitHub-Depends-On: #985
GitHub-Depends-On: #912