WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] More hyperprivop work

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] More hyperprivop work
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 20 Jun 2005 20:36:39 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Thu, 23 Jun 2005 11:02:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1713.2.12, 2005/06/20 14:36:39-06:00, djm@xxxxxxxxxxxxxxx

        More hyperprivop work
        Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxx>



 asm-offsets.c |    2 ++
 hyperprivop.S |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)


diff -Nru a/xen/arch/ia64/asm-offsets.c b/xen/arch/ia64/asm-offsets.c
--- a/xen/arch/ia64/asm-offsets.c       2005-06-23 07:03:54 -04:00
+++ b/xen/arch/ia64/asm-offsets.c       2005-06-23 07:03:54 -04:00
@@ -79,8 +79,10 @@
        DEFINE(IA64_VCPU_IRR0_OFFSET, offsetof (struct vcpu, arch.irr[0]));
        DEFINE(IA64_VCPU_IRR3_OFFSET, offsetof (struct vcpu, arch.irr[3]));
        DEFINE(IA64_VCPU_INSVC3_OFFSET, offsetof (struct vcpu, arch.insvc[3]));
+       DEFINE(IA64_VCPU_DOMAIN_ITM_OFFSET, offsetof (struct vcpu, 
arch.domain_itm));
 
        BLANK();
+       DEFINE(IA64_CPUINFO_ITM_NEXT_OFFSET, offsetof (struct cpuinfo_ia64, 
itm_next));
 
        //DEFINE(IA64_SIGHAND_SIGLOCK_OFFSET,offsetof (struct sighand_struct, 
siglock));
 
diff -Nru a/xen/arch/ia64/hyperprivop.S b/xen/arch/ia64/hyperprivop.S
--- a/xen/arch/ia64/hyperprivop.S       2005-06-23 07:03:54 -04:00
+++ b/xen/arch/ia64/hyperprivop.S       2005-06-23 07:03:54 -04:00
@@ -97,6 +97,10 @@
        cmp.eq p7,p6=XEN_HYPER_EOI,r17
 (p7)   br.sptk.many hyper_eoi;;
 
+       // HYPERPRIVOP_SET_ITM?
+       cmp.eq p7,p6=XEN_HYPER_SET_ITM,r17
+(p7)   br.sptk.many hyper_set_itm;;
+
        // if not one of the above, give up for now and do it the slow way
        br.sptk.many dispatch_break_fault ;;
 
@@ -802,3 +806,46 @@
        rfi
        ;;
 END(hyper_eoi)
+
+ENTRY(hyper_set_itm)
+       // when we get to here r20=~=interrupts pending
+       cmp.ne p7,p0=r20,r0
+(p7)   br.spnt.many dispatch_break_fault ;;
+#ifdef FAST_HYPERPRIVOP_CNT
+       movl r20=fast_hyperpriv_cnt+(8*XEN_HYPER_SET_ITM);;
+       ld8 r21=[r20];;
+       adds r21=1,r21;;
+       st8 [r20]=r21;;
+#endif
+       movl r20=(PERCPU_ADDR)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
+       ld8 r21=[r20];;
+       mov r20=IA64_KR(CURRENT);;
+       adds r20=IA64_VCPU_DOMAIN_ITM_OFFSET,r20;;
+       st8 [r20]=r8;;
+       cmp.geu p6,p0=r21,r8;;
+(p6)   mov r21=r8;;
+       // now "safe set" cr.itm=r21
+       mov r23=100;;
+2:     mov cr.itm=r21;;
+       srlz.d;;
+       mov r22=ar.itc ;;
+       cmp.leu p6,p0=r21,r22;;
+       add r21=r21,r23;;
+       shl r23=r23,1;;
+(p6)   br.cond.spnt.few 2b;;
+1:     mov r24=cr.ipsr
+       mov r25=cr.iip;;
+       extr.u r26=r24,41,2 ;;
+       cmp.eq p6,p7=2,r26 ;;
+(p6)   mov r26=0
+(p6)   adds r25=16,r25
+(p7)   adds r26=1,r26
+       ;;
+       dep r24=r26,r24,41,2
+       ;;
+       mov cr.ipsr=r24
+       mov cr.iip=r25
+       mov pr=r31,-1 ;;
+       rfi
+       ;;
+END(hyper_set_itm)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>