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 and sanity-checking of assorted additional issues from second pass (Coverity...
Peter Dinda [Tue, 1 Sep 2015 21:47:54 +0000 (16:47 -0500)]
palacios/src/palacios/svm_msr.c
palacios/src/palacios/vmcb.c
palacios/src/palacios/vmm_extensions.c

index bdc8569..bca1dd2 100644 (file)
@@ -37,6 +37,7 @@
 
 
 static int get_bitmap_index(uint_t msr) {
+    // unsigend cmoparison with zero intentional for clarity
     if ((msr >= PENTIUM_MSRS_START) && 
        (msr <= PENTIUM_MSRS_END)) {
        return (PENTIUM_MSRS_INDEX + (msr - PENTIUM_MSRS_START));
index f23cf70..12cf36f 100644 (file)
@@ -262,7 +262,7 @@ void PrintDebugVMCB(vmcb_t * vmcb) {
                }
        }
 
-       for (i=0;i<4;i++) { 
+       for (i=0;i<3;i++) { 
                if (ctrl_area->rsvd2[i]) {
                        PrintDebug(VM_NONE, VCORE_NONE, "control rsvd2[%d] has value 0x%x\n", i, ctrl_area->rsvd2[i]);
                }
index af2c0e2..44004cc 100644 (file)
@@ -59,8 +59,8 @@ int V3_init_extensions() {
 
     while (tmp_ext != __stop__v3_extensions) {
 
-        if ((*tmp_ext) && (*tmp_ext)->init && ((*tmp_ext)->init() != 0)) {
-           PrintError(VM_NONE, VCORE_NONE, "Could not initialize extension (%s)\n", (*tmp_ext)->name);
+        if (!(*tmp_ext) || !(*tmp_ext)->init || ((*tmp_ext)->init() != 0)) {
+           PrintError(VM_NONE, VCORE_NONE, "Could not initialize extension (%s)\n", (*tmp_ext) ? (*tmp_ext)->name : "UNKNOWN");
            return -1;
        }