Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup of linkage issues for non-Linux hosts
[palacios.git] / linux_module / iface-pstate-ctrl.h
1 #ifndef __IFACE_PSTATE_CTRL_H__
2 #define __IFACE_PSTATE_CTRL_H__
3
4 /*
5  * This file is part of the Palacios Virtual Machine Monitor developed
6  * by the V3VEE Project with funding from the United States National 
7  * Science Foundation and the Department of Energy.  
8  *
9  * The V3VEE Project is a joint project between Northwestern University
10  * and the University of New Mexico.  You can find out more at 
11  * http://www.v3vee.org
12  *
13  * Copyright (c) 2014, the V3VEE Project <http://www.v3vee.org>
14  * all rights reserved.
15  *
16  * Author: Kyle C. Hale <kh@u.northwestern.edu>
17  *         Shiva Rao <shiva.rao.717@gmail.com>
18  *         Peter Dinda <pdinda@northwestern.edu>
19  *
20  * This is free software.  you are permitted to use,
21  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
22  */
23
24
25
26 #include <interfaces/vmm_pstate_ctrl.h>
27
28 // These functions are available for use within the module
29 // They affect the current core
30
31 void palacios_pstate_ctrl_get_chars(struct v3_cpu_pstate_chars *c);
32
33 void palacios_pstate_ctrl_acquire(uint32_t type);
34 void palacios_pstate_ctrl_release(void);
35
36
37 uint64_t palacios_pstate_ctrl_get_pstate(void);
38 void     palacios_pstate_ctrl_set_pstate(uint64_t p);
39
40 uint64_t palacios_pstate_ctrl_get_freq(void);
41 void     palacios_pstate_ctrl_set_freq(uint64_t f_khz);
42
43
44 // This structure is how the user space commands us
45 struct v3_dvfs_ctrl_request {
46     enum {V3_DVFS_ACQUIRE,             // Take control over a pcore from host
47           V3_DVFS_RELEASE,             // Release control of a pcore to host
48           V3_DVFS_SETFREQ,             // Set frequency of acquired pcore
49           V3_DVFS_SETPSTATE} cmd;      // Set pstate of acquired pcore
50     enum {V3_DVFS_EXTERNAL,
51           V3_DVFS_DIRECT }   acq_type; // External for setting freq using Linux
52                                        // Direct for setting  pstate directly using module
53     uint32_t                 pcore;    // Which core we mean
54     uint64_t                 freq_khz; // for setfreq
55     uint64_t                 pstate;   // for setpstate
56 };
57
58 #endif