2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org>
11 * All rights reserved.
13 * Author: Kyle C. Hale <kh@u.northwestern.edu>
15 * This is free software. You are permitted to use,
16 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
19 #include <palacios/vmm.h>
20 #include <palacios/vmm_debug.h>
21 #include <palacios/vmm_types.h>
22 #include <palacios/vm_guest.h>
23 #include <palacios/vmm_lowlevel.h>
25 #include <interfaces/vmm_pwrstat.h>
27 struct v3_pwrstat_iface * palacios_pwrstat = 0;
30 void v3_pwrstat_init (void)
32 if (palacios_pwrstat && palacios_pwrstat->init) {
33 palacios_pwrstat->init();
38 void v3_pwrstat_deinit (void)
40 if (palacios_pwrstat && palacios_pwrstat->deinit) {
41 palacios_pwrstat->deinit();
46 uint64_t v3_pwrstat_get_value (v3_pwrstat_ctr_t ctr)
48 if (palacios_pwrstat && palacios_pwrstat->get_value) {
49 return palacios_pwrstat->get_value(ctr);
56 int v3_pwrstat_ctr_valid(v3_pwrstat_ctr_t ctr)
58 if (palacios_pwrstat && palacios_pwrstat->ctr_valid) {
59 return palacios_pwrstat->ctr_valid(ctr);
66 void V3_Init_Pwrstat (struct v3_pwrstat_iface * pwrstat_iface)
68 palacios_pwrstat = pwrstat_iface;