X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=linux_module%2Fiface-pwrstat.h;fp=linux_module%2Fiface-pwrstat.h;h=338140feebe6ff7ff6064cd81916b9f6effbdbd5;hp=eb22df3139d5612112a4e2787dc9b5a47baac442;hb=c8b23e99efde3aa5a2c26d1b8e9bc7dc914e6113;hpb=4e43946f01f687361197dc9571b7df02ae20de30 diff --git a/linux_module/iface-pwrstat.h b/linux_module/iface-pwrstat.h index eb22df3..338140f 100644 --- a/linux_module/iface-pwrstat.h +++ b/linux_module/iface-pwrstat.h @@ -9,9 +9,14 @@ /* WARNING WARNING: this is speculation... */ #define HASWELL_MODEL_NO 0x4A -#define MSR_RAPL_POWER_UNIT 0x606 +#ifdef MSR_RAPL_POWER_UNIT +// assume the rest are also defined by the kernel's msr include +// except for special ones here -#define MSR_PKG_RAPL_POWER_LIMIT 0x610 +#else +// assume none are defined by the kernel's msr include +#define MSR_RAPL_POWER_UNIT 0x606 +#define MSR_PKG_POWER_LIMIT 0x610 #define MSR_PKG_ENERGY_STATUS 0x611 #define MSR_PKG_PERF_STATUS 0x613 #define MSR_PKG_POWER_INFO 0x614 @@ -33,6 +38,8 @@ #define MSR_DRAM_PERF_STATUS 0x61B #define MSR_DRAM_POWER_INFO 0x61C +#endif + /* RAPL UNIT BITMASK */ #define POWER_UNIT_OFFSET 0 #define POWER_UNIT_MASK 0x0F @@ -43,4 +50,5 @@ #define TIME_UNIT_OFFSET 0x10 #define TIME_UNIT_MASK 0xF0000 + #endif