1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef _POWER_KVM_VM_H
6 #define _POWER_KVM_VM_H
10 * RTE Power Management KVM VM
13 #include <rte_common.h>
14 #include <rte_byteorder.h>
16 #include <rte_string_fns.h>
23 * Initialize power management for a specific lcore.
30 * - Negative on error.
32 int power_kvm_vm_init(unsigned int lcore_id);
35 * Exit power management on a specific lcore.
42 * - Negative on error.
44 int power_kvm_vm_exit(unsigned int lcore_id);
47 * Get the available frequencies of a specific lcore.
48 * It is not currently supported for VM Power Management.
53 * The buffer array to save the frequencies.
55 * The number of frequencies to get.
60 uint32_t power_kvm_vm_freqs(unsigned int lcore_id, uint32_t *freqs,
64 * Return the current index of available frequencies of a specific lcore.
65 * It is not currently supported for VM Power Management.
73 uint32_t power_kvm_vm_get_freq(unsigned int lcore_id);
76 * Set the new frequency for a specific lcore by indicating the index of
77 * available frequencies.
78 * It is not currently supported for VM Power Management.
83 * The index of available frequencies.
88 int power_kvm_vm_set_freq(unsigned int lcore_id, uint32_t index);
91 * Scale up the frequency of a specific lcore. This request is forwarded to the
93 * It should be protected outside of this function for threadsafe.
100 * - Negative on error.
102 int power_kvm_vm_freq_up(unsigned int lcore_id);
105 * Scale down the frequency of a specific lcore according to the available
107 * It should be protected outside of this function for threadsafe.
114 * - Negative on error.
116 int power_kvm_vm_freq_down(unsigned int lcore_id);
119 * Scale up the frequency of a specific lcore to the highest according to the
120 * available frequencies.
121 * It should be protected outside of this function for threadsafe.
128 * - Negative on error.
130 int power_kvm_vm_freq_max(unsigned int lcore_id);
133 * Scale down the frequency of a specific lcore to the lowest according to the
134 * available frequencies.
135 * It should be protected outside of this function for threadsafe.
142 * - Negative on error.
144 int power_kvm_vm_freq_min(unsigned int lcore_id);
147 * It should be protected outside of this function for threadsafe.
155 int power_kvm_vm_turbo_status(unsigned int lcore_id);
158 * It should be protected outside of this function for threadsafe.
165 * - Negative on error.
167 int power_kvm_vm_enable_turbo(unsigned int lcore_id);
170 * It should be protected outside of this function for threadsafe.
177 * - Negative on error.
179 int power_kvm_vm_disable_turbo(unsigned int lcore_id);