How cyberus-technology/cloud-hypervisor works
Main Components Overview
a. Host Layer
• KVM/MSHV Hypervisor integration
• Host OS kernel interface
• Hardware architecture support (x86_64 and AArch64)
b. Core VMM Layer
• Memory Management
• CPU Management
• Device Management
• Interrupt Handling
• Migration Support
c. Device Layer
• Virtio Devices
• PCI Devices
• VFIO/VFIO-user
• Platform-specific devices (ACPI, GIC, etc.)
d. API/Control Layer
• HTTP API
• DBus API
• Command Line Interface
Component Relationships
a. Control Flow
• API requests → VMM Core → Device Management
• Interrupt handling path: Hardware → KVM → VMM → Guest
• Device I/O path: Guest → Virtio → Host
b. Data Flow
• Memory mapping between guest and host
• Device DMA operations
• Network/Block I/O paths
Specific Implementation Details
Rust-specific components:
virtio-devices/
• Block devices
• Network devices
• Console
• Balloon
• IOMMU
• vhost-user devices
hypervisor/
• KVM implementation
• MSHV implementation
• Architecture-specific code
vmm/
• Memory management
• Device management
• Migration support
Key Architectural Patterns
Highlight:
• Modular design using Rust crates
• Separation between core VMM and device implementations
• Platform abstraction layers
• Security boundaries
Integration Points
Connections with:
• Host kernel (KVM/MSHV)
• Hardware devices (VFIO)
• External services (vhost-user)
• Management tools