-
Notifications
You must be signed in to change notification settings - Fork 7
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
RFC: zephyr-dom0-xt: add possibility to use many domain configs #11
RFC: zephyr-dom0-xt: add possibility to use many domain configs #11
Conversation
Now the zephyr-dom0-xt supports only one guest domain cfg which is not useful if it's required to support many platforms and different configurations for guest domain for the same platform, like DomD and DomU. Add possibility to select which guest domain cfg source file to use at boot time basing on BOARD and user provided extension string which is selected by Kconfig options: CONFIG_USE_DEFAULT_DOM_CFG (default=y) - backward compatible behavior: use src/domd_cfg.c if CONFIG_USE_DEFAULT_DOM_CFG=n if DEFINED(CONFIG_DOM_CFG_BOARD_EXT) use src/dom_cfg/dom_cfg_${BOARD}_${CONFIG_DOM_CFG_BOARD_EXT}.c else() use src/dom_cfg/dom_cfg_${BOARD}.c For example, it'd allow to have: dom_cfg_rpi_5_xenvm.c dom_cfg_rpi_5_domd.c Signed-off-by: Grygorii Strashko <[email protected]>
Add sample configuartion for simple Zephyr xenvm guest dom_cfg_rpi_5_domu.c. Can be used with any Zephyr xenvm application without HW support: west build -b xenvm -p always samples/synchronization Signed-off-by: Grygorii Strashko <[email protected]>
Please ignore
This is a incomplete list of features that are present in linux-based Dom0 now. Of course we don't need to implement those features all at once. But the applications should be designed with those requirements in mind. This, for instance, means that we can't have one "rpi5_domd" configuration. Because even now it is 100% clear that we will have two RPI5-based products with different HW layout. I see it like this: this repo provides generic code, (maybe some configs, but as examples only). App is designed in a such way, that each product can provide own configuration files in some form (overlays/snippets, maybe?) to customize app behaviour for own needs. Now, as for configuration format... We need to discuss this further, but there are some points:
|
Add sample configuartion (dom_cfg_rpi_5_domd.c) for simple Zephyr xenvm guest with RPI 5 HW support. Only real GPIO HW "/soc/gpio@7d517c00" is supported which is passed through to guest domain. Shell be used only with Zephyr xenvm Blinky application: west build -b xenvm -p always -S rpi_5_xen_domd samples/basic/blinky Signed-off-by: Grygorii Strashko <[email protected]>
Logs are disabled now which is not what intended for testing and debuging application, hence enable them. Signed-off-by: Grygorii Strashko <[email protected]>
4a003db
to
9e37e97
Compare
We need t start from something, because now there is no simple way to test xenlib.
This PR solves items 3 and 4 from your list. For example (CONFIG_USE_DEFAULT_DOM_CFG=n):
For 4: different HW platform + different "products":
Next step is to satisfy:
For this, It would be the way to move forward with xen-troops/zephyr-xenlib#57 , but to even start testing it with zephyr-dom0-xt - It's required to manually modify it now, for me it's not suitable at all. Next step high priority steps:
Then and only then it would be possible to start doing other thing, as all devs will be on the same page and be using the same basic tool for xenlib features testing and integration. |
Just to clarify: does this imply that, say, |
If build system allows - nothing prevents to add them as Pre-build step. By default we could have simple Guest cfgs (like xenvm or linux) + rpi5. How do I see it ideally 1:
How do I see it Super ideally:
|
While starting working on RPI 5 Zephyr Dom0 I based on work from @xakep-amatop
'[email protected]:xakep-amatop/zephyr-dom0-xt.git' [1] which added placing and parsing of Guest domain configs from DT, but after working and playing with this for lats few week I come to the strong conclusion that this approach is not the way to move forward, because it introduces additional level of conversation from DT to C and duplicates cfg properties documentation (documented already in xen 'xl.cfg').
Lets consider adding new platform:
In my opinion, instead of pushing code in Zephyr it better to invest in simple tool to convert xl.cfg -> C domain cfg (in C code or binary form), this way simplify adding new platforms, while keeping Zephyr code straight and simple.
Ok, above is just introduction of why I decided to switch to: xen-troops/zephyr-dom0-xt.git which now has only one working branch 'wip_dom0-xt_qemu', but it has very limited functionality. One obvious thing missed is possibility to have and use different Guest Domains configuration for different platforms.
This PR is an attempt to resolve this problem (still only one Guest domain configuration is allowed):
[1] https://github.com/xen-troops/zephyr-dom0-xt/pull/9/files
TODO List: