ia64/xen-unstable

changeset 9088:072d51860554

Clean up SVM 32-bit exits.S file (remove all tsc/fpu).

Signed-off-by: Tom Woller <thomas.woller@amd.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 01 23:38:18 2006 +0100 (2006-03-01)
parents b0dfd76ef5d2
children 9bde2889635c
files xen/arch/x86/hvm/svm/x86_32/exits.S
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/x86_32/exits.S	Wed Mar 01 23:35:55 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/x86_32/exits.S	Wed Mar 01 23:38:18 2006 +0100
     1.3 @@ -88,9 +88,6 @@
     1.4  #define STGI   .byte 0x0F,0x01,0xDC
     1.5  #define CLGI   .byte 0x0F,0x01,0xDD
     1.6  
     1.7 -#define DO_TSC_OFFSET 0
     1.8 -#define DO_FPUSAVE    0
     1.9 -        
    1.10  ENTRY(svm_asm_do_launch)
    1.11          sti
    1.12          CLGI                
    1.13 @@ -101,36 +98,6 @@ ENTRY(svm_asm_do_launch)
    1.14          movl VCPU_svm_hsa_pa(%ebx), %eax
    1.15          VMSAVE
    1.16  
    1.17 -#if DO_FPUSAVE
    1.18 -        mov      %cr0, %eax     
    1.19 -        push %eax
    1.20 -        clts
    1.21 -        lea     VCPU_arch_guest_fpu_ctxt(%ebx), %eax
    1.22 -        fxrstor (%eax)
    1.23 -        pop      %eax
    1.24 -        mov      %eax, %cr0
    1.25 -#endif
    1.26 -
    1.27 -#if (DO_TSC_OFFSET)
    1.28 -        pushl %edx /* eax and edx get trashed by rdtsc */
    1.29 -        pushl %eax
    1.30 -        rdtsc
    1.31 -        subl VCPU_svm_vmexit_tsc(%ebx),%eax   /* tsc's from    */
    1.32 -        sbbl VCPU_svm_vmexit_tsc+4(%ebx),%edx /* last #VMEXIT? */
    1.33 -        subl %eax,VMCB_tsc_offset(%ecx)  /* subtract from running TSC_OFFSET */
    1.34 -        sbbl %edx,VMCB_tsc_offset+4(%ecx)
    1.35 -        subl $20000,VMCB_tsc_offset(%ecx)  /* fudge factor for VMXXX calls  */
    1.36 -        sbbl $0,VMCB_tsc_offset+4(%ecx)
    1.37 -
    1.38 -        /* 
    1.39 -         * TODO: may need to add a kludge factor to account for all the cycles 
    1.40 -         * burned in VMLOAD, VMSAVE, VMRUN...
    1.41 -         */
    1.42 -
    1.43 -        popl %eax
    1.44 -        popl %edx
    1.45 -        #endif
    1.46 -
    1.47          movl VCPU_svm_vmcb_pa(%ebx), %eax
    1.48          popl %ebx
    1.49          popl %ecx
    1.50 @@ -150,31 +117,7 @@ ENTRY(svm_asm_do_launch)
    1.51          VMSAVE
    1.52          /* eax is the only register we're allowed to touch here... */
    1.53  
    1.54 -#if DO_FPUSAVE
    1.55 -        mov  %cr0, %eax
    1.56 -        push %eax
    1.57 -        clts
    1.58          GET_CURRENT(%eax)
    1.59 -        lea     VCPU_arch_guest_fpu_ctxt(%eax), %eax
    1.60 -        fxsave (%eax)
    1.61 -        fnclex
    1.62 -        pop  %eax
    1.63 -        mov  %eax, %cr0
    1.64 -#endif
    1.65 -        
    1.66 -        GET_CURRENT(%eax)
    1.67 -
    1.68 -#if (DO_TSC_OFFSET)
    1.69 -        pushl %edx
    1.70 -        pushl %ebx
    1.71 -        movl %eax,%ebx
    1.72 -        rdtsc
    1.73 -        movl %eax,VCPU_svm_vmexit_tsc(%ebx)
    1.74 -        movl %edx,VCPU_svm_vmexit_tsc+4(%ebx)
    1.75 -        movl %ebx,%eax
    1.76 -        popl %ebx
    1.77 -        popl %edx
    1.78 -#endif
    1.79  
    1.80          movl VCPU_svm_hsa_pa(%eax), %eax
    1.81          VMLOAD