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§
Sourcefn advance_ip(&mut self)
fn advance_ip(&mut self)
Advances the instruction pointer for a completed hypercall.
Either advance_ip
or retry
will be called.
Sourcefn retry(&mut self, control: u64)
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.
Sourcefn output_gpa(&mut self) -> u64
fn output_gpa(&mut self) -> u64
The guest address of the hypercall output.
Sourcefn fast_register_pair_count(&mut self) -> usize
fn fast_register_pair_count(&mut self) -> usize
Returns the maximum number of fast register pairs.
Sourcefn extended_fast_hypercalls_ok(&mut self) -> bool
fn extended_fast_hypercalls_ok(&mut self) -> bool
Returns whether extended fast hypercall input/output is allowed.
Sourcefn fast_input(
&mut self,
buf: &mut [[u64; 2]],
output_register_pairs: usize,
) -> usize
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.
Sourcefn fast_output(&mut self, starting_pair_index: usize, buf: &[[u64; 2]])
fn fast_output(&mut self, starting_pair_index: usize, buf: &[[u64; 2]])
Writes fast output registers from the buffer.
Sourcefn set_result(&mut self, n: u64)
fn set_result(&mut self, n: u64)
Sets the hypercall result.