Trait arch::IrqChipArch
source · pub trait IrqChipArch: IrqChip {
Show 17 methods
// Required methods
fn try_box_clone(&self) -> Result<Box<dyn IrqChipX86_64>, Error>;
fn as_irq_chip(&self) -> &dyn IrqChip;
fn as_irq_chip_mut(&mut self) -> &mut dyn IrqChip;
fn get_pic_state(&self, select: PicSelect) -> Result<PicState, Error>;
fn set_pic_state(
&mut self,
select: PicSelect,
state: &PicState
) -> Result<(), Error>;
fn get_ioapic_state(&self) -> Result<IoapicState, Error>;
fn set_ioapic_state(&mut self, state: &IoapicState) -> Result<(), Error>;
fn get_lapic_state(&self, vcpu_id: usize) -> Result<LapicState, Error>;
fn set_lapic_state(
&mut self,
vcpu_id: usize,
state: &LapicState
) -> Result<(), Error>;
fn lapic_frequency(&self) -> u32;
fn get_pit(&self) -> Result<PitState, Error>;
fn set_pit(&mut self, state: &PitState) -> Result<(), Error>;
fn pit_uses_speaker_port(&self) -> bool;
fn snapshot_chip_specific(&self) -> Result<Value, Error>;
fn restore_chip_specific(&mut self, data: Value) -> Result<(), Error>;
// Provided methods
fn snapshot(&self, cpus_num: usize) -> Result<Value, Error> { ... }
fn restore(&mut self, data: Value, vcpus_num: usize) -> Result<(), Error> { ... }
}
Required Methods§
fn try_box_clone(&self) -> Result<Box<dyn IrqChipX86_64>, Error>
fn as_irq_chip(&self) -> &dyn IrqChip
fn as_irq_chip_mut(&mut self) -> &mut dyn IrqChip
sourcefn 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
sourcefn set_pic_state(
&mut self,
select: PicSelect,
state: &PicState
) -> Result<(), Error>
fn set_pic_state( &mut self, select: PicSelect, state: &PicState ) -> Result<(), Error>
Set the current state of the PIC
sourcefn get_ioapic_state(&self) -> Result<IoapicState, Error>
fn get_ioapic_state(&self) -> Result<IoapicState, Error>
Get the current state of the IOAPIC
sourcefn set_ioapic_state(&mut self, state: &IoapicState) -> Result<(), Error>
fn set_ioapic_state(&mut self, state: &IoapicState) -> Result<(), Error>
Set the current state of the IOAPIC
sourcefn 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
sourcefn set_lapic_state(
&mut self,
vcpu_id: usize,
state: &LapicState
) -> Result<(), Error>
fn set_lapic_state( &mut self, vcpu_id: usize, state: &LapicState ) -> Result<(), Error>
Set the current state of the specified VCPU’s local APIC
sourcefn lapic_frequency(&self) -> u32
fn lapic_frequency(&self) -> u32
Get the lapic frequency in Hz
sourcefn 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.
sourcefn snapshot_chip_specific(&self) -> Result<Value, Error>
fn snapshot_chip_specific(&self) -> Result<Value, Error>
Snapshot state specific to different IrqChips.