mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-29 12:35:48 +00:00
The design of ACRN CPU performance management is to let hardware do the autonomous frequency selection(or set to a fixed value), and remove guest's ability to control CPU frequency. This patch is to implement the CPU frequency initializer, which will setup CPU frequency base on the performance policy type. Two performance policy types are provided for user to choose from: - 'Performance': CPU runs at its CPU runs at its maximum frequency. Enable hardware autonomous frequency selection if HWP is presented. - 'Nominal': CPU runs at its guaranteed frequency. The policy type is passed to hypervisor through boot parameter, as either 'cpu_perf_policy=Nominal' or 'cpu_perf_policy=Performance'. The default type is 'Performance'. Both HWP and ACPI p-state are supported. HWP is the first choice, for it provides hardware autonomous frequency selection, while keeps frequency transaction time low. Two functions are added to the hypervisor to call: - init_frequency_policy(): called by BSP at start up time. It processes the boot parameters, and enables HWP if it is presented. - apply_frequency_policy(): called after init_frequency_policy(). It applies initial CPU frequency policy setting for each core. It uses a set of frequency limits data struct to quickly decide what the highest/nominal frequency is. The frequency limits are generated by config-tools. The hypervisor will not be governing CPU frequency after initial policy is applied. Cores running RTVMs are fixed to nominal/guaranteed frequency, to get more certainty in latency. This is done by setting the core's frequency limits to highest=lowest=nominal in config-tools. Tracked-On: #8168 Signed-off-by: Wu Zhou <wu.zhou@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
ACRN Hypervisor ############### The open source `Project ACRN`_ defines a device hypervisor reference stack and an architecture for running multiple software subsystems, managed securely, on a consolidated system by means of a virtual machine manager. It also defines a reference framework implementation for virtual device emulation, called the "ACRN Device Model". The ACRN Hypervisor is a Type 1 reference hypervisor stack, running directly on the bare-metal hardware, and is suitable for a variety of IoT and embedded device solutions. The ACRN hypervisor addresses the gap that currently exists between datacenter hypervisors, and hard partitioning hypervisors. The ACRN hypervisor architecture partitions the system into different functional domains, with carefully selected guest OS sharing optimizations for IoT and embedded devices. You can find out more about Project ACRN on the `Project ACRN documentation`_ website. .. _`Project ACRN`: https://projectacrn.org .. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor .. _`Project ACRN documentation`: https://projectacrn.github.io/