ia64/xen-unstable

changeset 11204:043a4aa24781

[XEN] Indentation cleanups (remove hard tabs).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 17 19:17:50 2006 +0100 (2006-08-17)
parents 7ecfd9b1f641
children b3bfff8b1c10
files xen/arch/x86/apic.c xen/arch/x86/boot/x86_32.S xen/arch/x86/delay.c xen/arch/x86/domain_build.c xen/arch/x86/extable.c xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/i8259.c xen/arch/x86/hvm/intercept.c xen/arch/x86/hvm/svm/instrlen.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/svm/vmcb.c xen/arch/x86/hvm/svm/x86_32/exits.S xen/arch/x86/hvm/svm/x86_64/exits.S xen/arch/x86/hvm/vioapic.c xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/hvm/vmx/x86_32/exits.S xen/arch/x86/hvm/vmx/x86_64/exits.S xen/arch/x86/i387.c xen/arch/x86/nmi.c xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_64/entry.S xen/drivers/video/vga.c xen/include/asm-x86/grant_table.h xen/include/asm-x86/hvm/support.h xen/include/asm-x86/hvm/svm/vmcb.h
line diff
     1.1 --- a/xen/arch/x86/apic.c	Thu Aug 17 19:17:30 2006 +0100
     1.2 +++ b/xen/arch/x86/apic.c	Thu Aug 17 19:17:50 2006 +0100
     1.3 @@ -10,8 +10,8 @@
     1.4   *                  thanks to Eric Gilmore
     1.5   *                  and Rolf G. Tews
     1.6   *                  for testing these extensively.
     1.7 - *	Maciej W. Rozycki	:	Various updates and fixes.
     1.8 - *	Mikael Pettersson	:	Power Management for UP-APIC.
     1.9 + *    Maciej W. Rozycki :   Various updates and fixes.
    1.10 + *    Mikael Pettersson :   Power Management for UP-APIC.
    1.11   *    Pavel Machek and
    1.12   *    Mikael Pettersson    :    PM converted to driver model.
    1.13   */
    1.14 @@ -166,7 +166,7 @@ void clear_local_APIC(void)
    1.15          apic_write_around(APIC_LVTTHMR, APIC_LVT_MASKED);
    1.16  #endif
    1.17      v = GET_APIC_VERSION(apic_read(APIC_LVR));
    1.18 -    if (APIC_INTEGRATED(v)) {	/* !82489DX */
    1.19 +    if (APIC_INTEGRATED(v)) {  /* !82489DX */
    1.20          if (maxlvt > 3)        /* Due to Pentium errata 3AP and 11AP. */
    1.21              apic_write(APIC_ESR, 0);
    1.22          apic_read(APIC_ESR);
    1.23 @@ -878,9 +878,9 @@ int __init calibrate_APIC_clock(void)
    1.24                      ((long)(t2-t1)/LOOPS)%(1000000/HZ));
    1.25  
    1.26      apic_printk(APIC_VERBOSE, "..... host bus clock speed is "
    1.27 -		"%ld.%04ld MHz.\n",
    1.28 -		result/(1000000/HZ),
    1.29 -		result%(1000000/HZ));
    1.30 +                "%ld.%04ld MHz.\n",
    1.31 +                result/(1000000/HZ),
    1.32 +                result%(1000000/HZ));
    1.33  
    1.34      /* set up multipliers for accurate timer code */
    1.35      bus_freq   = result*HZ;
     2.1 --- a/xen/arch/x86/boot/x86_32.S	Thu Aug 17 19:17:30 2006 +0100
     2.2 +++ b/xen/arch/x86/boot/x86_32.S	Thu Aug 17 19:17:50 2006 +0100
     2.3 @@ -7,22 +7,22 @@
     2.4  
     2.5  #define  SECONDARY_CPU_FLAG 0xA5A5A5A5
     2.6                  
     2.7 -       	.text
     2.8 +        .text
     2.9  
    2.10  ENTRY(start)
    2.11  ENTRY(stext)
    2.12  ENTRY(_stext)
    2.13          jmp __start
    2.14  
    2.15 -        .align	4
    2.16 +        .align 4
    2.17  
    2.18  /*** MULTIBOOT HEADER ****/
    2.19          /* Magic number indicating a Multiboot header. */
    2.20 -	.long	0x1BADB002
    2.21 -	/* Flags to bootloader (see Multiboot spec). */
    2.22 -	.long	0x00000003
    2.23 -	/* Checksum: must be the negated sum of the first two fields. */
    2.24 -	.long	-0x1BADB005
    2.25 +        .long 0x1BADB002
    2.26 +        /* Flags to bootloader (see Multiboot spec). */
    2.27 +        .long 0x00000003
    2.28 +        /* Checksum: must be the negated sum of the first two fields. */
    2.29 +        .long -0x1BADB005
    2.30          
    2.31  not_multiboot_msg:
    2.32          .asciz "ERR: Not a Multiboot bootloader!"
    2.33 @@ -57,8 +57,8 @@ 1:      lss     stack_start-__PAGE_OFFSE
    2.34          add     $(STACK_SIZE-CPUINFO_sizeof-__PAGE_OFFSET),%esp
    2.35  
    2.36          /* Reset EFLAGS (subsumes CLI and CLD). */
    2.37 -	pushl	$0
    2.38 -	popf
    2.39 +        pushl   $0
    2.40 +        popf
    2.41  
    2.42          /* Set up FPU. */
    2.43          fninit
    2.44 @@ -172,7 +172,7 @@ 1:      /* Paging enabled, so we can now
    2.45          je      start_secondary
    2.46  
    2.47          /* Call into main C routine. This should never return.*/
    2.48 -       	call	__start_xen
    2.49 +        call    __start_xen
    2.50          ud2     /* Force a panic (invalid opcode). */
    2.51  
    2.52  /* This is the default interrupt handler. */
    2.53 @@ -203,19 +203,19 @@ ENTRY(stack_start)
    2.54          
    2.55          .word   0    
    2.56  idt_descr:
    2.57 -        .word	256*8-1
    2.58 +        .word   256*8-1
    2.59  idt:
    2.60 -        .long	idt_table
    2.61 +        .long   idt_table
    2.62  
    2.63          .word   0
    2.64  gdt_descr:
    2.65 -        .word	LAST_RESERVED_GDT_BYTE
    2.66 +        .word   LAST_RESERVED_GDT_BYTE
    2.67  gdt:
    2.68          .long   gdt_table - FIRST_RESERVED_GDT_BYTE
    2.69  
    2.70          .word   0
    2.71  nopaging_gdt_descr:
    2.72 -        .word	LAST_RESERVED_GDT_BYTE
    2.73 +        .word   LAST_RESERVED_GDT_BYTE
    2.74          .long   gdt_table - FIRST_RESERVED_GDT_BYTE - __PAGE_OFFSET
    2.75          
    2.76          .org 0x1000
     3.1 --- a/xen/arch/x86/delay.c	Thu Aug 17 19:17:30 2006 +0100
     3.2 +++ b/xen/arch/x86/delay.c	Thu Aug 17 19:17:50 2006 +0100
     3.3 @@ -1,13 +1,13 @@
     3.4  /*
     3.5 - *	Precise Delay Loops for i386
     3.6 + * Precise Delay Loops for i386
     3.7   *
     3.8 - *	Copyright (C) 1993 Linus Torvalds
     3.9 - *	Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
    3.10 + * Copyright (C) 1993 Linus Torvalds
    3.11 + * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
    3.12   *
    3.13 - *	The __delay function must _NOT_ be inlined as its execution time
    3.14 - *	depends wildly on alignment on many x86 processors. The additional
    3.15 - *	jump magic is needed to get the timing stable on all the CPU's
    3.16 - *	we have to worry about.
    3.17 + * The __delay function must _NOT_ be inlined as its execution time
    3.18 + * depends wildly on alignment on many x86 processors. The additional
    3.19 + * jump magic is needed to get the timing stable on all the CPU's
    3.20 + * we have to worry about.
    3.21   */
    3.22  
    3.23  #include <xen/config.h>
     4.1 --- a/xen/arch/x86/domain_build.c	Thu Aug 17 19:17:30 2006 +0100
     4.2 +++ b/xen/arch/x86/domain_build.c	Thu Aug 17 19:17:50 2006 +0100
     4.3 @@ -119,7 +119,7 @@ static void process_dom0_ioports_disable
     4.4                     "in dom0_ioports_disable, skipping\n", t);
     4.5              continue;
     4.6          }
     4.7 -	
     4.8 +
     4.9          if ( *u == '\0' )
    4.10              io_to = io_from;
    4.11          else if ( *u == '-' )
     5.1 --- a/xen/arch/x86/extable.c	Thu Aug 17 19:17:30 2006 +0100
     5.2 +++ b/xen/arch/x86/extable.c	Thu Aug 17 19:17:50 2006 +0100
     5.3 @@ -41,8 +41,8 @@ void sort_exception_tables(void)
     5.4  
     5.5  static inline unsigned long
     5.6  search_one_table(const struct exception_table_entry *first,
     5.7 -		 const struct exception_table_entry *last,
     5.8 -		 unsigned long value)
     5.9 +                 const struct exception_table_entry *last,
    5.10 +                 unsigned long value)
    5.11  {
    5.12      const struct exception_table_entry *mid;
    5.13      long diff;
     6.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Aug 17 19:17:30 2006 +0100
     6.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 17 19:17:50 2006 +0100
     6.3 @@ -426,12 +426,12 @@ void hvm_print_line(struct vcpu *v, cons
     6.4  
     6.5      if (*index == HVM_PBUF_SIZE-2 || c == '\n') {
     6.6          if (*index == HVM_PBUF_SIZE-2)
     6.7 -	    pbuf[(*index)++] = c;
     6.8 +            pbuf[(*index)++] = c;
     6.9          pbuf[*index] = '\0';
    6.10          printk("(GUEST: %u) %s\n", v->domain->domain_id, pbuf);
    6.11 -	*index = 0;
    6.12 +        *index = 0;
    6.13      } else
    6.14 -	pbuf[(*index)++] = c;
    6.15 +        pbuf[(*index)++] = c;
    6.16  }
    6.17  
    6.18  typedef unsigned long hvm_hypercall_t(
     7.1 --- a/xen/arch/x86/hvm/i8259.c	Thu Aug 17 19:17:30 2006 +0100
     7.2 +++ b/xen/arch/x86/hvm/i8259.c	Thu Aug 17 19:17:50 2006 +0100
     7.3 @@ -57,7 +57,7 @@ static inline void pic_set_irq1(PicState
     7.4          if (level) {
     7.5              if ((s->last_irr & mask) == 0) {
     7.6                  s->irr |= mask;
     7.7 -	    }
     7.8 +            }
     7.9              s->last_irr |= mask;
    7.10          } else {
    7.11              s->last_irr &= ~mask;
    7.12 @@ -237,7 +237,7 @@ static void update_shared_irr(struct hvm
    7.13      BUG_ON(!spin_is_locked(&s->lock));
    7.14  
    7.15      get_sp(current->domain)->sp_global.pic_elcr = 
    7.16 -		s->pics[0].elcr | ((u16)s->pics[1].elcr << 8);
    7.17 +        s->pics[0].elcr | ((u16)s->pics[1].elcr << 8);
    7.18      pl =(uint8_t*)&get_sp(current->domain)->sp_global.pic_last_irr;
    7.19      pe =(uint8_t*)&get_sp(current->domain)->sp_global.pic_elcr;
    7.20      if ( c == &s->pics[0] ) {
    7.21 @@ -550,7 +550,7 @@ static int intercept_elcr_io(ioreq_t *p)
    7.22          spin_lock_irqsave(&s->lock, flags);
    7.23          elcr_ioport_write((void*)&s->pics[p->addr&1],
    7.24                  (uint32_t) p->addr, (uint32_t)( data & 0xff));
    7.25 -    	get_sp(current->domain)->sp_global.pic_elcr = 
    7.26 +        get_sp(current->domain)->sp_global.pic_elcr = 
    7.27              s->pics[0].elcr | ((u16)s->pics[1].elcr << 8);
    7.28          spin_unlock_irqrestore(&s->lock, flags);
    7.29      }
     8.1 --- a/xen/arch/x86/hvm/intercept.c	Thu Aug 17 19:17:30 2006 +0100
     8.2 +++ b/xen/arch/x86/hvm/intercept.c	Thu Aug 17 19:17:50 2006 +0100
     8.3 @@ -284,7 +284,7 @@ static __inline__ void missed_ticks(stru
     8.4  
     8.5      missed_ticks = NOW() - pt->scheduled;
     8.6      if ( missed_ticks > 0 ) {
     8.7 -	missed_ticks = missed_ticks / (s_time_t) pt->period + 1;
     8.8 +        missed_ticks = missed_ticks / (s_time_t) pt->period + 1;
     8.9          if ( missed_ticks > 1000 ) {
    8.10              /* TODO: Adjust guest time togther */
    8.11              pt->pending_intr_nr++;
     9.1 --- a/xen/arch/x86/hvm/svm/instrlen.c	Thu Aug 17 19:17:30 2006 +0100
     9.2 +++ b/xen/arch/x86/hvm/svm/instrlen.c	Thu Aug 17 19:17:50 2006 +0100
     9.3 @@ -464,7 +464,7 @@ done_prefixes:
     9.4              case 4: insn_fetch(int32_t, 4, _regs.eip, length); break;
     9.5              }
     9.6              goto done;
     9.7 -	}
     9.8 +        }
     9.9          break;
    9.10      }
    9.11  
    10.1 --- a/xen/arch/x86/hvm/svm/svm.c	Thu Aug 17 19:17:30 2006 +0100
    10.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Thu Aug 17 19:17:50 2006 +0100
    10.3 @@ -58,7 +58,7 @@ extern int inst_copy_from_guest(unsigned
    10.4                                  int inst_len);
    10.5  extern asmlinkage void do_IRQ(struct cpu_user_regs *);
    10.6  extern void send_pio_req(struct cpu_user_regs *regs, unsigned long port,
    10.7 -       unsigned long count, int size, long value, int dir, int pvalid);
    10.8 +                         unsigned long count, int size, long value, int dir, int pvalid);
    10.9  extern int svm_instrlen(struct cpu_user_regs *regs, int mode);
   10.10  extern void svm_dump_inst(unsigned long eip);
   10.11  extern int svm_dbg_on;
   10.12 @@ -66,7 +66,7 @@ void svm_dump_regs(const char *from, str
   10.13  
   10.14  static void svm_relinquish_guest_resources(struct domain *d);
   10.15  static int svm_do_vmmcall_reset_to_realmode(struct vcpu *v,
   10.16 -        struct cpu_user_regs *regs);
   10.17 +                                            struct cpu_user_regs *regs);
   10.18  
   10.19  /* va of hardware host save area     */
   10.20  static void *hsa[NR_CPUS] __read_mostly;
   10.21 @@ -107,7 +107,7 @@ void asidpool_init(int core)
   10.22      /* Host ASID is always in use */
   10.23      per_cpu(asid_pool,core).asid[INITIAL_ASID] = ASID_INUSE;
   10.24      for ( i = 1; i < ASID_MAX; i++ )
   10.25 -       per_cpu(asid_pool,core).asid[i] = ASID_AVAILABLE;
   10.26 +        per_cpu(asid_pool,core).asid[i] = ASID_AVAILABLE;
   10.27  }
   10.28  
   10.29  
   10.30 @@ -139,7 +139,7 @@ static int asidpool_fetch_next(struct vm
   10.31   *                           available.
   10.32   */
   10.33  int asidpool_assign_next( struct vmcb_struct *vmcb, int retire_current,
   10.34 -                             int oldcore, int newcore )
   10.35 +                          int oldcore, int newcore )
   10.36  {
   10.37      int i;
   10.38      int res = 1;
   10.39 @@ -147,8 +147,8 @@ int asidpool_assign_next( struct vmcb_st
   10.40  
   10.41      spin_lock(&per_cpu(asid_pool,oldcore).asid_lock);
   10.42      if( retire_current && vmcb->guest_asid ) {
   10.43 -       per_cpu(asid_pool,oldcore).asid[vmcb->guest_asid & (ASID_MAX-1)] = 
   10.44 -           ASID_RETIRED;
   10.45 +        per_cpu(asid_pool,oldcore).asid[vmcb->guest_asid & (ASID_MAX-1)] = 
   10.46 +            ASID_RETIRED;
   10.47      }
   10.48      spin_unlock(&per_cpu(asid_pool,oldcore).asid_lock);
   10.49      spin_lock(&per_cpu(asid_pool,newcore).asid_lock);
   10.50 @@ -171,12 +171,12 @@ int asidpool_assign_next( struct vmcb_st
   10.51  
   10.52  void asidpool_retire( struct vmcb_struct *vmcb, int core )
   10.53  {
   10.54 -   spin_lock(&per_cpu(asid_pool,core).asid_lock);
   10.55 -   if( vmcb->guest_asid ) {
   10.56 -       per_cpu(asid_pool,core).asid[vmcb->guest_asid & (ASID_MAX-1)] = 
   10.57 -           ASID_RETIRED;
   10.58 -   }
   10.59 -   spin_unlock(&per_cpu(asid_pool,core).asid_lock);
   10.60 +    spin_lock(&per_cpu(asid_pool,core).asid_lock);
   10.61 +    if( vmcb->guest_asid ) {
   10.62 +        per_cpu(asid_pool,core).asid[vmcb->guest_asid & (ASID_MAX-1)] = 
   10.63 +            ASID_RETIRED;
   10.64 +    }
   10.65 +    spin_unlock(&per_cpu(asid_pool,core).asid_lock);
   10.66  }
   10.67  
   10.68  static inline void svm_inject_exception(struct vcpu *v, int trap, 
   10.69 @@ -286,26 +286,26 @@ static inline int long_mode_do_msr_read(
   10.70          break;
   10.71  
   10.72      case MSR_STAR:
   10.73 -         msr_content = vmcb->star;
   10.74 -         break;
   10.75 +        msr_content = vmcb->star;
   10.76 +        break;
   10.77   
   10.78      case MSR_LSTAR:
   10.79 -         msr_content = vmcb->lstar;
   10.80 -         break;
   10.81 +        msr_content = vmcb->lstar;
   10.82 +        break;
   10.83   
   10.84      case MSR_CSTAR:
   10.85 -         msr_content = vmcb->cstar;
   10.86 -         break;
   10.87 +        msr_content = vmcb->cstar;
   10.88 +        break;
   10.89   
   10.90      case MSR_SYSCALL_MASK:
   10.91 -         msr_content = vmcb->sfmask;
   10.92 -         break;
   10.93 +        msr_content = vmcb->sfmask;
   10.94 +        break;
   10.95      default:
   10.96          return 0;
   10.97      }
   10.98  
   10.99      HVM_DBG_LOG(DBG_LEVEL_2, "mode_do_msr_read: msr_content: %"PRIx64"\n", 
  10.100 -            msr_content);
  10.101 +                msr_content);
  10.102  
  10.103      regs->eax = msr_content & 0xffffffff;
  10.104      regs->edx = msr_content >> 32;
  10.105 @@ -378,24 +378,24 @@ static inline int long_mode_do_msr_write
  10.106          break;
  10.107  
  10.108      case MSR_SHADOW_GS_BASE:
  10.109 -         vmcb->kerngsbase = msr_content;
  10.110 -         break;
  10.111 +        vmcb->kerngsbase = msr_content;
  10.112 +        break;
  10.113   
  10.114      case MSR_STAR:
  10.115 -         vmcb->star = msr_content;
  10.116 -         break;
  10.117 +        vmcb->star = msr_content;
  10.118 +        break;
  10.119   
  10.120      case MSR_LSTAR:
  10.121 -         vmcb->lstar = msr_content;
  10.122 -         break;
  10.123 +        vmcb->lstar = msr_content;
  10.124 +        break;
  10.125   
  10.126      case MSR_CSTAR:
  10.127 -         vmcb->cstar = msr_content;
  10.128 -         break;
  10.129 +        vmcb->cstar = msr_content;
  10.130 +        break;
  10.131   
  10.132      case MSR_SYSCALL_MASK:
  10.133 -         vmcb->sfmask = msr_content;
  10.134 -         break;
  10.135 +        vmcb->sfmask = msr_content;
  10.136 +        break;
  10.137  
  10.138      default:
  10.139          return 0;
  10.140 @@ -581,9 +581,9 @@ static inline int svm_do_debugout(unsign
  10.141  
  10.142  #if 0
  10.143      if ((exit_code == 0x4E 
  10.144 -                || exit_code == VMEXIT_CR0_READ 
  10.145 -                || exit_code == VMEXIT_CR0_WRITE) 
  10.146 -            && counter < 200000)
  10.147 +         || exit_code == VMEXIT_CR0_READ 
  10.148 +         || exit_code == VMEXIT_CR0_WRITE) 
  10.149 +        && counter < 200000)
  10.150          return 0;
  10.151  
  10.152      if ((exit_code == 0x4E) && counter < 500000)
  10.153 @@ -688,18 +688,18 @@ static void arch_svm_do_launch(struct vc
  10.154  #endif
  10.155      if (v->vcpu_id != 0) 
  10.156      {
  10.157 -    	u16	cs_sel = regs->cs;
  10.158 -    	/*
  10.159 +        u16 cs_sel = regs->cs;
  10.160 +        /*
  10.161           * This is the launch of an AP; set state so that we begin executing
  10.162 -    	 * the trampoline code in real-mode.
  10.163 +         * the trampoline code in real-mode.
  10.164           */
  10.165 -    	svm_do_vmmcall_reset_to_realmode(v, regs); 	
  10.166 -    	/* Adjust the state to execute the trampoline code.*/
  10.167 -    	v->arch.hvm_svm.vmcb->rip = 0;
  10.168 -    	v->arch.hvm_svm.vmcb->cs.sel= cs_sel;
  10.169 -    	v->arch.hvm_svm.vmcb->cs.base = (cs_sel << 4);
  10.170 +        svm_do_vmmcall_reset_to_realmode(v, regs);  
  10.171 +        /* Adjust the state to execute the trampoline code.*/
  10.172 +        v->arch.hvm_svm.vmcb->rip = 0;
  10.173 +        v->arch.hvm_svm.vmcb->cs.sel= cs_sel;
  10.174 +        v->arch.hvm_svm.vmcb->cs.base = (cs_sel << 4);
  10.175      }
  10.176 -     	
  10.177 +      
  10.178      reset_stack_and_jump(svm_asm_do_launch);
  10.179  }
  10.180  
  10.181 @@ -776,7 +776,7 @@ int start_svm(void)
  10.182      u64 phys_hsa;
  10.183      int cpu = smp_processor_id();
  10.184   
  10.185 -   /* Xen does not fill x86_capability words except 0. */
  10.186 +    /* Xen does not fill x86_capability words except 0. */
  10.187      ecx = cpuid_ecx(0x80000001);
  10.188      boot_cpu_data.x86_capability[5] = ecx;
  10.189      
  10.190 @@ -888,7 +888,7 @@ void arch_svm_do_resume(struct vcpu *v)
  10.191      else {
  10.192          if (svm_dbg_on)
  10.193              printk("VCPU core pinned: %d to %d\n", 
  10.194 -                v->arch.hvm_svm.launch_core, smp_processor_id() );
  10.195 +                   v->arch.hvm_svm.launch_core, smp_processor_id() );
  10.196          v->arch.hvm_svm.launch_core = smp_processor_id();
  10.197          svm_migrate_timers( v );
  10.198          hvm_do_resume( v );
  10.199 @@ -910,8 +910,8 @@ static int svm_do_page_fault(unsigned lo
  10.200  //#if HVM_DEBUG
  10.201      eip = vmcb->rip;
  10.202      HVM_DBG_LOG(DBG_LEVEL_VMMU, 
  10.203 -            "svm_do_page_fault = 0x%lx, eip = %lx, error_code = %lx",
  10.204 -            va, eip, (unsigned long)regs->error_code);
  10.205 +                "svm_do_page_fault = 0x%lx, eip = %lx, error_code = %lx",
  10.206 +                va, eip, (unsigned long)regs->error_code);
  10.207  //#endif
  10.208  
  10.209      result = shadow2_fault(va, regs); 
  10.210 @@ -938,7 +938,7 @@ static void svm_do_no_device_fault(struc
  10.211  
  10.212  
  10.213  static void svm_do_general_protection_fault(struct vcpu *v, 
  10.214 -        struct cpu_user_regs *regs) 
  10.215 +                                            struct cpu_user_regs *regs) 
  10.216  {
  10.217      struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
  10.218      unsigned long eip, error_code;
  10.219 @@ -961,10 +961,10 @@ static void svm_do_general_protection_fa
  10.220                  eip, error_code);
  10.221  
  10.222      HVM_DBG_LOG(DBG_LEVEL_1, 
  10.223 -            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  10.224 -            (unsigned long)regs->eax, (unsigned long)regs->ebx,
  10.225 -            (unsigned long)regs->ecx, (unsigned long)regs->edx,
  10.226 -            (unsigned long)regs->esi, (unsigned long)regs->edi);
  10.227 +                "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  10.228 +                (unsigned long)regs->eax, (unsigned long)regs->ebx,
  10.229 +                (unsigned long)regs->ecx, (unsigned long)regs->edx,
  10.230 +                (unsigned long)regs->esi, (unsigned long)regs->edi);
  10.231        
  10.232      /* Reflect it back into the guest */
  10.233      svm_inject_exception(v, TRAP_gp_fault, 1, error_code);
  10.234 @@ -976,7 +976,7 @@ static void svm_do_general_protection_fa
  10.235  #define SVM_VCPU_CPUID_L1_EDX_RESERVED 0xe8740400
  10.236  
  10.237  static void svm_vmexit_do_cpuid(struct vmcb_struct *vmcb, unsigned long input, 
  10.238 -        struct cpu_user_regs *regs) 
  10.239 +                                struct cpu_user_regs *regs) 
  10.240  {
  10.241      unsigned int eax, ebx, ecx, edx;
  10.242      unsigned long eip;
  10.243 @@ -988,18 +988,18 @@ static void svm_vmexit_do_cpuid(struct v
  10.244      eip = vmcb->rip;
  10.245  
  10.246      HVM_DBG_LOG(DBG_LEVEL_1, 
  10.247 -            "do_cpuid: (eax) %lx, (ebx) %lx, (ecx) %lx, (edx) %lx,"
  10.248 -            " (esi) %lx, (edi) %lx",
  10.249 -            (unsigned long)regs->eax, (unsigned long)regs->ebx,
  10.250 -            (unsigned long)regs->ecx, (unsigned long)regs->edx,
  10.251 -            (unsigned long)regs->esi, (unsigned long)regs->edi);
  10.252 +                "do_cpuid: (eax) %lx, (ebx) %lx, (ecx) %lx, (edx) %lx,"
  10.253 +                " (esi) %lx, (edi) %lx",
  10.254 +                (unsigned long)regs->eax, (unsigned long)regs->ebx,
  10.255 +                (unsigned long)regs->ecx, (unsigned long)regs->edx,
  10.256 +                (unsigned long)regs->esi, (unsigned long)regs->edi);
  10.257  
  10.258      cpuid(input, &eax, &ebx, &ecx, &edx);
  10.259  
  10.260      if (input == 0x00000001)
  10.261      {
  10.262          if ( !hvm_apic_support(v->domain) ||
  10.263 -                !vlapic_global_enabled((VLAPIC(v))) )
  10.264 +             !vlapic_global_enabled((VLAPIC(v))) )
  10.265          {
  10.266              /* Since the apic is disabled, avoid any confusion 
  10.267                 about SMP cpus being available */
  10.268 @@ -1091,9 +1091,9 @@ static void svm_vmexit_do_cpuid(struct v
  10.269      regs->edx = (unsigned long)edx;
  10.270  
  10.271      HVM_DBG_LOG(DBG_LEVEL_1, 
  10.272 -            "svm_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, "
  10.273 -            "ebx=%x, ecx=%x, edx=%x",
  10.274 -            eip, input, eax, ebx, ecx, edx);
  10.275 +                "svm_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, "
  10.276 +                "ebx=%x, ecx=%x, edx=%x",
  10.277 +                eip, input, eax, ebx, ecx, edx);
  10.278  
  10.279      inst_len = __get_instruction_length(vmcb, INSTR_CPUID, NULL);
  10.280      ASSERT(inst_len > 0);
  10.281 @@ -1102,7 +1102,7 @@ static void svm_vmexit_do_cpuid(struct v
  10.282  
  10.283  
  10.284  static inline unsigned long *get_reg_p(unsigned int gpreg, 
  10.285 -        struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.286 +                                       struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.287  {
  10.288      unsigned long *reg_p = NULL;
  10.289      switch (gpreg)
  10.290 @@ -1166,7 +1166,7 @@ static inline unsigned long *get_reg_p(u
  10.291  
  10.292  
  10.293  static inline unsigned long get_reg(unsigned int gpreg, 
  10.294 -        struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.295 +                                    struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.296  {
  10.297      unsigned long *gp;
  10.298      gp = get_reg_p(gpreg, regs, vmcb);
  10.299 @@ -1175,7 +1175,7 @@ static inline unsigned long get_reg(unsi
  10.300  
  10.301  
  10.302  static inline void set_reg(unsigned int gpreg, unsigned long value, 
  10.303 -        struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.304 +                           struct cpu_user_regs *regs, struct vmcb_struct *vmcb)
  10.305  {
  10.306      unsigned long *gp;
  10.307      gp = get_reg_p(gpreg, regs, vmcb);
  10.308 @@ -1184,7 +1184,7 @@ static inline void set_reg(unsigned int 
  10.309                             
  10.310  
  10.311  static void svm_dr_access (struct vcpu *v, unsigned int reg, unsigned int type,
  10.312 -        struct cpu_user_regs *regs)
  10.313 +                           struct cpu_user_regs *regs)
  10.314  {
  10.315      unsigned long *reg_p = 0;
  10.316      unsigned int gpreg = 0;
  10.317 @@ -1212,7 +1212,7 @@ static void svm_dr_access (struct vcpu *
  10.318      ASSERT(reg == decode_dest_reg(prefix, buffer[index + 2]));
  10.319  
  10.320      HVM_DBG_LOG(DBG_LEVEL_1, "svm_dr_access : eip=%lx, reg=%d, gpreg = %x",
  10.321 -            eip, reg, gpreg);
  10.322 +                eip, reg, gpreg);
  10.323  
  10.324      reg_p = get_reg_p(gpreg, regs, vmcb);
  10.325          
  10.326 @@ -1244,7 +1244,7 @@ static void svm_get_prefix_info(
  10.327  
  10.328      memset(inst, 0, MAX_INST_LEN);
  10.329      if (inst_copy_from_guest(inst, svm_rip2pointer(vmcb), sizeof(inst)) 
  10.330 -            != MAX_INST_LEN) 
  10.331 +        != MAX_INST_LEN) 
  10.332      {
  10.333          printk("%s: get guest instruction failed\n", __func__);
  10.334          domain_crash_synchronous();
  10.335 @@ -1531,8 +1531,8 @@ static int svm_set_cr0(unsigned long val
  10.336      {
  10.337          /* The guest CR3 must be pointing to the guest physical. */
  10.338          if (!VALID_MFN(mfn = 
  10.339 -                    get_mfn_from_gpfn(v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT))
  10.340 -                || !get_page(mfn_to_page(mfn), v->domain))
  10.341 +                       get_mfn_from_gpfn(v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT))
  10.342 +            || !get_page(mfn_to_page(mfn), v->domain))
  10.343          {
  10.344              printk("Invalid CR3 value = %lx\n", v->arch.hvm_svm.cpu_cr3);
  10.345              domain_crash_synchronous(); /* need to take a clean path */
  10.346 @@ -1540,8 +1540,8 @@ static int svm_set_cr0(unsigned long val
  10.347  
  10.348  #if defined(__x86_64__)
  10.349          if (test_bit(SVM_CPU_STATE_LME_ENABLED, &v->arch.hvm_svm.cpu_state) 
  10.350 -                && !test_bit(SVM_CPU_STATE_PAE_ENABLED, 
  10.351 -                    &v->arch.hvm_svm.cpu_state))
  10.352 +            && !test_bit(SVM_CPU_STATE_PAE_ENABLED, 
  10.353 +                         &v->arch.hvm_svm.cpu_state))
  10.354          {
  10.355              HVM_DBG_LOG(DBG_LEVEL_1, "Enable paging before PAE enable\n");
  10.356              svm_inject_exception(v, TRAP_gp_fault, 1, 0);
  10.357 @@ -1565,7 +1565,7 @@ static int svm_set_cr0(unsigned long val
  10.358          shadow2_update_paging_modes(v);
  10.359  
  10.360          HVM_DBG_LOG(DBG_LEVEL_VMMU, "New arch.guest_table = %lx", 
  10.361 -                (unsigned long) (mfn << PAGE_SHIFT));
  10.362 +                    (unsigned long) (mfn << PAGE_SHIFT));
  10.363  
  10.364          vmcb->cr3 = v->arch.hvm_vcpu.hw_cr3; 
  10.365          set_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags);
  10.366 @@ -1574,7 +1574,7 @@ static int svm_set_cr0(unsigned long val
  10.367      if ( !((value & X86_CR0_PE) && (value & X86_CR0_PG)) && paging_enabled )
  10.368          if ( v->arch.hvm_svm.cpu_cr3 ) {
  10.369              put_page(mfn_to_page(get_mfn_from_gpfn(
  10.370 -                      v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT)));
  10.371 +                v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT)));
  10.372              v->arch.guest_table = pagetable_null();
  10.373          }
  10.374  
  10.375 @@ -1621,7 +1621,7 @@ static void mov_from_cr(int cr, int gp, 
  10.376          value = v->arch.hvm_svm.cpu_shadow_cr0;
  10.377          if (svm_dbg_on)
  10.378              printk("CR0 read =%lx \n", value );
  10.379 -          break;
  10.380 +        break;
  10.381      case 2:
  10.382          value = vmcb->cr2;
  10.383          break;
  10.384 @@ -1629,11 +1629,11 @@ static void mov_from_cr(int cr, int gp, 
  10.385          value = (unsigned long) v->arch.hvm_svm.cpu_cr3;
  10.386          if (svm_dbg_on)
  10.387              printk("CR3 read =%lx \n", value );
  10.388 -          break;
  10.389 +        break;
  10.390      case 4:
  10.391          value = (unsigned long) v->arch.hvm_svm.cpu_shadow_cr4;
  10.392          if (svm_dbg_on)
  10.393 -           printk( "CR4 read=%lx\n", value );
  10.394 +            printk( "CR4 read=%lx\n", value );
  10.395          break;
  10.396      case 8:
  10.397  #if 0
  10.398 @@ -1655,7 +1655,7 @@ static void mov_from_cr(int cr, int gp, 
  10.399  
  10.400  static inline int svm_pgbit_test(struct vcpu *v)
  10.401  {
  10.402 -   return v->arch.hvm_svm.cpu_shadow_cr0 & X86_CR0_PG;
  10.403 +    return v->arch.hvm_svm.cpu_shadow_cr0 & X86_CR0_PG;
  10.404  }
  10.405  
  10.406  
  10.407 @@ -1716,8 +1716,8 @@ static int mov_to_cr(int gpreg, int cr, 
  10.408               */
  10.409              HVM_DBG_LOG(DBG_LEVEL_VMMU, "CR3 value = %lx", value);
  10.410              if (((value >> PAGE_SHIFT) > v->domain->max_pages) 
  10.411 -                    || !VALID_MFN(mfn = get_mfn_from_gpfn(value >> PAGE_SHIFT))
  10.412 -                    || !get_page(mfn_to_page(mfn), v->domain))
  10.413 +                || !VALID_MFN(mfn = get_mfn_from_gpfn(value >> PAGE_SHIFT))
  10.414 +                || !get_page(mfn_to_page(mfn), v->domain))
  10.415              {
  10.416                  printk("Invalid CR3 value=%lx\n", value);
  10.417                  domain_crash_synchronous(); /* need to take a clean path */
  10.418 @@ -1744,7 +1744,7 @@ static int mov_to_cr(int gpreg, int cr, 
  10.419      {
  10.420          if (svm_dbg_on)
  10.421              printk( "write cr4=%lx, cr0=%lx\n", 
  10.422 -                     value,  v->arch.hvm_svm.cpu_shadow_cr0 );
  10.423 +                    value,  v->arch.hvm_svm.cpu_shadow_cr0 );
  10.424          old_cr = v->arch.hvm_svm.cpu_shadow_cr4;
  10.425          if ( value & X86_CR4_PAE && !(old_cr & X86_CR4_PAE) )
  10.426          {
  10.427 @@ -1756,7 +1756,7 @@ static int mov_to_cr(int gpreg, int cr, 
  10.428                  unsigned long mfn, old_base_mfn;
  10.429  
  10.430                  if ( !VALID_MFN(mfn = get_mfn_from_gpfn(
  10.431 -                                    v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT)) ||
  10.432 +                    v->arch.hvm_svm.cpu_cr3 >> PAGE_SHIFT)) ||
  10.433                       !get_page(mfn_to_page(mfn), v->domain) )
  10.434                  {
  10.435                      printk("Invalid CR3 value = %lx", v->arch.hvm_svm.cpu_cr3);
  10.436 @@ -1826,7 +1826,7 @@ static int mov_to_cr(int gpreg, int cr, 
  10.437  
  10.438  
  10.439  static int svm_cr_access(struct vcpu *v, unsigned int cr, unsigned int type,
  10.440 -        struct cpu_user_regs *regs)
  10.441 +                         struct cpu_user_regs *regs)
  10.442  {
  10.443      struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
  10.444      int inst_len = 0;
  10.445 @@ -1850,13 +1850,13 @@ static int svm_cr_access(struct vcpu *v,
  10.446      
  10.447      if (type == TYPE_MOV_TO_CR) 
  10.448      {
  10.449 -        inst_len = __get_instruction_length_from_list(vmcb, list_a, 
  10.450 -                ARR_SIZE(list_a), &buffer[index], &match);
  10.451 +        inst_len = __get_instruction_length_from_list(
  10.452 +            vmcb, list_a, ARR_SIZE(list_a), &buffer[index], &match);
  10.453      }
  10.454      else
  10.455      {
  10.456 -        inst_len = __get_instruction_length_from_list(vmcb, list_b, 
  10.457 -                ARR_SIZE(list_b), &buffer[index], &match);
  10.458 +        inst_len = __get_instruction_length_from_list(
  10.459 +            vmcb, list_b, ARR_SIZE(list_b), &buffer[index], &match);
  10.460      }
  10.461  
  10.462      ASSERT(inst_len > 0);
  10.463 @@ -1898,7 +1898,7 @@ static int svm_cr_access(struct vcpu *v,
  10.464  
  10.465          if (svm_dbg_on)
  10.466              printk("CR0-LMSW value=%lx, reg=%d, inst_len=%d\n", value, gpreg, 
  10.467 -                    inst_len);
  10.468 +                   inst_len);
  10.469  
  10.470          value = (v->arch.hvm_svm.cpu_shadow_cr0 & ~0xF) | value;
  10.471  
  10.472 @@ -1917,7 +1917,7 @@ static int svm_cr_access(struct vcpu *v,
  10.473  
  10.474          if (svm_dbg_on)
  10.475              printk("CR0-SMSW value=%lx, reg=%d, inst_len=%d\n", value, gpreg, 
  10.476 -                    inst_len);
  10.477 +                   inst_len);
  10.478          break;
  10.479  
  10.480      default:
  10.481 @@ -1943,9 +1943,9 @@ static inline void svm_do_msr_access(
  10.482      ASSERT(vmcb);
  10.483  
  10.484      HVM_DBG_LOG(DBG_LEVEL_1, "svm_do_msr_access: ecx=%lx, eax=%lx, edx=%lx, "
  10.485 -            "exitinfo = %lx", (unsigned long)regs->ecx, 
  10.486 -            (unsigned long)regs->eax, (unsigned long)regs->edx, 
  10.487 -            (unsigned long)vmcb->exitinfo1);
  10.488 +                "exitinfo = %lx", (unsigned long)regs->ecx, 
  10.489 +                (unsigned long)regs->eax, (unsigned long)regs->edx, 
  10.490 +                (unsigned long)vmcb->exitinfo1);
  10.491  
  10.492      /* is it a read? */
  10.493      if (vmcb->exitinfo1 == 0)
  10.494 @@ -2015,7 +2015,7 @@ static inline void svm_do_msr_access(
  10.495          }
  10.496      }
  10.497  
  10.498 -done:
  10.499 + done:
  10.500  
  10.501      HVM_DBG_LOG(DBG_LEVEL_1, "svm_do_msr_access returns: "
  10.502                  "ecx=%lx, eax=%lx, edx=%lx",
  10.503 @@ -2033,7 +2033,7 @@ static inline void svm_vmexit_do_hlt(str
  10.504      /* Check for interrupt not handled or new interrupt. */
  10.505      if ( (vmcb->rflags & X86_EFLAGS_IF) &&
  10.506           (vmcb->vintr.fields.irq || cpu_has_pending_irq(current)) )
  10.507 -       return;
  10.508 +        return;
  10.509  
  10.510      hvm_hlt(vmcb->rflags);
  10.511  }
  10.512 @@ -2062,7 +2062,7 @@ static void svm_vmexit_do_invd(struct vm
  10.513  
  10.514  #ifdef XEN_DEBUGGER
  10.515  static void svm_debug_save_cpu_user_regs(struct vmcb_struct *vmcb, 
  10.516 -        struct cpu_user_regs *regs)
  10.517 +                                         struct cpu_user_regs *regs)
  10.518  {
  10.519      regs->eip = vmcb->rip;
  10.520      regs->esp = vmcb->rsp;
  10.521 @@ -2110,7 +2110,7 @@ void svm_handle_invlpg(const short invlp
  10.522      {
  10.523          printk("svm_handle_invlpg (): Error reading memory %d bytes\n", 
  10.524                 length);
  10.525 -       __hvm_bug(regs);
  10.526 +        __hvm_bug(regs);
  10.527      }
  10.528  
  10.529      if (invlpga)
  10.530 @@ -2141,7 +2141,7 @@ void svm_handle_invlpg(const short invlp
  10.531           * the system in either 32- or 64-bit mode.
  10.532           */
  10.533          g_vaddr = get_effective_addr_modrm64(vmcb, regs, prefix, 
  10.534 -                            &opcode[inst_len], &length);
  10.535 +                                             &opcode[inst_len], &length);
  10.536  
  10.537          inst_len += length;
  10.538          __update_guest_eip (vmcb, inst_len);
  10.539 @@ -2160,7 +2160,7 @@ void svm_handle_invlpg(const short invlp
  10.540   * returns 0 on success, non-zero otherwise
  10.541   */
  10.542  static int svm_do_vmmcall_reset_to_realmode(struct vcpu *v, 
  10.543 -        struct cpu_user_regs *regs)
  10.544 +                                            struct cpu_user_regs *regs)
  10.545  {
  10.546      struct vmcb_struct *vmcb;
  10.547  
  10.548 @@ -2523,7 +2523,7 @@ void walk_shadow_and_guest_pt(unsigned l
  10.549      gpa = shadow2_gva_to_gpa(current, gva);
  10.550      printk( "gva = %lx, gpa=%lx, gCR3=%x\n", gva, gpa, (u32)vmcb->cr3 );
  10.551      if( !svm_paging_enabled(v) || mmio_space(gpa) )
  10.552 -       return;
  10.553 +        return;
  10.554  
  10.555      /* let's dump the guest and shadow page info */
  10.556  
  10.557 @@ -2546,7 +2546,7 @@ void walk_shadow_and_guest_pt(unsigned l
  10.558      printk( "G-PTE = %x, flags=%x\n", gpte.l1, l1e_get_flags(gpte) );
  10.559  
  10.560      BUG(); // need to think about this, and convert usage of
  10.561 -           // phys_to_machine_mapping to use pagetable format...
  10.562 +    // phys_to_machine_mapping to use pagetable format...
  10.563      __copy_from_user( &spte, &phys_to_machine_mapping[ l1e_get_pfn( gpte ) ], 
  10.564                        sizeof(spte) );
  10.565  
  10.566 @@ -2581,100 +2581,105 @@ asmlinkage void svm_vmexit_handler(struc
  10.567      }
  10.568  
  10.569  #ifdef SVM_EXTRA_DEBUG
  10.570 -{
  10.571 +    {
  10.572  #if defined(__i386__)
  10.573 -#define	rip	eip
  10.574 +#define rip eip
  10.575  #endif
  10.576  
  10.577 -    static unsigned long intercepts_counter = 0;
  10.578 -
  10.579 -    if (svm_dbg_on && exit_reason == VMEXIT_EXCEPTION_PF) 
  10.580 -    {
  10.581 -        if (svm_paging_enabled(v) && 
  10.582 -            !mmio_space(shadow2_gva_to_gpa(current, vmcb->exitinfo2)))
  10.583 -        {
  10.584 -            printk("I%08ld,ExC=%s(%d),IP=%x:%llx,I1=%llx,I2=%llx,INT=%llx, "
  10.585 -                   "gpa=%llx\n", intercepts_counter,
  10.586 -                    exit_reasons[exit_reason], exit_reason, regs.cs,
  10.587 -		    (unsigned long long) regs.rip,
  10.588 -		    (unsigned long long) vmcb->exitinfo1,
  10.589 -		    (unsigned long long) vmcb->exitinfo2,
  10.590 -		    (unsigned long long) vmcb->exitintinfo.bytes,
  10.591 -            (unsigned long long) shadow2_gva_to_gpa(current, vmcb->exitinfo2));
  10.592 -        }
  10.593 -        else 
  10.594 +        static unsigned long intercepts_counter = 0;
  10.595 +
  10.596 +        if (svm_dbg_on && exit_reason == VMEXIT_EXCEPTION_PF) 
  10.597          {
  10.598 -            printk("I%08ld,ExC=%s(%d),IP=%x:%llx,I1=%llx,I2=%llx,INT=%llx\n", 
  10.599 -                    intercepts_counter,
  10.600 -                    exit_reasons[exit_reason], exit_reason, regs.cs,
  10.601 -		    (unsigned long long) regs.rip,
  10.602 -		    (unsigned long long) vmcb->exitinfo1,
  10.603 -		    (unsigned long long) vmcb->exitinfo2,
  10.604 -		    (unsigned long long) vmcb->exitintinfo.bytes );
  10.605 -        }
  10.606 -    } 
  10.607 -    else if ( svm_dbg_on 
  10.608 -              && exit_reason != VMEXIT_IOIO 
  10.609 -              && exit_reason != VMEXIT_INTR) 
  10.610 -    {
  10.611 -
  10.612 -        if (exit_reasons[exit_reason])
  10.613 +            if (svm_paging_enabled(v) && 
  10.614 +                !mmio_space(shadow2_gva_to_gpa(current, vmcb->exitinfo2)))
  10.615 +            {
  10.616 +                printk("I%08ld,ExC=%s(%d),IP=%x:%llx,"
  10.617 +                       "I1=%llx,I2=%llx,INT=%llx, "
  10.618 +                       "gpa=%llx\n", intercepts_counter,
  10.619 +                       exit_reasons[exit_reason], exit_reason, regs.cs,
  10.620 +                       (unsigned long long) regs.rip,
  10.621 +                       (unsigned long long) vmcb->exitinfo1,
  10.622 +                       (unsigned long long) vmcb->exitinfo2,
  10.623 +                       (unsigned long long) vmcb->exitintinfo.bytes,
  10.624 +                       (unsigned long long) shadow2_gva_to_gpa(current, vmcb->exitinfo2));
  10.625 +            }
  10.626 +            else 
  10.627 +            {
  10.628 +                printk("I%08ld,ExC=%s(%d),IP=%x:%llx,"
  10.629 +                       "I1=%llx,I2=%llx,INT=%llx\n", 
  10.630 +                       intercepts_counter,
  10.631 +                       exit_reasons[exit_reason], exit_reason, regs.cs,
  10.632 +                       (unsigned long long) regs.rip,
  10.633 +                       (unsigned long long) vmcb->exitinfo1,
  10.634 +                       (unsigned long long) vmcb->exitinfo2,
  10.635 +                       (unsigned long long) vmcb->exitintinfo.bytes );
  10.636 +            }
  10.637 +        } 
  10.638 +        else if ( svm_dbg_on 
  10.639 +                  && exit_reason != VMEXIT_IOIO 
  10.640 +                  && exit_reason != VMEXIT_INTR) 
  10.641          {
  10.642 -            printk("I%08ld,ExC=%s(%d),IP=%x:%llx,I1=%llx,I2=%llx,INT=%llx\n", 
  10.643 -                    intercepts_counter,
  10.644 -                    exit_reasons[exit_reason], exit_reason, regs.cs,
  10.645 -		    (unsigned long long) regs.rip,
  10.646 -		    (unsigned long long) vmcb->exitinfo1,
  10.647 -		    (unsigned long long) vmcb->exitinfo2,
  10.648 -		    (unsigned long long) vmcb->exitintinfo.bytes);
  10.649 -        } 
  10.650 -        else 
  10.651 -        {
  10.652 -            printk("I%08ld,ExC=%d(0x%x),IP=%x:%llx,I1=%llx,I2=%llx,INT=%llx\n", 
  10.653 -                    intercepts_counter, exit_reason, exit_reason, regs.cs, 
  10.654 -		    (unsigned long long) regs.rip,
  10.655 -		    (unsigned long long) vmcb->exitinfo1,
  10.656 -		    (unsigned long long) vmcb->exitinfo2,
  10.657 -		    (unsigned long long) vmcb->exitintinfo.bytes);
  10.658 +
  10.659 +            if (exit_reasons[exit_reason])
  10.660 +            {
  10.661 +                printk("I%08ld,ExC=%s(%d),IP=%x:%llx,"
  10.662 +                       "I1=%llx,I2=%llx,INT=%llx\n", 
  10.663 +                       intercepts_counter,
  10.664 +                       exit_reasons[exit_reason], exit_reason, regs.cs,
  10.665 +                       (unsigned long long) regs.rip,
  10.666 +                       (unsigned long long) vmcb->exitinfo1,
  10.667 +                       (unsigned long long) vmcb->exitinfo2,
  10.668 +                       (unsigned long long) vmcb->exitintinfo.bytes);
  10.669 +            } 
  10.670 +            else 
  10.671 +            {
  10.672 +                printk("I%08ld,ExC=%d(0x%x),IP=%x:%llx,"
  10.673 +                       "I1=%llx,I2=%llx,INT=%llx\n", 
  10.674 +                       intercepts_counter, exit_reason, exit_reason, regs.cs, 
  10.675 +                       (unsigned long long) regs.rip,
  10.676 +                       (unsigned long long) vmcb->exitinfo1,
  10.677 +                       (unsigned long long) vmcb->exitinfo2,
  10.678 +                       (unsigned long long) vmcb->exitintinfo.bytes);
  10.679 +            }
  10.680          }
  10.681 -    }
  10.682  
  10.683  #ifdef SVM_WALK_GUEST_PAGES
  10.684 -    if( exit_reason == VMEXIT_EXCEPTION_PF 
  10.685 -        && ( ( vmcb->exitinfo2 == vmcb->rip )
  10.686 -        || vmcb->exitintinfo.bytes) )
  10.687 -    {
  10.688 -       if (svm_paging_enabled(v) && !mmio_space(gva_to_gpa(vmcb->exitinfo2)))
  10.689 -           walk_shadow_and_guest_pt( vmcb->exitinfo2 );
  10.690 -    }
  10.691 +        if( exit_reason == VMEXIT_EXCEPTION_PF 
  10.692 +            && ( ( vmcb->exitinfo2 == vmcb->rip )
  10.693 +                 || vmcb->exitintinfo.bytes) )
  10.694 +        {
  10.695 +            if ( svm_paging_enabled(v) &&
  10.696 +                 !mmio_space(gva_to_gpa(vmcb->exitinfo2)) )
  10.697 +                walk_shadow_and_guest_pt(vmcb->exitinfo2);
  10.698 +        }
  10.699  #endif
  10.700  
  10.701 -    intercepts_counter++;
  10.702 +        intercepts_counter++;
  10.703  
  10.704  #if 0
  10.705 -    if (svm_dbg_on)
  10.706 -        do_debug = svm_do_debugout(exit_reason);
  10.707 +        if (svm_dbg_on)
  10.708 +            do_debug = svm_do_debugout(exit_reason);
  10.709  #endif
  10.710  
  10.711 -    if (do_debug)
  10.712 -    {
  10.713 -        printk("%s:+ guest_table = 0x%08x, monitor_table = 0x%08x, "
  10.714 -                "shadow_table = 0x%08x\n", 
  10.715 -                __func__,
  10.716 -		(int) v->arch.guest_table.pfn,
  10.717 -		(int) v->arch.monitor_table.pfn, 
  10.718 -                (int) v->arch.shadow_table.pfn);
  10.719 -
  10.720 -        svm_dump_vmcb(__func__, vmcb);
  10.721 -        svm_dump_regs(__func__, &regs);
  10.722 -        svm_dump_inst(svm_rip2pointer(vmcb));
  10.723 -    }
  10.724 +        if (do_debug)
  10.725 +        {
  10.726 +            printk("%s:+ guest_table = 0x%08x, monitor_table = 0x%08x, "
  10.727 +                   "shadow_table = 0x%08x\n", 
  10.728 +                   __func__,
  10.729 +                   (int) v->arch.guest_table.pfn,
  10.730 +                   (int) v->arch.monitor_table.pfn, 
  10.731 +                   (int) v->arch.shadow_table.pfn);
  10.732 +
  10.733 +            svm_dump_vmcb(__func__, vmcb);
  10.734 +            svm_dump_regs(__func__, &regs);
  10.735 +            svm_dump_inst(svm_rip2pointer(vmcb));
  10.736 +        }
  10.737  
  10.738  #if defined(__i386__)
  10.739 -#undef	rip
  10.740 +#undef rip
  10.741  #endif
  10.742  
  10.743 -}
  10.744 +    }
  10.745  #endif /* SVM_EXTRA_DEBUG */
  10.746  
  10.747  
  10.748 @@ -2685,7 +2690,7 @@ asmlinkage void svm_vmexit_handler(struc
  10.749      if (do_debug)
  10.750      {
  10.751          printk("eip = %lx, exit_reason = %d (0x%x)\n", 
  10.752 -                eip, exit_reason, exit_reason);
  10.753 +               eip, exit_reason, exit_reason);
  10.754      }
  10.755  #endif /* SVM_EXTRA_DEBUG */
  10.756  
  10.757 @@ -2754,10 +2759,10 @@ asmlinkage void svm_vmexit_handler(struc
  10.758          va = vmcb->exitinfo2;
  10.759          regs.error_code = vmcb->exitinfo1;
  10.760          HVM_DBG_LOG(DBG_LEVEL_VMMU, 
  10.761 -                "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  10.762 -                (unsigned long)regs.eax, (unsigned long)regs.ebx,
  10.763 -                (unsigned long)regs.ecx, (unsigned long)regs.edx,
  10.764 -                (unsigned long)regs.esi, (unsigned long)regs.edi);
  10.765 +                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  10.766 +                    (unsigned long)regs.eax, (unsigned long)regs.ebx,
  10.767 +                    (unsigned long)regs.ecx, (unsigned long)regs.edx,
  10.768 +                    (unsigned long)regs.esi, (unsigned long)regs.edi);
  10.769  
  10.770          if (!(error = svm_do_page_fault(va, &regs))) 
  10.771          {
  10.772 @@ -2767,7 +2772,7 @@ asmlinkage void svm_vmexit_handler(struc
  10.773              v->arch.hvm_svm.cpu_cr2 = va;
  10.774              vmcb->cr2 = va;
  10.775              TRACE_3D(TRC_VMX_INT, v->domain->domain_id, 
  10.776 -                    VMEXIT_EXCEPTION_PF, va);
  10.777 +                     VMEXIT_EXCEPTION_PF, va);
  10.778          }
  10.779          break;
  10.780      }
  10.781 @@ -2922,8 +2927,8 @@ asmlinkage void svm_vmexit_handler(struc
  10.782      default:
  10.783          printk("unexpected VMEXIT: exit reason = 0x%x, exitinfo1 = %llx, "
  10.784                 "exitinfo2 = %llx\n", exit_reason, 
  10.785 -				     (unsigned long long)vmcb->exitinfo1, 
  10.786 -				     (unsigned long long)vmcb->exitinfo2);
  10.787 +               (unsigned long long)vmcb->exitinfo1, 
  10.788 +               (unsigned long long)vmcb->exitinfo2);
  10.789          __hvm_bug(&regs);       /* should not happen */
  10.790          break;
  10.791      }
  10.792 @@ -2938,10 +2943,10 @@ asmlinkage void svm_vmexit_handler(struc
  10.793      if (do_debug) 
  10.794      {
  10.795          printk("vmexit_handler():- guest_table = 0x%08x, "
  10.796 -                "monitor_table = 0x%08x, shadow_table = 0x%08x\n",
  10.797 -                (int)v->arch.guest_table.pfn,
  10.798 -		(int)v->arch.monitor_table.pfn, 
  10.799 -                (int)v->arch.shadow_table.pfn);
  10.800 +               "monitor_table = 0x%08x, shadow_table = 0x%08x\n",
  10.801 +               (int)v->arch.guest_table.pfn,
  10.802 +               (int)v->arch.monitor_table.pfn, 
  10.803 +               (int)v->arch.shadow_table.pfn);
  10.804          printk("svm_vmexit_handler: Returning\n");
  10.805      }
  10.806  #endif
  10.807 @@ -2962,15 +2967,17 @@ asmlinkage void svm_asid(void)
  10.808      struct vcpu *v = current;
  10.809      struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
  10.810  
  10.811 -   /*
  10.812 -    * if need to assign new asid, or if switching cores,
  10.813 -    * retire asid for the old core, and assign a new asid to the current core.
  10.814 -    */
  10.815 +    /*
  10.816 +     * if need to assign new asid, or if switching cores,
  10.817 +     * retire asid for the old core, and assign a new asid to the current core.
  10.818 +     */
  10.819      if ( test_bit( ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags ) ||
  10.820 -       ( v->arch.hvm_svm.asid_core != v->arch.hvm_svm.launch_core )) {
  10.821 +         ( v->arch.hvm_svm.asid_core != v->arch.hvm_svm.launch_core )) {
  10.822          /* recycle asid */
  10.823 -        if ( !asidpool_assign_next( vmcb, 1,
  10.824 -	     v->arch.hvm_svm.asid_core, v->arch.hvm_svm.launch_core )) {
  10.825 +        if ( !asidpool_assign_next(vmcb, 1,
  10.826 +                                   v->arch.hvm_svm.asid_core,
  10.827 +                                   v->arch.hvm_svm.launch_core) )
  10.828 +        {
  10.829              /* If we get here, we have a major problem */
  10.830              domain_crash_synchronous();
  10.831          }
    11.1 --- a/xen/arch/x86/hvm/svm/vmcb.c	Thu Aug 17 19:17:30 2006 +0100
    11.2 +++ b/xen/arch/x86/hvm/svm/vmcb.c	Thu Aug 17 19:17:50 2006 +0100
    11.3 @@ -396,7 +396,7 @@ void svm_do_launch(struct vcpu *v)
    11.4      v->arch.hvm_svm.saved_irq_vector = -1;
    11.5  
    11.6      hvm_set_guest_time(v, 0);
    11.7 -	
    11.8 +
    11.9      if (svm_dbg_on)
   11.10          svm_dump_vmcb(__func__, vmcb);
   11.11  
   11.12 @@ -427,24 +427,24 @@ void svm_dump_vmcb(const char *from, str
   11.13             vmcb->general1_intercepts, vmcb->general2_intercepts);
   11.14      printf("iopm_base_pa = %016llx msrpm_base_pa = 0x%016llx tsc_offset = "
   11.15              "0x%016llx\n", 
   11.16 -	    (unsigned long long) vmcb->iopm_base_pa,
   11.17 -	    (unsigned long long) vmcb->msrpm_base_pa,
   11.18 -	    (unsigned long long) vmcb->tsc_offset);
   11.19 +           (unsigned long long) vmcb->iopm_base_pa,
   11.20 +           (unsigned long long) vmcb->msrpm_base_pa,
   11.21 +           (unsigned long long) vmcb->tsc_offset);
   11.22      printf("tlb_control = 0x%08x vintr = 0x%016llx interrupt_shadow = "
   11.23              "0x%016llx\n", vmcb->tlb_control,
   11.24 -	    (unsigned long long) vmcb->vintr.bytes,
   11.25 -	    (unsigned long long) vmcb->interrupt_shadow);
   11.26 +           (unsigned long long) vmcb->vintr.bytes,
   11.27 +           (unsigned long long) vmcb->interrupt_shadow);
   11.28      printf("exitcode = 0x%016llx exitintinfo = 0x%016llx\n", 
   11.29             (unsigned long long) vmcb->exitcode,
   11.30 -	   (unsigned long long) vmcb->exitintinfo.bytes);
   11.31 +           (unsigned long long) vmcb->exitintinfo.bytes);
   11.32      printf("exitinfo1 = 0x%016llx exitinfo2 = 0x%016llx \n",
   11.33             (unsigned long long) vmcb->exitinfo1,
   11.34 -	   (unsigned long long) vmcb->exitinfo2);
   11.35 +           (unsigned long long) vmcb->exitinfo2);
   11.36      printf("np_enable = 0x%016llx guest_asid = 0x%03x\n", 
   11.37             (unsigned long long) vmcb->np_enable, vmcb->guest_asid);
   11.38      printf("cpl = %d efer = 0x%016llx star = 0x%016llx lstar = 0x%016llx\n", 
   11.39             vmcb->cpl, (unsigned long long) vmcb->efer,
   11.40 -	   (unsigned long long) vmcb->star, (unsigned long long) vmcb->lstar);
   11.41 +           (unsigned long long) vmcb->star, (unsigned long long) vmcb->lstar);
   11.42      printf("CR0 = 0x%016llx CR2 = 0x%016llx\n",
   11.43             (unsigned long long) vmcb->cr0, (unsigned long long) vmcb->cr2);
   11.44      printf("CR3 = 0x%016llx CR4 = 0x%016llx\n", 
   11.45 @@ -460,7 +460,7 @@ void svm_dump_vmcb(const char *from, str
   11.46             (unsigned long long) vmcb->sfmask);
   11.47      printf("KernGSBase = 0x%016llx PAT = 0x%016llx \n", 
   11.48             (unsigned long long) vmcb->kerngsbase,
   11.49 -	   (unsigned long long) vmcb->g_pat);
   11.50 +           (unsigned long long) vmcb->g_pat);
   11.51      
   11.52      /* print out all the selectors */
   11.53      svm_dump_sel("CS", &vmcb->cs);
    12.1 --- a/xen/arch/x86/hvm/svm/x86_32/exits.S	Thu Aug 17 19:17:30 2006 +0100
    12.2 +++ b/xen/arch/x86/hvm/svm/x86_32/exits.S	Thu Aug 17 19:17:50 2006 +0100
    12.3 @@ -56,8 +56,8 @@
    12.4   * domain pointer, DS, ES, FS, GS. Therefore, we effectively skip 6 registers.
    12.5   */
    12.6  
    12.7 -#define HVM_MONITOR_EFLAGS	0x202 /* IF on */
    12.8 -#define NR_SKIPPED_REGS	6	/* See the above explanation */
    12.9 +#define HVM_MONITOR_EFLAGS 0x202 /* IF on */
   12.10 +#define NR_SKIPPED_REGS    6     /* See the above explanation */
   12.11  #define HVM_SAVE_ALL_NOSEGREGS \
   12.12          pushl $HVM_MONITOR_EFLAGS; \
   12.13          popf; \
   12.14 @@ -95,8 +95,8 @@ ENTRY(svm_asm_do_launch)
   12.15          movl VCPU_svm_vmcb(%ebx), %ecx
   12.16          movl 24(%esp), %eax
   12.17          movl %eax, VMCB_rax(%ecx)
   12.18 -	movl VCPU_processor(%ebx), %eax
   12.19 -	movl root_vmcb_pa(,%eax,8), %eax
   12.20 +        movl VCPU_processor(%ebx), %eax
   12.21 +        movl root_vmcb_pa(,%eax,8), %eax
   12.22          VMSAVE
   12.23  
   12.24          movl VCPU_svm_vmcb_pa(%ebx), %eax
   12.25 @@ -120,8 +120,8 @@ ENTRY(svm_asm_do_launch)
   12.26  
   12.27          GET_CURRENT(%eax)
   12.28  
   12.29 -	movl VCPU_processor(%eax), %eax
   12.30 -	movl root_vmcb_pa(,%eax,8), %eax
   12.31 +        movl VCPU_processor(%eax), %eax
   12.32 +        movl root_vmcb_pa(,%eax,8), %eax
   12.33          VMLOAD
   12.34  
   12.35          HVM_SAVE_ALL_NOSEGREGS
    13.1 --- a/xen/arch/x86/hvm/svm/x86_64/exits.S	Thu Aug 17 19:17:30 2006 +0100
    13.2 +++ b/xen/arch/x86/hvm/svm/x86_64/exits.S	Thu Aug 17 19:17:50 2006 +0100
    13.3 @@ -52,8 +52,8 @@
    13.4   * (2/1)  u32 entry_vector;
    13.5   * (1/1)  u32 error_code;
    13.6   */
    13.7 -#define HVM_MONITOR_RFLAGS	0x202 /* IF on */
    13.8 -#define NR_SKIPPED_REGS	6	/* See the above explanation */
    13.9 +#define HVM_MONITOR_RFLAGS 0x202 /* IF on */
   13.10 +#define NR_SKIPPED_REGS    6     /* See the above explanation */
   13.11  #define HVM_SAVE_ALL_NOSEGREGS \
   13.12          pushq $HVM_MONITOR_RFLAGS; \
   13.13          popfq; \
   13.14 @@ -105,10 +105,10 @@ ENTRY(svm_asm_do_launch)
   13.15          movq VCPU_svm_vmcb(%rbx), %rcx
   13.16          movq UREGS_rax(%rsp), %rax
   13.17          movq %rax, VMCB_rax(%rcx)
   13.18 -	leaq root_vmcb_pa(%rip), %rax
   13.19 -	movl VCPU_processor(%rbx), %ecx
   13.20 -	shll $3, %ecx
   13.21 -	addq %rcx, %rax
   13.22 +        leaq root_vmcb_pa(%rip), %rax
   13.23 +        movl VCPU_processor(%rbx), %ecx
   13.24 +        shll $3, %ecx
   13.25 +        addq %rcx, %rax
   13.26          VMSAVE
   13.27  
   13.28          movq VCPU_svm_vmcb_pa(%rbx), %rax
   13.29 @@ -139,10 +139,10 @@ ENTRY(svm_asm_do_launch)
   13.30          HVM_SAVE_ALL_NOSEGREGS
   13.31  
   13.32          GET_CURRENT(%rbx)
   13.33 -	movl VCPU_processor(%rbx), %ecx
   13.34 -	leaq root_vmcb_pa(%rip), %rax
   13.35 -	shll $3, %ecx
   13.36 -	addq %rcx, %rax
   13.37 +        movl VCPU_processor(%rbx), %ecx
   13.38 +        leaq root_vmcb_pa(%rip), %rax
   13.39 +        shll $3, %ecx
   13.40 +        addq %rcx, %rax
   13.41          VMLOAD
   13.42  
   13.43          STGI
   13.44 @@ -151,13 +151,13 @@ ENTRY(svm_asm_do_launch)
   13.45  
   13.46  ENTRY(svm_asm_do_resume)
   13.47  svm_test_all_events:
   13.48 -	GET_CURRENT(%rbx)
   13.49 +        GET_CURRENT(%rbx)
   13.50          movq %rbx, %rdi
   13.51          call hvm_do_resume
   13.52  /*test_all_events:*/
   13.53          cli                             # tests must not race interrupts
   13.54  /*test_softirqs:*/
   13.55 -	movl  VCPU_processor(%rbx),%eax
   13.56 +        movl  VCPU_processor(%rbx),%eax
   13.57          shl   $IRQSTAT_shift, %rax
   13.58          leaq  irq_stat(%rip), %rdx
   13.59          testl $~0, (%rdx, %rax, 1)
    14.1 --- a/xen/arch/x86/hvm/vioapic.c	Thu Aug 17 19:17:30 2006 +0100
    14.2 +++ b/xen/arch/x86/hvm/vioapic.c	Thu Aug 17 19:17:50 2006 +0100
    14.3 @@ -44,7 +44,7 @@
    14.4  #define IRQ0_SPECIAL_ROUTING 1
    14.5  
    14.6  #if defined(__ia64__)
    14.7 -#define	opt_hvm_debug_level	opt_vmx_debug_level
    14.8 +#define opt_hvm_debug_level opt_vmx_debug_level
    14.9  #endif
   14.10  
   14.11  static void ioapic_enable(hvm_vioapic_t *s, uint8_t enable)
   14.12 @@ -264,7 +264,7 @@ static void hvm_vioapic_reset(hvm_vioapi
   14.13  
   14.14      for (i = 0; i < IOAPIC_NUM_PINS; i++) {
   14.15          s->redirtbl[i].RedirForm.mask = 0x1;
   14.16 -	hvm_vioapic_update_imr(s, i);
   14.17 +        hvm_vioapic_update_imr(s, i);
   14.18      }
   14.19  }
   14.20  
   14.21 @@ -364,7 +364,7 @@ static uint32_t ioapic_get_delivery_bitm
   14.22  
   14.23      if (dest_mode == 0) { /* Physical mode */
   14.24          for (i = 0; i < s->lapic_count; i++) {
   14.25 -	    if (VLAPIC_ID(s->lapic_info[i]) == dest) {
   14.26 +            if (VLAPIC_ID(s->lapic_info[i]) == dest) {
   14.27                  mask = 1 << i;
   14.28                  break;
   14.29              }
    15.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Thu Aug 17 19:17:30 2006 +0100
    15.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Aug 17 19:17:50 2006 +0100
    15.3 @@ -146,7 +146,7 @@ static void vmx_relinquish_guest_resourc
    15.4  
    15.5      if ( d->arch.hvm_domain.shared_page_va )
    15.6          unmap_domain_page_global(
    15.7 -	        (void *)d->arch.hvm_domain.shared_page_va);
    15.8 +            (void *)d->arch.hvm_domain.shared_page_va);
    15.9  
   15.10      if ( d->arch.hvm_domain.buffered_io_va )
   15.11          unmap_domain_page_global((void *)d->arch.hvm_domain.buffered_io_va);
   15.12 @@ -595,7 +595,7 @@ static int vmx_instruction_length(struct
   15.13      unsigned long inst_len;
   15.14  
   15.15      if (__vmread(VM_EXIT_INSTRUCTION_LEN, &inst_len))
   15.16 -    	return 0;
   15.17 +        return 0;
   15.18      return inst_len;
   15.19  }
   15.20  
   15.21 @@ -1094,7 +1094,7 @@ static int check_for_null_selector(unsig
   15.22  
   15.23  extern void send_pio_req(struct cpu_user_regs *regs, unsigned long port,
   15.24                           unsigned long count, int size, long value,
   15.25 -			 int dir, int pvalid);
   15.26 +                         int dir, int pvalid);
   15.27  
   15.28  static void vmx_io_instruction(unsigned long exit_qualification,
   15.29                                 unsigned long inst_len)
    16.1 --- a/xen/arch/x86/hvm/vmx/x86_32/exits.S	Thu Aug 17 19:17:30 2006 +0100
    16.2 +++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S	Thu Aug 17 19:17:50 2006 +0100
    16.3 @@ -55,7 +55,7 @@
    16.4   * domain pointer, DS, ES, FS, GS. Therefore, we effectively skip 6 registers.
    16.5   */
    16.6  
    16.7 -#define NR_SKIPPED_REGS	6	/* See the above explanation */
    16.8 +#define NR_SKIPPED_REGS 6 /* See the above explanation */
    16.9  #define HVM_SAVE_ALL_NOSEGREGS                                              \
   16.10          subl $(NR_SKIPPED_REGS*4), %esp;                                    \
   16.11          movl $0, 0xc(%esp);  /* XXX why do we need to force eflags==0 ?? */ \
    17.1 --- a/xen/arch/x86/hvm/vmx/x86_64/exits.S	Thu Aug 17 19:17:30 2006 +0100
    17.2 +++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S	Thu Aug 17 19:17:50 2006 +0100
    17.3 @@ -51,7 +51,7 @@
    17.4   * (2/1)  u32 entry_vector;
    17.5   * (1/1)  u32 error_code;
    17.6   */
    17.7 -#define NR_SKIPPED_REGS	6	/* See the above explanation */
    17.8 +#define NR_SKIPPED_REGS 6 /* See the above explanation */
    17.9  #define HVM_SAVE_ALL_NOSEGREGS                  \
   17.10          subq $(NR_SKIPPED_REGS*8), %rsp;        \
   17.11          pushq %rdi;                             \
    18.1 --- a/xen/arch/x86/i387.c	Thu Aug 17 19:17:30 2006 +0100
    18.2 +++ b/xen/arch/x86/i387.c	Thu Aug 17 19:17:50 2006 +0100
    18.3 @@ -5,7 +5,7 @@
    18.4   *
    18.5   *  Pentium III FXSR, SSE support
    18.6   *  General FPU state handling cleanups
    18.7 - *	Gareth Hughes <gareth@valinux.com>, May 2000
    18.8 + *  Gareth Hughes <gareth@valinux.com>, May 2000
    18.9   */
   18.10  
   18.11  #include <xen/config.h>
    19.1 --- a/xen/arch/x86/nmi.c	Thu Aug 17 19:17:30 2006 +0100
    19.2 +++ b/xen/arch/x86/nmi.c	Thu Aug 17 19:17:50 2006 +0100
    19.3 @@ -6,11 +6,11 @@
    19.4   *  Started by Ingo Molnar <mingo@redhat.com>
    19.5   *
    19.6   *  Fixes:
    19.7 - *  Mikael Pettersson	: AMD K7 support for local APIC NMI watchdog.
    19.8 - *  Mikael Pettersson	: Power Management for local APIC NMI watchdog.
    19.9 - *  Mikael Pettersson	: Pentium 4 support for local APIC NMI watchdog.
   19.10 + *  Mikael Pettersson : AMD K7 support for local APIC NMI watchdog.
   19.11 + *  Mikael Pettersson : Power Management for local APIC NMI watchdog.
   19.12 + *  Mikael Pettersson : Pentium 4 support for local APIC NMI watchdog.
   19.13   *  Pavel Machek and
   19.14 - *  Mikael Pettersson	: PM converted to driver model. Disable/enable API.
   19.15 + *  Mikael Pettersson : PM converted to driver model. Disable/enable API.
   19.16   */
   19.17  
   19.18  #include <xen/config.h>
    20.1 --- a/xen/arch/x86/x86_32/entry.S	Thu Aug 17 19:17:30 2006 +0100
    20.2 +++ b/xen/arch/x86/x86_32/entry.S	Thu Aug 17 19:17:50 2006 +0100
    20.3 @@ -142,11 +142,11 @@ 1:      call  create_bounce_frame
    20.4          jmp   test_all_events
    20.5  .previous
    20.6  .section __pre_ex_table,"a"
    20.7 -	.long FLT1,FIX1
    20.8 -	.long FLT2,FIX1
    20.9 -	.long FLT3,FIX1
   20.10 -	.long FLT4,FIX1
   20.11 -	.long FLT5,FIX5
   20.12 +        .long FLT1,FIX1
   20.13 +        .long FLT2,FIX1
   20.14 +        .long FLT3,FIX1
   20.15 +        .long FLT4,FIX1
   20.16 +        .long FLT5,FIX5
   20.17  .previous
   20.18  .section __ex_table,"a"
   20.19          .long DBLFLT1,failsafe_callback
   20.20 @@ -154,13 +154,13 @@ 1:      call  create_bounce_frame
   20.21  
   20.22          ALIGN
   20.23  restore_all_xen:
   20.24 -	popl %ebx
   20.25 -	popl %ecx
   20.26 -	popl %edx
   20.27 -	popl %esi
   20.28 -	popl %edi
   20.29 -	popl %ebp
   20.30 -	popl %eax
   20.31 +        popl %ebx
   20.32 +        popl %ecx
   20.33 +        popl %edx
   20.34 +        popl %esi
   20.35 +        popl %edi
   20.36 +        popl %ebp
   20.37 +        popl %eax
   20.38          addl $4,%esp
   20.39          iret
   20.40  
   20.41 @@ -168,7 +168,7 @@ restore_all_xen:
   20.42  ENTRY(hypercall)
   20.43          subl $4,%esp
   20.44          FIXUP_RING0_GUEST_STACK
   20.45 -	SAVE_ALL(b)
   20.46 +        SAVE_ALL(b)
   20.47          sti
   20.48          GET_CURRENT(%ebx)
   20.49          cmpl  $NR_hypercalls,%eax
   20.50 @@ -244,8 +244,8 @@ process_softirqs:
   20.51          sti       
   20.52          call do_softirq
   20.53          jmp  test_all_events
   20.54 -	
   20.55 -	ALIGN
   20.56 +
   20.57 +        ALIGN
   20.58  process_nmi:
   20.59          movl VCPU_nmi_addr(%ebx),%eax
   20.60          test %eax,%eax
   20.61 @@ -369,13 +369,13 @@ nvm86_3:/* Rewrite our stack frame and r
   20.62          movb $0,TRAPBOUNCE_flags(%edx)
   20.63          ret
   20.64  .section __ex_table,"a"
   20.65 -	.long  FLT6,domain_crash_synchronous ,  FLT7,domain_crash_synchronous
   20.66 +        .long  FLT6,domain_crash_synchronous ,  FLT7,domain_crash_synchronous
   20.67          .long  FLT8,domain_crash_synchronous ,  FLT9,domain_crash_synchronous
   20.68          .long FLT10,domain_crash_synchronous , FLT11,domain_crash_synchronous
   20.69          .long FLT12,domain_crash_synchronous , FLT13,domain_crash_synchronous
   20.70          .long FLT14,domain_crash_synchronous , FLT15,domain_crash_synchronous
   20.71          .long FLT16,domain_crash_synchronous , FLT17,domain_crash_synchronous
   20.72 -	.long FLT18,domain_crash_synchronous , FLT19,domain_crash_synchronous
   20.73 +        .long FLT18,domain_crash_synchronous , FLT19,domain_crash_synchronous
   20.74          .long FLT20,domain_crash_synchronous , FLT21,domain_crash_synchronous
   20.75          .long FLT22,domain_crash_synchronous , FLT23,domain_crash_synchronous
   20.76          .long FLT24,domain_crash_synchronous , FLT25,domain_crash_synchronous
   20.77 @@ -399,8 +399,8 @@ ENTRY(ret_from_intr)
   20.78          jmp   restore_all_xen
   20.79  
   20.80  ENTRY(divide_error)
   20.81 -	pushl $TRAP_divide_error<<16
   20.82 -	ALIGN
   20.83 +        pushl $TRAP_divide_error<<16
   20.84 +        ALIGN
   20.85  handle_exception:
   20.86          FIXUP_RING0_GUEST_STACK
   20.87          SAVE_ALL_NOSEGREGS(a)
   20.88 @@ -411,15 +411,15 @@ handle_exception:
   20.89          xorl  %eax,%eax
   20.90          movw  UREGS_entry_vector(%esp),%ax
   20.91          movl  %esp,%edx
   20.92 -	pushl %edx			# push the cpu_user_regs pointer
   20.93 -	GET_CURRENT(%ebx)
   20.94 +        pushl %edx                      # push the cpu_user_regs pointer
   20.95 +        GET_CURRENT(%ebx)
   20.96          PERFC_INCR(PERFC_exceptions, %eax)
   20.97 -	call  *exception_table(,%eax,4)
   20.98 +        call  *exception_table(,%eax,4)
   20.99          addl  $4,%esp
  20.100          movl  UREGS_eflags(%esp),%eax
  20.101          movb  UREGS_cs(%esp),%al
  20.102          testl $(3|X86_EFLAGS_VM),%eax
  20.103 -	jz    restore_all_xen
  20.104 +        jz    restore_all_xen
  20.105          leal  VCPU_trap_bounce(%ebx),%edx
  20.106          testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%edx)
  20.107          jz    test_all_events
  20.108 @@ -450,78 +450,78 @@ FATAL_exception_with_ints_disabled:
  20.109          xorl  %esi,%esi
  20.110          movw  UREGS_entry_vector(%esp),%si
  20.111          movl  %esp,%edx
  20.112 -	pushl %edx			# push the cpu_user_regs pointer
  20.113 +        pushl %edx                      # push the cpu_user_regs pointer
  20.114          pushl %esi                      # push the trapnr (entry vector)
  20.115          call  fatal_trap
  20.116          ud2
  20.117                                          
  20.118  ENTRY(coprocessor_error)
  20.119 -	pushl $TRAP_copro_error<<16
  20.120 -	jmp   handle_exception
  20.121 +        pushl $TRAP_copro_error<<16
  20.122 +        jmp   handle_exception
  20.123  
  20.124  ENTRY(simd_coprocessor_error)
  20.125 -	pushl $TRAP_simd_error<<16
  20.126 -	jmp   handle_exception
  20.127 +        pushl $TRAP_simd_error<<16
  20.128 +        jmp   handle_exception
  20.129  
  20.130  ENTRY(device_not_available)
  20.131 -	pushl $TRAP_no_device<<16
  20.132 +        pushl $TRAP_no_device<<16
  20.133          jmp   handle_exception
  20.134  
  20.135  ENTRY(debug)
  20.136 -	pushl $TRAP_debug<<16
  20.137 -	jmp   handle_exception
  20.138 +        pushl $TRAP_debug<<16
  20.139 +        jmp   handle_exception
  20.140  
  20.141  ENTRY(int3)
  20.142 -	pushl $TRAP_int3<<16
  20.143 -	jmp   handle_exception
  20.144 +        pushl $TRAP_int3<<16
  20.145 +        jmp   handle_exception
  20.146  
  20.147  ENTRY(overflow)
  20.148 -	pushl $TRAP_overflow<<16
  20.149 -	jmp   handle_exception
  20.150 +        pushl $TRAP_overflow<<16
  20.151 +        jmp   handle_exception
  20.152  
  20.153  ENTRY(bounds)
  20.154 -	pushl $TRAP_bounds<<16
  20.155 -	jmp   handle_exception
  20.156 +        pushl $TRAP_bounds<<16
  20.157 +        jmp   handle_exception
  20.158  
  20.159  ENTRY(invalid_op)
  20.160 -	pushl $TRAP_invalid_op<<16
  20.161 -	jmp   handle_exception
  20.162 +        pushl $TRAP_invalid_op<<16
  20.163 +        jmp   handle_exception
  20.164  
  20.165  ENTRY(coprocessor_segment_overrun)
  20.166 -	pushl $TRAP_copro_seg<<16
  20.167 -	jmp   handle_exception
  20.168 +        pushl $TRAP_copro_seg<<16
  20.169 +        jmp   handle_exception
  20.170  
  20.171  ENTRY(invalid_TSS)
  20.172          movw  $TRAP_invalid_tss,2(%esp)
  20.173 -	jmp   handle_exception
  20.174 +        jmp   handle_exception
  20.175  
  20.176  ENTRY(segment_not_present)
  20.177          movw  $TRAP_no_segment,2(%esp)
  20.178 -	jmp   handle_exception
  20.179 +        jmp   handle_exception
  20.180  
  20.181  ENTRY(stack_segment)
  20.182          movw  $TRAP_stack_error,2(%esp)
  20.183 -	jmp   handle_exception
  20.184 +        jmp   handle_exception
  20.185  
  20.186  ENTRY(general_protection)
  20.187          movw  $TRAP_gp_fault,2(%esp)
  20.188 -	jmp   handle_exception
  20.189 +        jmp   handle_exception
  20.190  
  20.191  ENTRY(alignment_check)
  20.192          movw  $TRAP_alignment_check,2(%esp)
  20.193 -	jmp   handle_exception
  20.194 +        jmp   handle_exception
  20.195  
  20.196  ENTRY(page_fault)
  20.197          movw  $TRAP_page_fault,2(%esp)
  20.198 -	jmp   handle_exception
  20.199 +        jmp   handle_exception
  20.200  
  20.201  ENTRY(machine_check)
  20.202          pushl $TRAP_machine_check<<16
  20.203 -	jmp   handle_exception
  20.204 +        jmp   handle_exception
  20.205  
  20.206  ENTRY(spurious_interrupt_bug)
  20.207          pushl $TRAP_spurious_int<<16
  20.208 -	jmp   handle_exception
  20.209 +        jmp   handle_exception
  20.210  
  20.211  ENTRY(nmi)
  20.212  #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
  20.213 @@ -530,8 +530,8 @@ ENTRY(nmi)
  20.214  #else
  20.215          # Save state but do not trash the segment registers!
  20.216          # We may otherwise be unable to reload them or copy them to ring 1. 
  20.217 -	pushl %eax
  20.218 -	SAVE_ALL_NOSEGREGS(a)
  20.219 +        pushl %eax
  20.220 +        SAVE_ALL_NOSEGREGS(a)
  20.221  
  20.222          # We can only process the NMI if:
  20.223          #  A. We are the outermost Xen activation (in which case we have
    21.1 --- a/xen/arch/x86/x86_64/entry.S	Thu Aug 17 19:17:30 2006 +0100
    21.2 +++ b/xen/arch/x86/x86_64/entry.S	Thu Aug 17 19:17:50 2006 +0100
    21.3 @@ -87,7 +87,7 @@ 1:      call  create_bounce_frame
    21.4          jmp   test_all_events
    21.5  .previous
    21.6  .section __pre_ex_table,"a"
    21.7 -	.quad FLT1,FIX1
    21.8 +        .quad FLT1,FIX1
    21.9  .previous
   21.10  .section __ex_table,"a"
   21.11          .quad DBLFLT1,failsafe_callback
   21.12 @@ -201,7 +201,7 @@ process_softirqs:
   21.13          call do_softirq
   21.14          jmp  test_all_events
   21.15  
   21.16 -	ALIGN
   21.17 +        ALIGN
   21.18  /* %rbx: struct vcpu */
   21.19  process_nmi:
   21.20          movq VCPU_nmi_addr(%rbx),%rax
   21.21 @@ -396,12 +396,12 @@ ENTRY(divide_error)
   21.22  ENTRY(coprocessor_error)
   21.23          pushq $0
   21.24          movl  $TRAP_copro_error,4(%rsp)
   21.25 -	jmp   handle_exception
   21.26 +        jmp   handle_exception
   21.27  
   21.28  ENTRY(simd_coprocessor_error)
   21.29          pushq $0
   21.30          movl  $TRAP_simd_error,4(%rsp)
   21.31 -	jmp   handle_exception
   21.32 +        jmp   handle_exception
   21.33  
   21.34  ENTRY(device_not_available)
   21.35          pushq $0
   21.36 @@ -411,66 +411,66 @@ ENTRY(device_not_available)
   21.37  ENTRY(debug)
   21.38          pushq $0
   21.39          movl  $TRAP_debug,4(%rsp)
   21.40 -	jmp   handle_exception
   21.41 +        jmp   handle_exception
   21.42  
   21.43  ENTRY(int3)
   21.44          pushq $0
   21.45 -	movl  $TRAP_int3,4(%rsp)
   21.46 -	jmp   handle_exception
   21.47 +        movl  $TRAP_int3,4(%rsp)
   21.48 +        jmp   handle_exception
   21.49  
   21.50  ENTRY(overflow)
   21.51          pushq $0
   21.52 -	movl  $TRAP_overflow,4(%rsp)
   21.53 -	jmp   handle_exception
   21.54 +        movl  $TRAP_overflow,4(%rsp)
   21.55 +        jmp   handle_exception
   21.56  
   21.57  ENTRY(bounds)
   21.58          pushq $0
   21.59 -	movl  $TRAP_bounds,4(%rsp)
   21.60 -	jmp   handle_exception
   21.61 +        movl  $TRAP_bounds,4(%rsp)
   21.62 +        jmp   handle_exception
   21.63  
   21.64  ENTRY(invalid_op)
   21.65          pushq $0
   21.66 -	movl  $TRAP_invalid_op,4(%rsp)
   21.67 -	jmp   handle_exception
   21.68 +        movl  $TRAP_invalid_op,4(%rsp)
   21.69 +        jmp   handle_exception
   21.70  
   21.71  ENTRY(coprocessor_segment_overrun)
   21.72          pushq $0
   21.73 -	movl  $TRAP_copro_seg,4(%rsp)
   21.74 -	jmp   handle_exception
   21.75 +        movl  $TRAP_copro_seg,4(%rsp)
   21.76 +        jmp   handle_exception
   21.77  
   21.78  ENTRY(invalid_TSS)
   21.79          movl  $TRAP_invalid_tss,4(%rsp)
   21.80 -	jmp   handle_exception
   21.81 +        jmp   handle_exception
   21.82  
   21.83  ENTRY(segment_not_present)
   21.84          movl  $TRAP_no_segment,4(%rsp)
   21.85 -	jmp   handle_exception
   21.86 +        jmp   handle_exception
   21.87  
   21.88  ENTRY(stack_segment)
   21.89          movl  $TRAP_stack_error,4(%rsp)
   21.90 -	jmp   handle_exception
   21.91 +        jmp   handle_exception
   21.92  
   21.93  ENTRY(general_protection)
   21.94          movl  $TRAP_gp_fault,4(%rsp)
   21.95 -	jmp   handle_exception
   21.96 +        jmp   handle_exception
   21.97  
   21.98  ENTRY(alignment_check)
   21.99          movl  $TRAP_alignment_check,4(%rsp)
  21.100 -	jmp   handle_exception
  21.101 +        jmp   handle_exception
  21.102  
  21.103  ENTRY(page_fault)
  21.104          movl  $TRAP_page_fault,4(%rsp)
  21.105 -	jmp   handle_exception
  21.106 +        jmp   handle_exception
  21.107  
  21.108  ENTRY(machine_check)
  21.109          pushq $0
  21.110          movl  $TRAP_machine_check,4(%rsp)
  21.111 -	jmp   handle_exception
  21.112 +        jmp   handle_exception
  21.113  
  21.114  ENTRY(spurious_interrupt_bug)
  21.115          pushq $0
  21.116          movl  $TRAP_spurious_int,4(%rsp)
  21.117 -	jmp   handle_exception
  21.118 +        jmp   handle_exception
  21.119  
  21.120  ENTRY(double_fault)
  21.121          SAVE_ALL
    22.1 --- a/xen/drivers/video/vga.c	Thu Aug 17 19:17:30 2006 +0100
    22.2 +++ b/xen/drivers/video/vga.c	Thu Aug 17 19:17:50 2006 +0100
    22.3 @@ -484,14 +484,14 @@ static int vga_load_font(const struct fo
    22.4      /* First, the Sequencer */
    22.5      vga_wseq(vgabase, VGA_SEQ_RESET, 0x1);
    22.6      /* CPU writes only to map 2 */
    22.7 -    vga_wseq(vgabase, VGA_SEQ_PLANE_WRITE, 0x04);	
    22.8 +    vga_wseq(vgabase, VGA_SEQ_PLANE_WRITE, 0x04);
    22.9      /* Sequential addressing */
   22.10 -    vga_wseq(vgabase, VGA_SEQ_MEMORY_MODE, 0x07);	
   22.11 +    vga_wseq(vgabase, VGA_SEQ_MEMORY_MODE, 0x07);
   22.12      /* Clear synchronous reset */
   22.13      vga_wseq(vgabase, VGA_SEQ_RESET, 0x03);
   22.14  
   22.15      /* Now, the graphics controller, select map 2 */
   22.16 -    vga_wgfx(vgabase, VGA_GFX_PLANE_READ, 0x02);		
   22.17 +    vga_wgfx(vgabase, VGA_GFX_PLANE_READ, 0x02);
   22.18      /* disable odd-even addressing */
   22.19      vga_wgfx(vgabase, VGA_GFX_MODE, 0x00);
   22.20      /* map start at A000:0000 */
    23.1 --- a/xen/include/asm-x86/grant_table.h	Thu Aug 17 19:17:30 2006 +0100
    23.2 +++ b/xen/include/asm-x86/grant_table.h	Thu Aug 17 19:17:50 2006 +0100
    23.3 @@ -35,7 +35,7 @@ int destroy_grant_host_mapping(
    23.4  
    23.5  static inline void gnttab_clear_flag(unsigned long nr, uint16_t *addr)
    23.6  {
    23.7 -	clear_bit(nr, addr);
    23.8 +    clear_bit(nr, addr);
    23.9  }
   23.10  
   23.11  #endif /* __ASM_GRANT_TABLE_H__ */
    24.1 --- a/xen/include/asm-x86/hvm/support.h	Thu Aug 17 19:17:30 2006 +0100
    24.2 +++ b/xen/include/asm-x86/hvm/support.h	Thu Aug 17 19:17:50 2006 +0100
    24.3 @@ -32,7 +32,7 @@
    24.4  #define HVM_DEBUG 1
    24.5  #endif
    24.6  
    24.7 -#define	hvm_guest(v)	((v)->arch.guest_context.flags & VGCF_HVM_GUEST)
    24.8 +#define hvm_guest(v) ((v)->arch.guest_context.flags & VGCF_HVM_GUEST)
    24.9  
   24.10  static inline shared_iopage_t *get_sp(struct domain *d)
   24.11  {
    25.1 --- a/xen/include/asm-x86/hvm/svm/vmcb.h	Thu Aug 17 19:17:30 2006 +0100
    25.2 +++ b/xen/include/asm-x86/hvm/svm/vmcb.h	Thu Aug 17 19:17:50 2006 +0100
    25.3 @@ -373,7 +373,7 @@ struct vmcb_struct {
    25.4      u32 guest_asid;             /* offset 0x58 */
    25.5      u8  tlb_control;            /* offset 0x5C */
    25.6      u8  res07[3];
    25.7 -    vintr_t vintr;          	/* offset 0x60 */
    25.8 +    vintr_t vintr;              /* offset 0x60 */
    25.9      u64 interrupt_shadow;       /* offset 0x68 */
   25.10      u64 exitcode;               /* offset 0x70 */
   25.11      u64 exitinfo1;              /* offset 0x78 */
   25.12 @@ -399,9 +399,9 @@ struct vmcb_struct {
   25.13      u8 res11[3];
   25.14      u8 cpl;
   25.15      u32 res12;
   25.16 -    u64 efer;               	/* offset 1024 + 0xD0 */
   25.17 +    u64 efer;                   /* offset 1024 + 0xD0 */
   25.18      u64 res13[14];
   25.19 -    u64 cr4;                  	/* loffset 1024 + 0x148 */
   25.20 +    u64 cr4;                    /* loffset 1024 + 0x148 */
   25.21      u64 cr3;
   25.22      u64 cr0;
   25.23      u64 dr7;
   25.24 @@ -433,7 +433,7 @@ struct vmcb_struct {
   25.25  
   25.26  
   25.27  struct arch_svm_struct {
   25.28 -    struct vmcb_struct	*vmcb;
   25.29 +    struct vmcb_struct *vmcb;
   25.30      u64                 vmcb_pa;
   25.31      u32                 *iopm;
   25.32      u32                 *msrpm;