X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_power%2Frte_power_kvm_vm.c;h=99060625345807339a0bd8faf83777d368bc4360;hb=f6fadc3e6310;hp=7bb2774c3f28574d654f000669d2cf3d95d4ee03;hpb=50810f095aa70986a9d2cc8a53b7b8db3f6ffb17;p=dpdk.git diff --git a/lib/librte_power/rte_power_kvm_vm.c b/lib/librte_power/rte_power_kvm_vm.c index 7bb2774c3f..9906062534 100644 --- a/lib/librte_power/rte_power_kvm_vm.c +++ b/lib/librte_power/rte_power_kvm_vm.c @@ -106,7 +106,8 @@ send_msg(unsigned lcore_id, uint32_t scale_direction) ret = guest_channel_send_msg(&pkt[lcore_id], lcore_id); if (ret == 0) return 1; - RTE_LOG(DEBUG, POWER, "Error sending message: %s\n", strerror(ret)); + RTE_LOG(DEBUG, POWER, "Error sending message: %s\n", + ret > 0 ? strerror(ret) : "channel not connected"); return -1; } @@ -133,3 +134,22 @@ rte_power_kvm_vm_freq_min(unsigned lcore_id) { return send_msg(lcore_id, CPU_POWER_SCALE_MIN); } + +int +rte_power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id) +{ + RTE_LOG(ERR, POWER, "rte_power_turbo_status is not implemented for Virtual Machine Power Management\n"); + return -ENOTSUP; +} + +int +rte_power_kvm_vm_enable_turbo(unsigned int lcore_id) +{ + return send_msg(lcore_id, CPU_POWER_ENABLE_TURBO); +} + +int +rte_power_kvm_vm_disable_turbo(unsigned int lcore_id) +{ + return send_msg(lcore_id, CPU_POWER_DISABLE_TURBO); +}