Skip to main content

AxVCpuHal

Trait AxVCpuHal 

Source
pub trait AxVCpuHal {
    type MmHal: AxMmHal;

    // Provided methods
    fn irq_fetch() -> usize { ... }
    fn irq_hanlder() { ... }
}
Expand description

Hardware abstraction layer interfaces for VCpu operations.

This trait defines the interfaces that the underlying software (kernel or hypervisor) must implement to support VCpu operations such as interrupt handling and memory management.

Required Associated Types§

Source

type MmHal: AxMmHal

Memory management interfaces required by the VCpu subsystem. Must implement the AxMmHal trait from the axaddrspace crate.

Provided Methods§

Source

fn irq_fetch() -> usize

Fetches the current interrupt (IRQ) number from the hardware.

Source

fn irq_hanlder()

Dispatches an interrupt request (IRQ) to the underlying host OS.

This function should handle the actual interrupt processing and delegation to the appropriate interrupt handler in the host system.

§Implementation Required

The default implementation panics as this function must be implemented by the underlying hypervisor or kernel to provide proper interrupt handling.

§Safety

Implementations should ensure proper interrupt handling and avoid reentrancy issues during interrupt processing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§