-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(doc): add guest configuration to bao-classic config documentation #78
base: wip/bao-classic_config
Are you sure you want to change the base?
feat(doc): add guest configuration to bao-classic config documentation #78
Conversation
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
f80f24e
to
77c4429
Compare
I think @DavidMCerdeira should also participate in these reviews... |
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 think we need a few iterations on this one. And possibly discuss an alternative structure where we go into details and have text explaining the features and functionalities, while here we only go field by field as you did.
source/bao_hyp/img/cpu-affinity.svg
Outdated
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.
The cpu affinities in the image are wrong. For example, it should be 0x1
or 0b0001
for VM 0.
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 in bae0e3311ec85b598de114a3e05260ba4d109151.
source/bao_hyp/config.rst
Outdated
:name: guest-config-fig | ||
|
||
|
||
The configuration of different guests is done by populating a struct called *vmconfig*, as follows: |
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.
Maybe here we could add a reference the vmlist referenced in the first part of the document, saying that each entry in that list is a vm_config struct...
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 in 923bbca5719fda58025bfc192b7461efa1d1a1c4.
source/bao_hyp/config.rst
Outdated
.. code-block:: c | ||
|
||
struct vm_config { | ||
struct image; |
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.
This is not correct. I know that the structure used for the image is an anonymous structure, but maybe we can change this is to:
struct image; | |
struct vm_image image; |
(both here and in the code)
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 in fadc7a2bb90adc5f6d6fd4eebad36337f2748c39.
source/bao_hyp/config.rst
Outdated
- **load_addr** [mandatory] - corresponds to the ``image`` load address in the hypervisor address | ||
space. This value can be defined using the macro VM_IMAGE_OFFSET(img_name); |
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.
- **load_addr** [mandatory] - corresponds to the ``image`` load address in the hypervisor address | |
space. This value can be defined using the macro VM_IMAGE_OFFSET(img_name); | |
- **load_addr** [mandatory] - corresponds to the ``image`` load address in physical memory/physical address space. This value can be defined using the macro VM_IMAGE_OFFSET(img_name); |
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.
Also, we need to explain that, if separately loaded is set to false, the hypervisor initially interprets this as the offset of the builtin image guest in its own image (hence, VM_IMAGE_OFFSET). At runtime, it fixes the value to be later interpreted as a physical address, by adding to it the address the hypervisor was loaded.
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 in 4b057cd.
source/bao_hyp/config.rst
Outdated
- **size** [mandatory] - corresponds to the image size. This value can be defined using the macro | ||
VM_IMAGE_SIZE(img_name); |
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.
- **size** [mandatory] - corresponds to the image size. This value can be defined using the macro | |
VM_IMAGE_SIZE(img_name); | |
- **size** [mandatory] - corresponds to the image size. For builtin images declared using `VM_IMAGE`, this value can be defined using the macro VM_IMAGE_SIZE(img_name); |
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 in dde0f11fddf139eee0aa33223d587b912c60aecd.
source/bao_hyp/config.rst
Outdated
- **base** [mandatory] - corresponds to the virtual base address of the IPC memory region; | ||
- **size** [mandatory] - corresponds to the size of the IPC memory region; |
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.
Again, it is mandatory for base and size to be aligned to the architecture's smallest page size: in all architectures 4K for MMU systems and 64 bytes for MPU.
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.
Thanls, fixed in 404de5a.
source/bao_hyp/config.rst
Outdated
3. Inter-Process Communication (IPC) | ||
#################################### | ||
.. _Inter-Process Communication (IPC): |
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.
We need to explain somewhere how the IPC works 🤔
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.
Agree, included new content in 854fe14.
source/bao_hyp/config.rst
Outdated
- **va** [mandatory] - corresponds to the base virtual address of the device; | ||
- **size** [mandatory] - corresponds to the size of the device memory region; |
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.
Again, explain that it is mandatory for base and size to be aligned to the architecture's smallest page size: in all architectures 4K for MMU systems and 64 bytes for MPU.
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, addressed in ae5a5bd.
source/bao_hyp/config.rst
Outdated
the VM. By default, ``interrupt_num`` equals to 0; | ||
- **interrupts** [mandatory if *interrupt_num*>0] - defines a list of interrupt IDs generated by | ||
the device - ``(irqid_t[]) {irq_1, ..., irq_n};`` | ||
- **id** [optional] - corresponds to the bus master id for iommu effects: |
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.
Which should also add more explanation to this, possibly on a per-platform basis.
- **cpu_affinity** [optional] - corresponds to a bitmap signaling the preferred physical CPUs | ||
assigned to the VM. If this value is mutually exclusive for all the VMs, the physical CPUs | ||
assigned to each VM follow the bitmap. Otherwise (in case of bit overlap or lack of affinity | ||
definition), the CPU assignment is defined by the hypervisor; |
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.
the cpu affinity will be as best as possible be followed, but it is not guaranteed.
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, added this information!
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo21Costa <diogoandreveigacosta@gmail.com>
8b6eb3b
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
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 to me.
Only thing missing is re-writing the history which should be done after addressing all pending conversations
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.
Apart from minor issues easily solved, it looks very good to me! Great work Diogo.
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
|
||
6. Architectural-Specific Configurations | ||
.. note:: |
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.
Add a second note that we shouldn't add the gic to these devices.
A scenario would be where we want to give a large portion of the MMIO, and that MMIO range contains the GIC. In this case we need to split the MMIO range in two creating a hole for the gic.
PR Description
In this pull request, I'm adding content to the "Guest Configuration" section of the config documentation for the Bao hypervisor.
The focus here is to provide a comprehensive description for each field, offering detailed insights into their functionalities.
Do you have any suggestions or feedback concerning the content provided in the "Guest Configuration" section?