You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been mostly using the existing SBI error codes as defined in v1.0 of the spec, but the TEE API is much larger and more complex than any existing extension, and there are several cases where we're over-using e.g. INVALID_PARAM or INVALID_ADDRESS where we could be providing a more useful error code that would be more helpful while debugging.
Some possible examples of where we could do a better job:
OUT_OF_PAGES when the map_*_pages() calls fail due to being out page-table pages.
ALREADY_MAPPED or ALREADY_CONVERTED in the cases where a map or conversion operation (partially) specifies memory that was already mapped/converted.
error codes (e.g. NOT_RUNNABLE) to communicate that a vCPU or VM is not in the proper lifecycle state.
BUSY or IN_PROGRESS for operations that fail because it's already going on elsewhere, for example running a vCPU or initiating a fence.
UNSUPPORTED_PAGE_SIZE for operations that take page sizes and the requested page size isn't supported by the TSM
We've been mostly using the existing SBI error codes as defined in v1.0 of the spec, but the TEE API is much larger and more complex than any existing extension, and there are several cases where we're over-using e.g.
INVALID_PARAM
orINVALID_ADDRESS
where we could be providing a more useful error code that would be more helpful while debugging.Some possible examples of where we could do a better job:
OUT_OF_PAGES
when themap_*_pages()
calls fail due to being out page-table pages.ALREADY_MAPPED
orALREADY_CONVERTED
in the cases where a map or conversion operation (partially) specifies memory that was already mapped/converted.NOT_RUNNABLE
) to communicate that a vCPU or VM is not in the proper lifecycle state.BUSY
orIN_PROGRESS
for operations that fail because it's already going on elsewhere, for example running a vCPU or initiating a fence.UNSUPPORTED_PAGE_SIZE
for operations that take page sizes and the requested page size isn't supported by the TSMThis has been coming up a bunch in the review of the spec doc at riscv-non-isa/riscv-ap-tee#5.
cc @rsahita @atulkharerivos @atishp04
The text was updated successfully, but these errors were encountered: