Trait IrqChipArch
pub trait IrqChipArch: IrqChip {
Show 14 methods
// Required methods
fn get_pic_state(&self, select: PicSelect) -> Result<PicState, Error>;
fn set_pic_state(
&self,
select: PicSelect,
state: &PicState,
) -> Result<(), Error>;
fn get_ioapic_state(&self) -> Result<IoapicState, Error>;
fn set_ioapic_state(&self, state: &IoapicState) -> Result<(), Error>;
fn get_lapic_state(&self, vcpu_id: usize) -> Result<LapicState, Error>;
fn set_lapic_state(
&self,
vcpu_id: usize,
state: &LapicState,
) -> Result<(), Error>;
fn lapic_frequency(&self) -> u32;
fn get_pit(&self) -> Result<PitState, Error>;
fn set_pit(&self, state: &PitState) -> Result<(), Error>;
fn pit_uses_speaker_port(&self) -> bool;
fn snapshot_chip_specific(&self) -> Result<AnySnapshot, Error>;
fn restore_chip_specific(&self, data: AnySnapshot) -> Result<(), Error>;
// Provided methods
fn snapshot(&self, cpus_num: usize) -> Result<AnySnapshot, Error> { ... }
fn restore(&self, data: AnySnapshot, vcpus_num: usize) -> Result<(), Error> { ... }
}Required Methods§
fn get_pic_state(&self, select: PicSelect) -> Result<PicState, Error>
fn get_pic_state(&self, select: PicSelect) -> Result<PicState, Error>
Get the current state of the PIC
fn set_pic_state(
&self,
select: PicSelect,
state: &PicState,
) -> Result<(), Error>
fn set_pic_state( &self, select: PicSelect, state: &PicState, ) -> Result<(), Error>
Set the current state of the PIC
fn get_ioapic_state(&self) -> Result<IoapicState, Error>
fn get_ioapic_state(&self) -> Result<IoapicState, Error>
Get the current state of the IOAPIC
fn set_ioapic_state(&self, state: &IoapicState) -> Result<(), Error>
fn set_ioapic_state(&self, state: &IoapicState) -> Result<(), Error>
Set the current state of the IOAPIC
fn get_lapic_state(&self, vcpu_id: usize) -> Result<LapicState, Error>
fn get_lapic_state(&self, vcpu_id: usize) -> Result<LapicState, Error>
Get the current state of the specified VCPU’s local APIC
fn set_lapic_state(
&self,
vcpu_id: usize,
state: &LapicState,
) -> Result<(), Error>
fn set_lapic_state( &self, vcpu_id: usize, state: &LapicState, ) -> Result<(), Error>
Set the current state of the specified VCPU’s local APIC
fn lapic_frequency(&self) -> u32
fn lapic_frequency(&self) -> u32
Get the lapic frequency in Hz
fn pit_uses_speaker_port(&self) -> bool
fn pit_uses_speaker_port(&self) -> bool
Returns true if the PIT uses port 0x61 for the PC speaker, false if 0x61 is unused.
fn snapshot_chip_specific(&self) -> Result<AnySnapshot, Error>
fn snapshot_chip_specific(&self) -> Result<AnySnapshot, Error>
Snapshot state specific to different IrqChips.
fn restore_chip_specific(&self, data: AnySnapshot) -> Result<(), Error>
fn restore_chip_specific(&self, data: AnySnapshot) -> Result<(), Error>
Restore state specific to different IrqChips.
Provided Methods§
fn snapshot(&self, cpus_num: usize) -> Result<AnySnapshot, Error>
fn snapshot(&self, cpus_num: usize) -> Result<AnySnapshot, Error>
Snapshot state common to IrqChips.