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 based on cppcheck pass (Linux module and user)
[palacios.git] / linux_module / iface-pmu.c
index 094fdb2..948e5f1 100644 (file)
@@ -39,7 +39,7 @@ static DEFINE_PER_CPU(u32, pmu_refcount) = 0;
 
 static inline void cpuid_string(u32 id, u32 dest[4]) {
   asm volatile("cpuid"
-              :"=a"(dest),"=b"(*(dest+1)),"=c"(*(dest+2)),"=d"(*(dest+3))
+              :"=a"(*dest),"=b"(*(dest+1)),"=c"(*(dest+2)),"=d"(*(dest+3))
               :"a"(id));
 }
 
@@ -124,7 +124,6 @@ static int amd_get_slot(void) {
   }
 
   return slot;
-  return -1;
 }
 
 /*
@@ -644,11 +643,17 @@ static int pmu_init( void ) {
   return 0;
 }
 
+static int pmu_deinit(void)
+{
+    // nothing
+    return 0;
+}
+
 
 static struct linux_ext pmu_ext = {
   .name = "PMU",
   .init = pmu_init,
-  .deinit = NULL,
+  .deinit = pmu_deinit,
   .guest_init = NULL,
   .guest_deinit = NULL
 };