ia64/xen-unstable

changeset 3855:f4a89c40649f

bitkeeper revision 1.1203.1.2 (42150898CXjY7WEQQX0UPd8XVrticw)

Minor cleanup of vmx debug messages
author maf46@burn.cl.cam.ac.uk
date Thu Feb 17 21:11:52 2005 +0000 (2005-02-17)
parents e2434b9a0f43
children 0fe3bb5ed3aa
files xen/arch/x86/mm.c xen/arch/x86/vmx.c xen/arch/x86/vmx_intercept.c xen/arch/x86/vmx_io.c xen/arch/x86/vmx_vmcs.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Thu Feb 17 21:06:48 2005 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Thu Feb 17 21:11:52 2005 +0000
     1.3 @@ -2974,4 +2974,4 @@ void audit_domains_key(unsigned char key
     1.4      audit_domains();
     1.5  }
     1.6  
     1.7 -#endif
     1.8 +#endif /* NDEBUG */
     2.1 --- a/xen/arch/x86/vmx.c	Thu Feb 17 21:06:48 2005 +0000
     2.2 +++ b/xen/arch/x86/vmx.c	Thu Feb 17 21:11:52 2005 +0000
     2.3 @@ -42,7 +42,7 @@
     2.4  #ifdef CONFIG_VMX
     2.5  
     2.6  int vmcs_size;
     2.7 -unsigned int opt_vmx_debug_level;
     2.8 +unsigned int opt_vmx_debug_level = 0;
     2.9  
    2.10  extern long evtchn_send(int lport);
    2.11  extern long do_block(void);
    2.12 @@ -120,7 +120,7 @@ static int vmx_do_page_fault(unsigned lo
    2.13      {
    2.14          __vmread(GUEST_EIP, &eip);
    2.15          VMX_DBG_LOG(DBG_LEVEL_VMMU, 
    2.16 -                "vmx_do_page_fault = 0x%lx, eip = %lx, erro_code = %lx\n", 
    2.17 +                "vmx_do_page_fault = 0x%lx, eip = %lx, erro_code = %lx",
    2.18                  va, eip, error_code);
    2.19      }
    2.20  #endif
    2.21 @@ -157,11 +157,11 @@ static void vmx_do_general_protection_fa
    2.22      __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
    2.23  
    2.24      VMX_DBG_LOG(DBG_LEVEL_1,
    2.25 -            "vmx_general_protection_fault: eip = %lx, erro_code = %lx\n",
    2.26 +            "vmx_general_protection_fault: eip = %lx, erro_code = %lx",
    2.27              eip, error_code);
    2.28  
    2.29      VMX_DBG_LOG(DBG_LEVEL_1,
    2.30 -            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx\n",
    2.31 +            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
    2.32              regs->eax, regs->ebx, regs->ecx, regs->edx, regs->esi, regs->edi);
    2.33  
    2.34      /* Reflect it back into the guest */
    2.35 @@ -182,7 +182,7 @@ static void vmx_vmexit_do_cpuid(unsigned
    2.36  
    2.37      VMX_DBG_LOG(DBG_LEVEL_1, 
    2.38                  "do_cpuid: (eax) %lx, (ebx) %lx, (ecx) %lx, (edx) %lx,"
    2.39 -                " (esi) %lx, (edi) %lx\n",
    2.40 +                " (esi) %lx, (edi) %lx",
    2.41                  regs->eax, regs->ebx, regs->ecx, regs->edx,
    2.42                  regs->esi, regs->edi);
    2.43  
    2.44 @@ -200,7 +200,7 @@ static void vmx_vmexit_do_cpuid(unsigned
    2.45      regs->edx = (unsigned long) edx;
    2.46  
    2.47      VMX_DBG_LOG(DBG_LEVEL_1, 
    2.48 -            "vmx_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, ebx=%x, ecx=%x, edx=%x\n", 
    2.49 +            "vmx_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, ebx=%x, ecx=%x, edx=%x",
    2.50              eip, input, eax, ebx, ecx, edx);
    2.51  
    2.52  }
    2.53 @@ -220,7 +220,7 @@ static void vmx_dr_access (unsigned long
    2.54      reg = exit_qualification & DEBUG_REG_ACCESS_NUM;
    2.55  
    2.56      VMX_DBG_LOG(DBG_LEVEL_1, 
    2.57 -                "vmx_dr_access : eip=%lx, reg=%d, exit_qualification = %lx\n",
    2.58 +                "vmx_dr_access : eip=%lx, reg=%d, exit_qualification = %lx",
    2.59                  eip, reg, exit_qualification);
    2.60  
    2.61      switch(exit_qualification & DEBUG_REG_ACCESS_REG) {
    2.62 @@ -270,7 +270,7 @@ static void vmx_vmexit_do_invlpg(unsigne
    2.63  
    2.64      __vmread(GUEST_EIP, &eip);
    2.65  
    2.66 -    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg:eip=%p, va=%p\n",
    2.67 +    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg:eip=%p, va=%p",
    2.68              eip, va);
    2.69  
    2.70      /*
    2.71 @@ -303,7 +303,7 @@ static void vmx_io_instruction(struct xe
    2.72      __vmread(GUEST_EIP, &eip);
    2.73  
    2.74      VMX_DBG_LOG(DBG_LEVEL_1, 
    2.75 -            "vmx_io_instruction: eip=%p, exit_qualification = %lx\n",
    2.76 +            "vmx_io_instruction: eip=%p, exit_qualification = %lx",
    2.77              eip, exit_qualification);
    2.78  
    2.79      if (test_bit(6, &exit_qualification))
    2.80 @@ -318,7 +318,7 @@ static void vmx_io_instruction(struct xe
    2.81  
    2.82      vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
    2.83      if (vio == 0) {
    2.84 -        VMX_DBG_LOG(DBG_LEVEL_1, "bad shared page: %lx\n", (unsigned long) vio);
    2.85 +        VMX_DBG_LOG(DBG_LEVEL_1, "bad shared page: %lx", (unsigned long) vio);
    2.86          domain_crash(); 
    2.87      }
    2.88      p = &vio->vp_ioreq;
    2.89 @@ -400,8 +400,8 @@ static void mov_to_cr(int gp, int cr, st
    2.90          __vmx_bug(regs);
    2.91      }
    2.92      
    2.93 -    VMX_DBG_LOG(DBG_LEVEL_1, "mov_to_cr: CR%d, value = %lx, \n", cr, value);
    2.94 -    VMX_DBG_LOG(DBG_LEVEL_1, "current = %lx, \n", (unsigned long) current);
    2.95 +    VMX_DBG_LOG(DBG_LEVEL_1, "mov_to_cr: CR%d, value = %lx,", cr, value);
    2.96 +    VMX_DBG_LOG(DBG_LEVEL_1, "current = %lx,", (unsigned long) current);
    2.97  
    2.98      switch(cr) {
    2.99      case 0: 
   2.100 @@ -427,7 +427,7 @@ static void mov_to_cr(int gp, int cr, st
   2.101              if (!(pfn = phys_to_machine_mapping(
   2.102                        d->arch.arch_vmx.cpu_cr3 >> PAGE_SHIFT))) 
   2.103              {
   2.104 -                VMX_DBG_LOG(DBG_LEVEL_VMMU, "Invalid CR3 value = %lx\n", 
   2.105 +                VMX_DBG_LOG(DBG_LEVEL_VMMU, "Invalid CR3 value = %lx", 
   2.106                          d->arch.arch_vmx.cpu_cr3);
   2.107                  domain_crash(); /* need to take a clean path */
   2.108              }
   2.109 @@ -447,14 +447,14 @@ static void mov_to_cr(int gp, int cr, st
   2.110              d->arch.guest_table = mk_pagetable(pfn << PAGE_SHIFT);
   2.111              update_pagetables(d);
   2.112  
   2.113 -            VMX_DBG_LOG(DBG_LEVEL_VMMU, "New arch.guest_table = %lx\n", 
   2.114 +            VMX_DBG_LOG(DBG_LEVEL_VMMU, "New arch.guest_table = %lx", 
   2.115                      (unsigned long) (pfn << PAGE_SHIFT));
   2.116  
   2.117              __vmwrite(GUEST_CR3, pagetable_val(d->arch.shadow_table));
   2.118              /* 
   2.119               * arch->shadow_table should hold the next CR3 for shadow
   2.120               */
   2.121 -            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx, pfn = %lx\n", 
   2.122 +            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx, pfn = %lx", 
   2.123                      d->arch.arch_vmx.cpu_cr3, pfn);
   2.124              /* undo the get_page done in the para virt case */
   2.125              put_page_and_type(&frame_table[old_base_pfn]);
   2.126 @@ -494,11 +494,11 @@ static void mov_to_cr(int gp, int cr, st
   2.127               * If different, make a shadow. Check if the PDBR is valid
   2.128               * first.
   2.129               */
   2.130 -            VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 value = %lx\n", value);
   2.131 +            VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 value = %lx", value);
   2.132              if ((value >> PAGE_SHIFT) > d->domain->max_pages)
   2.133              {
   2.134                  VMX_DBG_LOG(DBG_LEVEL_VMMU, 
   2.135 -                        "Invalid CR3 value=%lx\n", value);
   2.136 +                        "Invalid CR3 value=%lx", value);
   2.137                  domain_crash(); /* need to take a clean path */
   2.138              }
   2.139              pfn = phys_to_machine_mapping(value >> PAGE_SHIFT);
   2.140 @@ -509,7 +509,7 @@ static void mov_to_cr(int gp, int cr, st
   2.141               * arch.shadow_table should now hold the next CR3 for shadow
   2.142               */
   2.143              d->arch.arch_vmx.cpu_cr3 = value;
   2.144 -            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx\n", 
   2.145 +            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx",
   2.146                      value);
   2.147              __vmwrite(GUEST_CR3, pagetable_val(d->arch.shadow_table));
   2.148          }
   2.149 @@ -576,7 +576,7 @@ static void mov_from_cr(int cr, int gp, 
   2.150          __vmx_bug(regs);
   2.151      }
   2.152  
   2.153 -    VMX_DBG_LOG(DBG_LEVEL_VMMU, "mov_from_cr: CR%d, value = %lx, \n", cr, value);
   2.154 +    VMX_DBG_LOG(DBG_LEVEL_VMMU, "mov_from_cr: CR%d, value = %lx,", cr, value);
   2.155  }
   2.156  
   2.157  static void vmx_cr_access (unsigned long exit_qualification, struct xen_regs *regs)
   2.158 @@ -631,7 +631,7 @@ static inline void vmx_vmexit_do_hlt()
   2.159      unsigned long eip;
   2.160      __vmread(GUEST_EIP, &eip);
   2.161  #endif
   2.162 -    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%p\n", eip);
   2.163 +    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%p", eip);
   2.164      __enter_scheduler();
   2.165  }
   2.166  
   2.167 @@ -641,7 +641,7 @@ static inline void vmx_vmexit_do_mwait()
   2.168      unsigned long eip;
   2.169      __vmread(GUEST_EIP, &eip);
   2.170  #endif
   2.171 -    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%p\n", eip);
   2.172 +    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%p", eip);
   2.173      __enter_scheduler();
   2.174  }
   2.175  
   2.176 @@ -733,7 +733,7 @@ asmlinkage void vmx_vmexit_handler(struc
   2.177              __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
   2.178              printk("#PG error code: %lx\n", error_code);
   2.179          }
   2.180 -        VMX_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x\n", 
   2.181 +        VMX_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x",
   2.182                  idtv_info_field);
   2.183      }
   2.184  
   2.185 @@ -741,7 +741,7 @@ asmlinkage void vmx_vmexit_handler(struc
   2.186      if (exit_reason != EXIT_REASON_EXTERNAL_INTERRUPT &&
   2.187          exit_reason != EXIT_REASON_VMCALL &&
   2.188          exit_reason != EXIT_REASON_IO_INSTRUCTION)
   2.189 -        VMX_DBG_LOG(DBG_LEVEL_0, "exit reason = %x\n", exit_reason);
   2.190 +        VMX_DBG_LOG(DBG_LEVEL_0, "exit reason = %x", exit_reason);
   2.191  
   2.192      if (exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) {
   2.193          domain_crash();         
   2.194 @@ -799,7 +799,7 @@ asmlinkage void vmx_vmexit_handler(struc
   2.195              __vmread(EXIT_QUALIFICATION, &va);
   2.196              __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
   2.197              VMX_DBG_LOG(DBG_LEVEL_VMMU, 
   2.198 -                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx\n",
   2.199 +                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
   2.200                          regs.eax, regs.ebx, regs.ecx, regs.edx, regs.esi,
   2.201                          regs.edi);
   2.202              ed->arch.arch_vmx.vmx_platform.mpci.inst_decoder_regs = &regs;
   2.203 @@ -893,7 +893,7 @@ asmlinkage void vmx_vmexit_handler(struc
   2.204          __get_instruction_length(inst_len);
   2.205          __vmread(EXIT_QUALIFICATION, &exit_qualification);
   2.206  
   2.207 -        VMX_DBG_LOG(DBG_LEVEL_1, "eip = %lx, inst_len =%lx, exit_qualification = %lx\n", 
   2.208 +        VMX_DBG_LOG(DBG_LEVEL_1, "eip = %lx, inst_len =%lx, exit_qualification = %lx", 
   2.209                  eip, inst_len, exit_qualification);
   2.210          vmx_cr_access(exit_qualification, &regs);
   2.211          __update_guest_eip(inst_len);
     3.1 --- a/xen/arch/x86/vmx_intercept.c	Thu Feb 17 21:06:48 2005 +0000
     3.2 +++ b/xen/arch/x86/vmx_intercept.c	Thu Feb 17 21:11:52 2005 +0000
     3.3 @@ -69,7 +69,7 @@ static void pit_cal_count(struct vmx_vir
     3.4  {
     3.5      unsigned int usec_delta = (unsigned int)((NOW() - vpit->inject_point) / 1000);
     3.6      if (usec_delta > vpit->period * 1000)
     3.7 -        VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT:long time has passed from last injection!\n");
     3.8 +        VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT:long time has passed from last injection!");
     3.9      vpit->count = vpit->init_val - ((usec_delta * PIT_FREQ / 1000000) % vpit->init_val );
    3.10  }
    3.11  
     4.1 --- a/xen/arch/x86/vmx_io.c	Thu Feb 17 21:06:48 2005 +0000
     4.2 +++ b/xen/arch/x86/vmx_io.c	Thu Feb 17 21:11:52 2005 +0000
     4.3 @@ -194,7 +194,7 @@ void vmx_io_assist(struct exec_domain *e
     4.4      vio = (vcpu_iodata_t *) ed->arch.arch_vmx.vmx_platform.shared_page_va;
     4.5      if (vio == 0) {
     4.6          VMX_DBG_LOG(DBG_LEVEL_1, 
     4.7 -                    "bad shared page: %lx\n", (unsigned long) vio);
     4.8 +                    "bad shared page: %lx", (unsigned long) vio);
     4.9          domain_crash();
    4.10      }
    4.11      p = &vio->vp_ioreq;
    4.12 @@ -313,7 +313,7 @@ static inline int find_highest_pending_i
    4.13      vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
    4.14      if (vio == 0) {
    4.15          VMX_DBG_LOG(DBG_LEVEL_1, 
    4.16 -                    "bad shared page: %lx\n", (unsigned long) vio);
    4.17 +                    "bad shared page: %lx", (unsigned long) vio);
    4.18          domain_crash();
    4.19      }
    4.20          
    4.21 @@ -327,7 +327,7 @@ static inline void clear_highest_bit(str
    4.22      vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
    4.23      if (vio == 0) {
    4.24          VMX_DBG_LOG(DBG_LEVEL_1, 
    4.25 -                    "bad shared page: %lx\n", (unsigned long) vio);
    4.26 +                    "bad shared page: %lx", (unsigned long) vio);
    4.27          domain_crash();
    4.28      }
    4.29          
    4.30 @@ -350,14 +350,14 @@ void vmx_intr_assist(struct exec_domain 
    4.31  
    4.32      __vmread(VM_ENTRY_INTR_INFO_FIELD, &intr_fields);
    4.33      if (intr_fields & INTR_INFO_VALID_MASK) {
    4.34 -        VMX_DBG_LOG(DBG_LEVEL_1, "vmx_intr_assist: intr_fields: %lx\n", 
    4.35 +        VMX_DBG_LOG(DBG_LEVEL_1, "vmx_intr_assist: intr_fields: %lx",
    4.36                      intr_fields);
    4.37          return;
    4.38      }
    4.39  
    4.40      __vmread(GUEST_EFLAGS, &eflags);
    4.41      if (irq_masked(eflags)) {
    4.42 -        VMX_DBG_LOG(DBG_LEVEL_1, "guesting pending: %x, eflags: %lx\n", 
    4.43 +        VMX_DBG_LOG(DBG_LEVEL_1, "guesting pending: %x, eflags: %lx",
    4.44                      highest_vector, eflags);
    4.45          return;
    4.46      }
     5.1 --- a/xen/arch/x86/vmx_vmcs.c	Thu Feb 17 21:06:48 2005 +0000
     5.2 +++ b/xen/arch/x86/vmx_vmcs.c	Thu Feb 17 21:11:52 2005 +0000
     5.3 @@ -113,7 +113,7 @@ int vmx_setup_platform(struct exec_domai
     5.4  
     5.5      n = context->ecx;
     5.6      if (n > 32) {
     5.7 -        VMX_DBG_LOG(DBG_LEVEL_1, "Too many e820 entries: %d\n", n);
     5.8 +        VMX_DBG_LOG(DBG_LEVEL_1, "Too many e820 entries: %d", n);
     5.9          return -1;
    5.10      }
    5.11