Skip to main content

Crate axdevice

Crate axdevice 

Source
Expand description

This module is designed for an environment where the standard library is not available (no_std).

The alloc crate is used to enable dynamic memory allocation in the absence of the standard library.

The log crate is included for logging purposes, with macros being imported globally.

The module is structured into two main parts: config and device, which manage the configuration and handling of AxVm devices respectively.

Structs§

AxVmDeviceConfig
The vector of DeviceConfig
AxVmDevices
represent A vm own devices
DeviceBuildContext
VM-owned services available while a device factory is building a device.
DeviceBundle
A set of device capabilities that must be registered atomically.
DeviceFactoryRegistry
A registry containing at most one factory for each emulated device type.
FwCfg
Minimal QEMU-compatible fw_cfg MMIO device.
FwCfgInterruptConfig
FwCfgPciConfig
FwCfgPlatformConfig
FwCfgRamRegion
FwCfgSerialConfig
GuestPhysAddr
Guest physical address.
IoApicInterrupt
A routed interrupt from the virtual IO APIC.
MmioDeviceAdapter
Wraps an old-style BaseDeviceOps<GuestPhysAddrRange> device so that it implements the new Device trait.
Port
The port number of an x86 I/O operation.
PortDeviceAdapter
Wraps an old-style BaseDeviceOps<PortRange> device so that it implements the new Device trait.
SysRegAddr
A system register address.
SysRegDeviceAdapter
Wraps an old-style BaseDeviceOps<SysRegAddrRange> device so that it implements the new Device trait.
X86IoApicDevice
Unified-device adapter for EmulatedIoApic.
X86PitDevice
Unified-device adapter for EmulatedPit.
X86SerialPortDevice
Unified-device adapter for EmulatedSerialPort.

Enums§

AccessWidth
The width of a guest bus access.
DeviceRegistration
One strongly typed capability contributed by a device.

Traits§

BaseDeviceOps
The core trait that all emulated devices must implement.
Device
The unified device trait.
DeviceFactory
Builds all capabilities contributed by one emulated device type.
IrqResolver
Resolves a VM-local interrupt line for a device under construction.
PollableDeviceOps
A device capability that can be polled by the VM runtime.
X86IoApicDeviceOps
Type-specific IOAPIC capability used by the x86 interrupt runtime.
X86PitDeviceOps
Type-specific PIT capability used by the x86 interrupt runtime.
X86SerialDeviceOps
Type-specific COM1 capability used by the x86 interrupt runtime.

Functions§

register_builtin_factories
Registers device factories that do not depend on an architecture backend.

Trait Aliases§

BaseMmioDeviceOps
Trait alias for MMIO (Memory-Mapped I/O) device operations.
BasePortDeviceOps
Trait alias for port I/O device operations.
BaseSysRegDeviceOps
Trait alias for system register device operations.