Commit 5727772a authored by Kevenny Hsieh's avatar Kevenny Hsieh Committed by Liju-clr Chen
Browse files

FROMLIST: virt: geniezone: Add support for guest VM CPU idle



Implement CPU idle functionality for guest VMs, allowing the guest
VM's CPU to relinquish control to the host when it enters an idle
state. Enable the host to schedule other processes, thereby reducing
CPU usage and achieving power savings.

Introduce a new capability (`enable_idle_support`) to support the idle
feature. Emulate the WFI (Wait For Interrupt) instruction for the
guest VM when it enters an idle state. Allow the host Linux kernel to
schedule other processes and enable the vCPU to enter the `wait`
state. Ensure that the vCPU can be woken up by interrupts such as the
virtual timer (vtimer) and virtio interrupts.

With the idle feature, the vCPU can efficiently enter a lower power
state, such as decreasing CPU frequency or even entering an idle
state, thereby reducing CPU usage and improving overall system power
efficiency.

Change-Id: I8ce33560a2e8945f5477ff7f5fdf17e7329f3e16
Signed-off-by: default avatarKevenny Hsieh <kevenny.hsieh@mediatek.com>
Signed-off-by: default avatarLiju Chen <liju-clr.chen@mediatek.com>
Bug: 356552547
Link: https://lore.kernel.org/lkml/20240730082436.9151-24-liju-clr.chen@mediatek.com/
parent edcc7ecc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment