X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=f5489c3f9f0b42716b8bad6b9ed086c9b2d97268;hp=b052eeeca556df241bdc3e8c0f3194e06a0e50b4;hb=24178516ccd9f46718b687d4c630415eb63ff595;hpb=19b0b4544674b4f9bc727da5242d625f18821a48 diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index b052eee..f5489c3 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -196,7 +196,8 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) { struct v3_io_hook * iter; struct rb_node * io_node = v3_rb_first(&(vm_info->io_map)); addr_t io_port_bitmap; - + int i = 0; + io_port_bitmap = (addr_t)V3_VAddr(V3_AllocPages(3)); memset((uchar_t*)io_port_bitmap, 0, PAGE_SIZE * 3); @@ -209,10 +210,13 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) { ushort_t port = iter->port; uchar_t * bitmap = (uchar_t *)io_port_bitmap; + PrintDebug("%d: Hooking Port %d\n", i, port); bitmap += (port / 8); // PrintDebug("Setting Bit for port 0x%x\n", port); *bitmap |= 1 << (port % 8); + + i++; } while ((io_node = v3_rb_next(io_node))); @@ -353,7 +357,11 @@ static int start_svm_guest(struct guest_info *info) { v3_clgi(); - //PrintDebug("SVM Entry to rip=%p...\n", (void *)info->rip); + /* + PrintDebug("SVM Entry to CS=%p rip=%p...\n", + (void *)(addr_t)info->segments.cs.base, + (void *)(addr_t)info->rip); + */ v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low);