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: Migrate gic
to drivers/ukintctlr
#971
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.
Thanks for this, @rares-miculescu!
In order to remove the Draft
state, please follow the steps in the PR prerequisites checklist and mark them as done. Also, see my comments regarding the commits in this PR, they also apply here.
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 @rares-miculescu. Please sign-off you commits and add a /
at the end of directory names (i.e. plat/drivers/
).
158111a
to
75f678a
Compare
gic
from plat/drivers
to drivers
gic
to drivers/ukintctlr
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.
@rares-miculescu besides the comments below, there are many files that need their headers to be updated:
- drivers/ukrtc/pl031/pl031.c
- plat/common/arm/generic_timer.c
- plat/common/arm/lcpu.c
- plat/common/arm/time.c
- plat/common/arm/traps_arm64.c
- plat/common/platform_bus.c
- plat/drivers/virtio/virtio_mmio.c
In all these you need to update#include <gic/gic-v2.h>
to #include <uk/intctlr/gic-v2.h>
and so on.
Similarly in plat/kvm/arm/setup.c
:
diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c
index 452e35cf..bb60db6d 100644
--- a/plat/kvm/arm/setup.c
+++ b/plat/kvm/arm/setup.c
@@ -32,7 +32,7 @@
#include <uk/rtc/pl031.h>
#endif /* CONFIG_LIBUKRTC_PL031 */
#include <uk/assert.h>
-#include <kvm/intctrl.h>
+#include <uk/intctlr.h>
#include <arm/cpu.h>
#include <arm/arm64/cpu.h>
#include <arm/smccc.h>
In addition, please also add exportsyms.uk
in both the driver and the library.
67432d5
to
b3af473
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.
Hi @rares-miculescu just a few more changes, almost there!
Besides the comments below, please do:
- Rebase to
staging
- Add
exportsyms.uk
tolib/ukintctlr
. Except from the public functions, don't forget to add thegic
global that is defined inarch/arm/intctlr.c
- Enable
libukintctlr
for x86 inplat/kvm/Config.uk
:
diff --git a/plat/kvm/Config.uk b/plat/kvm/Config.uk
index 2c497c62..ffa2ced8 100644
--- a/plat/kvm/Config.uk
+++ b/plat/kvm/Config.uk
@@ -10,6 +10,7 @@ menuconfig PLAT_KVM
select ELF64_TO_32 if ARCH_X86_64
select LIBUKRELOC if OPTIMIZE_PIE
select LIBUKOFW if ARCH_ARM_64
+ select LIBUKINTCTLR if ARCH_X86_64
help
Create a Unikraft image that runs as a KVM guest
For ARCH_ARM_64
we don't need to do that, as we select that library from drivers/ukintctlr/gic/Config.uk
.
41ea3ce
to
9d2909b
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.
Looks good, thanks @rares-miculescu 👍🏼
The API still uses the old scheme (intctrl_
vs uk_intctlr
) but this is out of scope until we finalize how we handle commits that affect multiple libraries. Hopefully that will happen in the next maintanier's call.
Reviewed-by: Michalis Pappas michalis@unikraft.io
9d2909b
to
f3a7d80
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.
All good, thanks.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
Move the API from `plat/kvm/` into `lib/`. Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Migrate GIC to newly introduced drivers subsystem. Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Migrate GIC to newly introduced drivers subsystem. Signed-off-by: Rares Miculescu <miculescur@gmail.com>
f3a7d80
to
5f3c068
Compare
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
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
Migrate GIC to newly introduced drivers subsystem. Signed-off-by: Rares Miculescu <miculescur@gmail.com> Reviewed-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #971
Migrate GIC to newly introduced drivers subsystem. Signed-off-by: Rares Miculescu <miculescur@gmail.com> Reviewed-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #971
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Description of changes
GIC (Generic Interrupt Controller) is moved into
drivers/ukintctlr/
, and the API for the interrupt controller intollib/ukintctlr
.GitHub-Depends-On: #1023