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, Kyle C. Hale <kh@u.northwestern.edu>
11 * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Kyle C. Hale <kh@u.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
23 #include <palacios/vmm_types.h>
26 V3_PWRSTAT_PKG_ENERGY,
27 V3_PWRSTAT_CORE_ENERGY,
28 V3_PWRSTAT_EXT_ENERGY, /* "Power plane 1", e.g. graphics peripheral */
29 V3_PWRSTAT_DRAM_ENERGY,
32 /* note that (on Intel at least) RAPL doesn't adhere to PMU semantics */
33 struct v3_pwrstat_iface {
36 int (*ctr_valid)(v3_pwrstat_ctr_t ctr);
37 uint64_t (*get_value)(v3_pwrstat_ctr_t ctr);
40 extern void V3_Init_Pwrstat (struct v3_pwrstat_iface * palacios_pwrstat);
43 void v3_pwrstat_init(void);
44 int v3_pwrstat_ctr_valid(v3_pwrstat_ctr_t ctr);
45 uint64_t v3_pwrstat_get_value(v3_pwrstat_ctr_t ctr);
46 void v3_pwrstat_deinit(void);