ia64/xen-unstable

changeset 16795:44aca51a4b7b

[IA64] Support continuation for hypercall in hvm.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:12:08 2008 -0700 (2008-01-17)
parents 7238393ef220
children 7643472d6b43
files xen/arch/ia64/vmx/vmx_ivt.S
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_ivt.S	Thu Jan 17 12:11:01 2008 -0700
     1.2 +++ b/xen/arch/ia64/vmx/vmx_ivt.S	Thu Jan 17 12:12:08 2008 -0700
     1.3 @@ -566,7 +566,6 @@ ENTRY(vmx_break_fault)
     1.4  
     1.5      mov.m r25=ar.unat			// M2 (5 cyc)
     1.6      dep r29=r8,r29,41,2			// I0   insert new ei into cr.ipsr
     1.7 -//  adds r15=1024,r15			// A    restore original syscall number
     1.8     //
     1.9     // If any of the above loads miss in L1D, we'll stall here until
    1.10     // the data arrives.
    1.11 @@ -574,34 +573,43 @@ ENTRY(vmx_break_fault)
    1.12  ///////////////////////////////////////////////////////////////////////
    1.13  //    st1 [r16]=r0				// M2|3 clear current->thread.on_ustack flag
    1.14      mov b6=r30				// I0   setup syscall handler branch reg early
    1.15 -//    cmp.ne pKStk,pUStk=r0,r0		// A    were we on kernel stacks already?
    1.16  
    1.17 -//  and r9=_TIF_SYSCALL_TRACEAUDIT,r9	// A    mask trace or audit
    1.18      mov r18=ar.bsp				// M2 (12 cyc)
    1.19     ;;
    1.20 -//(pUStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1 // A    compute base of memory stack
    1.21      addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1 // A    compute base of memory stack
    1.22 -//  cmp.eq p14,p0=r9,r0			// A    are syscalls being traced/audited?
    1.23 -//    br.call.sptk.many b7=ia64_syscall_setup	// B
    1.24      br.call.sptk.many b7=ia64_hypercall_setup	// B
    1.25  1:
    1.26      mov ar.rsc=0x3				// M2   set eager mode, pl 0, LE, loadrs=0
    1.27 -//    nop 0
    1.28 -//    bsw.1					// B (6 cyc) regs are saved, switch to bank 1
    1.29      ;;
    1.30      ssm psr.ic | PSR_DEFAULT_BITS		// M2	now it's safe to re-enable intr.-collection
    1.31 -//    movl r3=ia64_ret_from_syscall		// X
    1.32 -    movl r3=ia64_leave_hypercall		// X
    1.33      ;;
    1.34  
    1.35      srlz.i					// M0   ensure interruption collection is on
    1.36 -    mov rp=r3				// I0   set the real return addr
    1.37 -    //(p10) br.cond.spnt.many ia64_ret_from_syscall	// B    return if bad call-frame or r15 is a NaT
    1.38 -    (p15)   ssm psr.i				// M2   restore psr.i
    1.39 -    //(p14) br.call.sptk.many b6=b6			// B    invoke syscall-handker (ignore return addr)
    1.40 -    br.call.sptk.many b6=b6			// B    invoke syscall-handker (ignore return addr)
    1.41 -//  br.cond.spnt.many ia64_trace_syscall	// B	do syscall-tracing thingamagic
    1.42 -   ;;
    1.43 +(p15)   ssm psr.i				// M2   restore psr.i
    1.44 +    br.call.sptk.many b0=b6			// B    invoke syscall-handker (ignore return addr)
    1.45 +	;; 
    1.46 +	//restore hypercall argument if continuation
    1.47 +	adds r2=IA64_VCPU_HYPERCALL_CONTINUATION_OFS,r13
    1.48 +	;;
    1.49 +	ld1 r20=[r2]
    1.50 +	;;
    1.51 +	st1 [r2]=r0
    1.52 +	cmp.ne p6,p0=r20,r0
    1.53 +	;;
    1.54 +(p6)	adds r2=PT(R16)+16,r12
    1.55 +(p6)	adds r3=PT(R17)+16,r12
    1.56 +	;;
    1.57 +(p6)	ld8 r32=[r2],16
    1.58 +(p6)	ld8 r33=[r3],16
    1.59 +	;;
    1.60 +(p6)	ld8 r34=[r2],16
    1.61 +(p6)	ld8 r35=[r3],16
    1.62 +	;;
    1.63 +(p6)	ld8 r36=[r2],16
    1.64 +	;;
    1.65 +	br.sptk.many ia64_leave_hypercall
    1.66 +	;;
    1.67 +
    1.68     VMX_FAULT(11)
    1.69  END(vmx_break_fault)
    1.70