Function sbi_rt::nacl_sync_sret
source · pub fn nacl_sync_sret() -> SbiRet
Expand description
Synchronize CSRs and HFENCEs in the NACL shared memory and emulate the SRET instruction.
This is an optional function that is only available if the SBI_NACL_FEAT_SYNC_SRET feature is available.
This function is used by supervisor software (or L1 hypervisor) to do a synchronizing SRET request, and the SBI implementation (or L0 hypervisor) MUST handle it.
§Return value
This function does not return upon success, and the possible error codes
returned in SbiRet.error
upon failure are shown in the table below:
Error code | Description |
---|---|
SbiRet::no_shmem() | Nested acceleration shared memory not available. |
SbiRet::not_supported() | SBI_NACL_FEAT_SYNC_SRET feature is not available. |
This function is defined in RISC-V SBI Specification chapter 15.9.