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.


Merge branch 'devel' of palacios@newskysaw.cs.northwestern.edu:/home/palacios/palacio...
Peter Dinda [Tue, 3 May 2011 19:46:42 +0000 (14:46 -0500)]
1  2 
palacios/src/devices/vga.c
palacios/src/palacios/svm.c

@@@ -26,7 -26,7 +26,7 @@@
  
  #include "vga_regs.h"
  
- #ifndef CONFIG_DEBUG_VGA
+ #ifndef V3_CONFIG_DEBUG_VGA
  #undef PrintDebug
  #define PrintDebug(fmt, args...)
  #endif
@@@ -1194,7 -1194,7 +1194,7 @@@ static int vga_write(struct guest_info 
  #endif
                    // rotate data right
                    if (ror) { 
 -                      data = (data>>ror) | data<<(8-ror);
 +                      data = (data>>ror) | (data<<(8-ror));
                    }
                    
  #if DEBUG_DEEP_MEM
                uint8_t data = ((uint8_t *)src)[i];
  
                if (ror) {
 -                  data = (data>>ror) | data<<(8-ror);
 +                  data = (data>>ror) | (data<<(8-ror));
                }
  
                uint8_t bm = vga->vga_graphics_controller.vga_bit_mask & data;
@@@ -44,7 -44,7 +44,7 @@@
  #include <palacios/vmm_sprintf.h>
  
  
- #ifndef CONFIG_DEBUG_SVM
+ #ifndef V3_CONFIG_DEBUG_SVM
  #undef PrintDebug
  #define PrintDebug(fmt, args...)
  #endif
@@@ -53,7 -53,7 +53,7 @@@
  uint32_t v3_last_exit;
  
  // This is a global pointer to the host's VMCB
- static addr_t host_vmcbs[CONFIG_MAX_CPUS] = { [0 ... CONFIG_MAX_CPUS - 1] = 0};
+ static addr_t host_vmcbs[V3_CONFIG_MAX_CPUS] = { [0 ... V3_CONFIG_MAX_CPUS - 1] = 0};
  
  
  
@@@ -105,7 -105,7 +105,7 @@@ static void Init_VMCB_BIOS(vmcb_t * vmc
  
      ctrl_area->instrs.HLT = 1;
  
- #ifdef CONFIG_TIME_VIRTUALIZE_TSC
+ #ifdef V3_CONFIG_TIME_VIRTUALIZE_TSC
      ctrl_area->instrs.RDTSC = 1;
      ctrl_area->svm_instrs.RDTSCP = 1;
  #endif
@@@ -326,7 -326,7 +326,7 @@@ static int update_irq_exit_state(struc
  
      if ((info->intr_core_state.irq_pending == 1) && (guest_ctrl->guest_ctrl.V_IRQ == 0)) {
        
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("INTAK cycle completed for irq %d\n", info->intr_core_state.irq_vector);
  #endif
  
      }
  
      if ((info->intr_core_state.irq_started == 1) && (guest_ctrl->exit_int_info.valid == 0)) {
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("Interrupt %d taken by guest\n", info->intr_core_state.irq_vector);
  #endif
  
        info->intr_core_state.irq_started = 0;
  
      } else if ((info->intr_core_state.irq_started == 1) && (guest_ctrl->exit_int_info.valid == 1)) {
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("EXIT INT INFO is set (vec=%d)\n", guest_ctrl->exit_int_info.vector);
  #endif
      }
@@@ -371,7 -371,7 +371,7 @@@ static int update_irq_entry_state(struc
        if (info->excp_state.excp_error_code_valid) {
            guest_ctrl->EVENTINJ.error_code = info->excp_state.excp_error_code;
            guest_ctrl->EVENTINJ.ev = 1;
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
            PrintDebug("Injecting exception %d with error code %x\n", excp, guest_ctrl->EVENTINJ.error_code);
  #endif
        }
        
        guest_ctrl->EVENTINJ.valid = 1;
  
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("<%d> Injecting Exception %d (CR2=%p) (EIP=%p)\n", 
                   (int)info->num_exits, 
                   guest_ctrl->EVENTINJ.vector, 
  
        v3_injecting_excp(info, excp);
      } else if (info->intr_core_state.irq_started == 1) {
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("IRQ pending from previous injection\n");
  #endif
        guest_ctrl->guest_ctrl.V_IRQ = 1;
                guest_ctrl->guest_ctrl.V_IGN_TPR = 1;
                guest_ctrl->guest_ctrl.V_INTR_PRIO = 0xf;
  
- #ifdef CONFIG_DEBUG_INTERRUPTS
+ #ifdef V3_CONFIG_DEBUG_INTERRUPTS
                PrintDebug("Injecting Interrupt %d (EIP=%p)\n", 
                           guest_ctrl->guest_ctrl.V_INTR_VECTOR, 
                           (void *)(addr_t)info->rip);
@@@ -484,7 -484,7 +484,7 @@@ int v3_svm_enter(struct guest_info * in
      guest_state->rip = info->rip;
      guest_state->rsp = info->vm_regs.rsp;
  
- #ifdef CONFIG_SYMCALL
+ #ifdef V3_CONFIG_SYMCALL
      if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_entry_state(info);
      }
        (void *)(addr_t)info->rip);
      */
  
- #ifdef CONFIG_SYMCALL
+ #ifdef V3_CONFIG_SYMCALL
      if (info->sym_core_state.symcall_state.sym_call_active == 1) {
        if (guest_ctrl->guest_ctrl.V_IRQ == 1) {
            V3_Print("!!! Injecting Interrupt during Sym call !!!\n");
      exit_info2 = guest_ctrl->exit_info2;
  
  
- #ifdef CONFIG_SYMCALL
+ #ifdef V3_CONFIG_SYMCALL
      if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_exit_state(info);
      }
@@@ -665,12 -665,11 +665,12 @@@ int v3_start_svm_guest(struct guest_inf
        }
  
        
 -/*
 +
        if ((info->num_exits % 5000) == 0) {
            V3_Print("SVM Exit number %d\n", (uint32_t)info->num_exits);
 +          v3_print_guest_state(info);
        }
 -*/
 +
        
      }