Skip to main content

tdcall_vm_wr

Function tdcall_vm_wr 

Source
pub fn tdcall_vm_wr(
    call: &mut impl Tdcall,
    field_code: TdxExtendedFieldCode,
    value: u64,
    mask: u64,
) -> Result<u64, TdCallResult>
Expand description

Issue a TDG.VM.WR call to write a TD-scope metadata field (e.g. TD_CTLS).

field_code is the field code to use for the call.

value is the value to set, with mask being the mask controlling which bits will be set from value, as specified by the TDX API.

Returns the old value of the field.