BACKPORT: FROMGIT: cpufreq: add virtual-cpufreq driver
Introduce a virtualized cpufreq driver for guest kernels to improve performance and power of workloads within VMs. This driver does two main things: 1. Sends the frequency of vCPUs as a hint to the host. The host uses the hint to schedule the vCPU threads and decide physical CPU frequency. 2. If a VM does not support a virtualized FIE(like AMUs), it queries the host CPU frequency by reading a MMIO region of a virtual cpufreq device to update the guest's frequency scaling factor periodically. This enables accurate Per-Entity Load Tracking for tasks running in the guest. Bug: 284367589 Test: Boot up with compatible VMM backend emulation Link: https://lore.kernel.org/all/20240919000837.1004642-3-davidai@google.com/ (cherry picked from commit 4fd06a53 git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/arm/linux-next) [davidai: fixed up mismatches in the cpufreq's exit/remove function prototypes] Change-Id: I1d212b4ddb56cc35678d5347a11c0c9e24a4d052 Co-developed-by:Saravana Kannan <saravanak@google.com> Signed-off-by:
Saravana Kannan <saravanak@google.com> Signed-off-by:
David Dai <davidai@google.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org>
Loading
Please sign in to comment