Struct x86_64::registers::model_specific::Star[][src]

pub struct Star;
Expand description

Syscall Register: STAR

Implementations

Read the Ring 0 and Ring 3 segment bases. The remaining fields are ignored because they are not valid for long mode.

Returns

  • Field 1 (SYSRET): The CS selector is set to this field + 16. SS.Sel is set to this field + 8. Because SYSRET always returns to CPL 3, the RPL bits 1:0 should be initialized to 11b.
  • Field 2 (SYSCALL): This field is copied directly into CS.Sel. SS.Sel is set to this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits 33:32 should be initialized to 00b.

Read the Ring 0 and Ring 3 segment bases. Returns

  • CS Selector SYSRET
  • SS Selector SYSRET
  • CS Selector SYSCALL
  • SS Selector SYSCALL

Write the Ring 0 and Ring 3 segment bases. The remaining fields are ignored because they are not valid for long mode.

Parameters

  • sysret: The CS selector is set to this field + 16. SS.Sel is set to this field + 8. Because SYSRET always returns to CPL 3, the RPL bits 1:0 should be initialized to 11b.
  • syscall: This field is copied directly into CS.Sel. SS.Sel is set to this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits 33:32 should be initialized to 00b.

Safety

Unsafe because this can cause system instability if passed in the wrong values for the fields.

Write the Ring 0 and Ring 3 segment bases. The remaining fields are ignored because they are not valid for long mode. This function will fail if the segment selectors are not in the correct offset of each other or if the segment selectors do not have correct privileges.

The underlying model specific register.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.