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 / mcheck.c
index e357e94..8b3c5b2 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/debugfs.h>
 #include <linux/uaccess.h>
 
-#include <interfaces/vmm_mcheck.h>
+//#include <interfaces/vmm_mcheck.h>
 
 #include "palacios.h"
 #include "vm.h"
 #define SCRUBBER_MCE 0x1
 #define V3_VM_INJECT_SCRUBBER_MCE (10224+20)
 
+/* Missing the vmm_mcheck.h header file */
+
+struct v3_vm_info;
+
+int v3_mcheck_inject_scrubber_mce(struct v3_vm_info *info, int cpu, uint64_t dst);
+
 static int inject_mce(struct v3_guest * guest, unsigned int cmd, unsigned long arg,
                       void * priv_data)
 {
@@ -41,6 +47,13 @@ static int guest_init(struct v3_guest * guest, void ** vm_data) {
 
 static int guest_deinit(struct v3_guest * guest, void * vm_data) {
     
+    remove_guest_ctrl(guest, V3_VM_INJECT_SCRUBBER_MCE);
+    return 0;
+}
+
+static int all_deinit(void)
+{
+    // nothing to do
     return 0;
 }
 
@@ -48,7 +61,7 @@ static int guest_deinit(struct v3_guest * guest, void * vm_data) {
 struct linux_ext mcheck_ext = {
     .name = "MACHINE CHECK",
     .init = NULL,
-    .deinit = NULL,
+    .deinit = all_deinit,
     .guest_init = guest_init, 
     .guest_deinit = guest_deinit
 };