Function tdx_guest::tdcall::read_servetd
source · pub fn read_servetd(
binding_handle: u64,
field_identifier: u64,
uuid: [u64; 4],
) -> Result<(u64, u64, [u64; 4]), TdCallError>
Expand description
As a service TD, read a metadata field (control structure field) of a target TD.
Inputs:
- binding_handle: the binding handle of the target TD.
- field_identifier: the identifier of the field to read.
The
LAST_ELEMENT_IN_FIELD
andLAST_FIELD_IN_SEQUENCE
components of the field identifier must be 0.WRITE_MASK_VALID
,INC_SIZE
,CONTEXT_CODE
andELEMENT_SIZE_CODE
components of the field identifier are ignored. A value of -1 is a special case: it is not a valid field identifier; in this case the first readable field identifier is returned inRDX
. - uuid: the TD_UUID of the target TD, using little-Endian.
Outputs:
- Next readable field identifier. A value of -1 indicates no next field identifier is available.
If the input field identifier was -1,
RDX
returns the first readable field identifier. In case of another error,RDX
returns -1. - Contents of the field. In case of an error, as indicated by
RAX
,R8
returns 0. - Updated target TD’s TD_UUID, using little-Endian.