Multiple ARM VMs with different CAmkES component configurations
Hi, I am currently performing research for my master thesis which involves seL4 and ideally retrofitting a SDN controller application for it. As a part of retrofitting applications for seL4 the suggested way is the incremental cyber retrofit approach wich involves dividing subsystems of the application onto several VMs that each runs in a VMM. Therefore I was wondering if it is currently possible to run several VMs on the ARM architecture that has different component configurations in CAmkES? (ARM is mostly preferable for the simple simulation in QEMU when building for qemu-arm-virt, so switching architecture is an option if this is not achievable) I noted that the macros for VMs on x86 and ARM were different when defining components: x86: /* VM and per VM componenents */ #define VM_PER_VM_COMPONENTS(num) \ component Init##num vm##num; \ /**/ ARM: #define VM_COMPONENT_DEF(num) \ component VM vm##num; \ And to clarify using the vm-examples where in the optiplex9020.camkes there are two VMs that are configured differently: component Init0 { dataport Buf(STRING_REVERSE_BUFSIZE) dp1; dataport Buf(STRING_REVERSE_BUFSIZE) dp2; emits Ready ready; consumes Done done; has mutex cross_vm_event_mutex; VM_INIT_DEF() } component Init1 { VM_INIT_DEF() } But in the ARM vm_multi.camkes there is only one VM component that is used for all three VMs: component VM { VM_INIT_DEF() maybe uses VirtQueueDev recv1; maybe uses VirtQueueDrv send1; maybe uses VirtQueueDev recv2; maybe uses VirtQueueDrv send2; attribute vswitch_mapping vswitch_layout[] = []; attribute string vswitch_mac_address = ""; } So it is at least it is not as simple as defining Init##num components for ARM since currently only one VM component is allowed in the macros. Do you have a recommended way that could achieve a CAmkES structure that allows for multiple differently configured VMs for ARM without altering the macros? If it is not possible at the time I assume that switching to x86 is the easiest alternative to achive this? Best regards, Olof
Hi Olof,
So it is at least it is not as simple as defining Init##num components for ARM since currently only one VM component is allowed in the macros.
Do you have a recommended way that could achieve a CAmkES structure that allows for multiple differently configured VMs for ARM without altering the macros? If it is not possible at the time I assume that switching to x86 is the easiest alternative to achive this?
The macros are there for convenience's sake and also to generalise things. Most of the VM applications that we have generally repeat the same things as there are specific attributes and interfaces that the (Arm) VMs require. However, it is definitely possible to have multiple differently configured VMs in the sense that each VM may have different extensions added but they each share the same subset of attributes and interfaces that are necessary. This will probably require more work in terms of build system hackery to direct specific files and libraries to the separate VM components as we don't have that sort of distinction at the moment in our sample VM applications. It may make sense to have each VM be a separate CAmkES component like the components in the 'global- components' folder/repository and then include them altogether in the final .camkes file like the vm_multi application. For your application's .camkes file, you can choose to use a subset of the macros and then handwrite the rest of the configuration needed for your purposes. Hope this helps, and feel free to shoot more questions. Also sorry it took so long. Regards, Damon
Hi Damon, Yeah, this helps a lot! I was just worried that there was some other limitation of the VMs that was not obvious and might have caused issues later on. The approach to use a subset and handwrite the rest seems like it would be the best. Thanks! Regards, Olof
participants (2)
-
Lee, Damon (Data61, Eveleigh)
-
Olof Holmberg