virt_support_apic

Trait ApicClient

Source
pub trait ApicClient {
    // Required methods
    fn cr8(&mut self) -> u32;
    fn set_cr8(&mut self, value: u32);
    fn set_apic_base(&mut self, value: u64);
    fn wake(&mut self, vp_index: VpIndex);
    fn eoi(&mut self, vector: u8);
    fn now(&mut self) -> VmTime;
    fn pull_offload(&mut self) -> ([u32; 8], [u32; 8]);
}
Expand description

The client to pass to LocalApic::access, to handle requests needed when accessing the APIC.

Required Methods§

Source

fn cr8(&mut self) -> u32

Get the CR8 register.

Source

fn set_cr8(&mut self, value: u32)

Set the CR8 register.

Source

fn set_apic_base(&mut self, value: u64)

Set the APIC base MSR.

This is just to accelerate reads of the MSR. If apic base MSR reads always come to msr_read, then this can be a no-op.

Source

fn wake(&mut self, vp_index: VpIndex)

Ensure the processor at vp_index calls scan soon.

Source

fn eoi(&mut self, vector: u8)

Notify the IO-APIC of an EOI.

Source

fn now(&mut self) -> VmTime

Returns the current time.

Source

fn pull_offload(&mut self) -> ([u32; 8], [u32; 8])

Retrieve the offloaded IRR and ISR state, clearing them in the offloaded APIC.

Implementors§