bao-project / bao-hypervisor

Bao, a Lightweight Static Partitioning Hypervisor
Apache License 2.0
379 stars 128 forks source link

fix(armv8-r/mem): fix shareability memory flag to allow guests decide their cacheability attributes #130

Closed AfonsoSantos96 closed 6 months ago

AfonsoSantos96 commented 8 months ago

The shareability attributes impact the final cacheability attributes of a memory region. On a system with a 2-stage controlled MPU, this level configuration can limit the guest's configuration of its memory region. This way, the EL2 MPU should be permissive enough to allow the guest to decide the cacheability attributes in its memory regions. Previously, the EL2 was configuring the guest's shareability attributes as inner shareable, which limited the shareability attributes for the EL1 to only inner shareable or outer shareable. Changing the EL2 flag to non-shareable allows the guest to decide freely its shareability domain.