162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciACRN Hypervisor Introduction 462306a36Sopenharmony_ci============================ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciThe ACRN Hypervisor is a Type 1 hypervisor, running directly on bare-metal 762306a36Sopenharmony_cihardware. It has a privileged management VM, called Service VM, to manage User 862306a36Sopenharmony_ciVMs and do I/O emulation. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciACRN userspace is an application running in the Service VM that emulates 1162306a36Sopenharmony_cidevices for a User VM based on command line configurations. ACRN Hypervisor 1262306a36Sopenharmony_ciService Module (HSM) is a kernel module in the Service VM which provides 1362306a36Sopenharmony_cihypervisor services to the ACRN userspace. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciBelow figure shows the architecture. 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci:: 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci Service VM User VM 2062306a36Sopenharmony_ci +----------------------------+ | +------------------+ 2162306a36Sopenharmony_ci | +--------------+ | | | | 2262306a36Sopenharmony_ci | |ACRN userspace| | | | | 2362306a36Sopenharmony_ci | +--------------+ | | | | 2462306a36Sopenharmony_ci |-----------------ioctl------| | | | ... 2562306a36Sopenharmony_ci |kernel space +----------+ | | | | 2662306a36Sopenharmony_ci | | HSM | | | | Drivers | 2762306a36Sopenharmony_ci | +----------+ | | | | 2862306a36Sopenharmony_ci +--------------------|-------+ | +------------------+ 2962306a36Sopenharmony_ci +---------------------hypercall----------------------------------------+ 3062306a36Sopenharmony_ci | ACRN Hypervisor | 3162306a36Sopenharmony_ci +----------------------------------------------------------------------+ 3262306a36Sopenharmony_ci | Hardware | 3362306a36Sopenharmony_ci +----------------------------------------------------------------------+ 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciACRN userspace allocates memory for the User VM, configures and initializes the 3662306a36Sopenharmony_cidevices used by the User VM, loads the virtual bootloader, initializes the 3762306a36Sopenharmony_civirtual CPU state and handles I/O request accesses from the User VM. It uses 3862306a36Sopenharmony_ciioctls to communicate with the HSM. HSM implements hypervisor services by 3962306a36Sopenharmony_ciinteracting with the ACRN Hypervisor via hypercalls. HSM exports a char device 4062306a36Sopenharmony_ciinterface (/dev/acrn_hsm) to userspace. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciThe ACRN hypervisor is open for contribution from anyone. The source repo is 4362306a36Sopenharmony_ciavailable at https://github.com/projectacrn/acrn-hypervisor. 44