hv1_hypercall

Trait HypercallIo

Source
pub trait HypercallIo {
    // Required methods
    fn advance_ip(&mut self);
    fn retry(&mut self, control: u64);
    fn control(&mut self) -> u64;
    fn input_gpa(&mut self) -> u64;
    fn output_gpa(&mut self) -> u64;
    fn fast_register_pair_count(&mut self) -> usize;
    fn extended_fast_hypercalls_ok(&mut self) -> bool;
    fn fast_input(
        &mut self,
        buf: &mut [[u64; 2]],
        output_register_pairs: usize,
    ) -> usize;
    fn fast_output(&mut self, starting_pair_index: usize, buf: &[[u64; 2]]);
    fn vtl_input(&mut self) -> u64;
    fn set_result(&mut self, n: u64);
    fn fast_regs(&mut self, starting_pair_index: usize, buf: &mut [[u64; 2]]);
}
Expand description

Provides input and output parameters for a hypercall.

Required Methods§

Source

fn advance_ip(&mut self)

Advances the instruction pointer for a completed hypercall.

Either advance_ip or retry will be called.

Source

fn retry(&mut self, control: u64)

Retains the instruction pointer at the hypercall point so that the hypercall will be retried.

Either advance_ip or retry will be called. control is the updated hypercall input value to use in the retry.

Source

fn control(&mut self) -> u64

The hypercall input value.

Source

fn input_gpa(&mut self) -> u64

The guest address of the hypercall input.

Source

fn output_gpa(&mut self) -> u64

The guest address of the hypercall output.

Source

fn fast_register_pair_count(&mut self) -> usize

Returns the maximum number of fast register pairs.

Source

fn extended_fast_hypercalls_ok(&mut self) -> bool

Returns whether extended fast hypercall input/output is allowed.

Source

fn fast_input( &mut self, buf: &mut [[u64; 2]], output_register_pairs: usize, ) -> usize

Fills the buffer with fast input parameters. Given an output size in register pairs, returns the index of the first output register pair.

Source

fn fast_output(&mut self, starting_pair_index: usize, buf: &[[u64; 2]])

Writes fast output registers from the buffer.

Source

fn vtl_input(&mut self) -> u64

The VTL switch hypercall input parameter.

Source

fn set_result(&mut self, n: u64)

Sets the hypercall result.

Source

fn fast_regs(&mut self, starting_pair_index: usize, buf: &mut [[u64; 2]])

Reads fast input/output registers into a buffer, given the starting pair index.

Implementations on Foreign Types§

Source§

impl<T: HypercallIo> HypercallIo for &mut T

Source§

fn advance_ip(&mut self)

Source§

fn retry(&mut self, control: u64)

Source§

fn control(&mut self) -> u64

Source§

fn input_gpa(&mut self) -> u64

Source§

fn output_gpa(&mut self) -> u64

Source§

fn fast_register_pair_count(&mut self) -> usize

Source§

fn extended_fast_hypercalls_ok(&mut self) -> bool

Source§

fn fast_input( &mut self, buf: &mut [[u64; 2]], output_register_pairs: usize, ) -> usize

Source§

fn fast_output(&mut self, starting_pair_index: usize, buf: &[[u64; 2]])

Source§

fn vtl_input(&mut self) -> u64

Source§

fn set_result(&mut self, n: u64)

Source§

fn fast_regs(&mut self, starting_pair_index: usize, buf: &mut [[u64; 2]])

Implementors§