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] Syntactic changes to prepare for possible vcpu_info chan

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Syntactic changes to prepare for possible vcpu_info changes
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Aug 2005 05:26:13 -0400
Delivery-date: Wed, 03 Aug 2005 09:27:15 +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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID db8a7f39df9336df80917c4cd1b8aa8072d66ddd
# Parent  738ba414ce80fab79667b98f2917d992fb7b0ead
Syntactic changes to prepare for possible vcpu_info changes

diff -r 738ba414ce80 -r db8a7f39df93 xen/arch/ia64/hypercall.c
--- a/xen/arch/ia64/hypercall.c Wed Jul 27 19:07:07 2005
+++ b/xen/arch/ia64/hypercall.c Wed Jul 27 19:57:05 2005
@@ -41,13 +41,13 @@
                // to a yet-to-be-found bug where pending_interruption
                // is zero when it shouldn't be. Since PAL is called
                // in the idle loop, this should resolve it
-               v->vcpu_info->arch.pending_interruption = 1;
+               VCPU(v,pending_interruption) = 1;
 #endif
                if (regs->r28 == PAL_HALT_LIGHT) {
 #define SPURIOUS_VECTOR 15
                        pi = vcpu_check_pending_interrupts(v);
                        if (pi != SPURIOUS_VECTOR) {
-                               if (!v->vcpu_info->arch.pending_interruption)
+                               if (!VCPU(v,pending_interruption))
                                        idle_when_pending++;
                                vcpu_pend_unspecified_interrupt(v);
 //printf("idle w/int#%d pending!\n",pi);
diff -r 738ba414ce80 -r db8a7f39df93 xen/arch/ia64/process.c
--- a/xen/arch/ia64/process.c   Wed Jul 27 19:07:07 2005
+++ b/xen/arch/ia64/process.c   Wed Jul 27 19:57:05 2005
@@ -50,7 +50,7 @@
                        IA64_PSR_ID | IA64_PSR_DA | IA64_PSR_DD | \
                        IA64_PSR_SS | IA64_PSR_RI | IA64_PSR_ED | IA64_PSR_IA)
 
-#define PSCB(x,y)      x->vcpu_info->arch.y
+#define PSCB(x,y)      VCPU(x,y)
 #define PSCBX(x,y)     x->arch.y
 
 extern unsigned long vcpu_verbose;
diff -r 738ba414ce80 -r db8a7f39df93 xen/arch/ia64/regionreg.c
--- a/xen/arch/ia64/regionreg.c Wed Jul 27 19:07:07 2005
+++ b/xen/arch/ia64/regionreg.c Wed Jul 27 19:57:05 2005
@@ -14,6 +14,7 @@
 #include <asm/page.h>
 #include <asm/regionreg.h>
 #include <asm/vhpt.h>
+#include <asm/vcpu.h>
 
 
 #define        IA64_MIN_IMPL_RID_BITS  (IA64_MIN_IMPL_RID_MSB+1)
@@ -332,14 +333,14 @@
        rrv.ps = PAGE_SHIFT;
        rrv.ve = 1;
 if (!v->vcpu_info) { printf("Stopping in init_all_rr\n"); dummy(); }
-       v->vcpu_info->arch.rrs[0] = -1;
-       v->vcpu_info->arch.rrs[1] = rrv.rrval;
-       v->vcpu_info->arch.rrs[2] = rrv.rrval;
-       v->vcpu_info->arch.rrs[3] = rrv.rrval;
-       v->vcpu_info->arch.rrs[4] = rrv.rrval;
-       v->vcpu_info->arch.rrs[5] = rrv.rrval;
+       VCPU(v,rrs[0]) = -1;
+       VCPU(v,rrs[1]) = rrv.rrval;
+       VCPU(v,rrs[2]) = rrv.rrval;
+       VCPU(v,rrs[3]) = rrv.rrval;
+       VCPU(v,rrs[4]) = rrv.rrval;
+       VCPU(v,rrs[5]) = rrv.rrval;
        rrv.ve = 0; 
-       v->vcpu_info->arch.rrs[6] = rrv.rrval;
+       VCPU(v,rrs[6]) = rrv.rrval;
 //     v->shared_info->arch.rrs[7] = rrv.rrval;
 }
 
@@ -378,7 +379,7 @@
        // TODO: These probably should be validated
        unsigned long bad = 0;
 
-       if (v->vcpu_info->arch.metaphysical_mode) {
+       if (VCPU(v,metaphysical_mode)) {
                ia64_rr rrv;
 
                rrv.rrval = 0;
@@ -390,16 +391,16 @@
                ia64_srlz_d();
        }
        else {
-               rr0 =  v->vcpu_info->arch.rrs[0];
+               rr0 =  VCPU(v,rrs[0]);
                if (!set_one_rr(0x0000000000000000L, rr0)) bad |= 1;
        }
-       rr1 =  v->vcpu_info->arch.rrs[1];
-       rr2 =  v->vcpu_info->arch.rrs[2];
-       rr3 =  v->vcpu_info->arch.rrs[3];
-       rr4 =  v->vcpu_info->arch.rrs[4];
-       rr5 =  v->vcpu_info->arch.rrs[5];
-       rr6 =  v->vcpu_info->arch.rrs[6];
-       rr7 =  v->vcpu_info->arch.rrs[7];
+       rr1 =  VCPU(v,rrs[1]);
+       rr2 =  VCPU(v,rrs[2]);
+       rr3 =  VCPU(v,rrs[3]);
+       rr4 =  VCPU(v,rrs[4]);
+       rr5 =  VCPU(v,rrs[5]);
+       rr6 =  VCPU(v,rrs[6]);
+       rr7 =  VCPU(v,rrs[7]);
        if (!set_one_rr(0x2000000000000000L, rr1)) bad |= 2;
        if (!set_one_rr(0x4000000000000000L, rr2)) bad |= 4;
        if (!set_one_rr(0x6000000000000000L, rr3)) bad |= 8;
@@ -410,4 +411,5 @@
        if (bad) {
                panic_domain(0,"load_region_regs: can't set! bad=%lx\n",bad);
        }
-}
+       return 0;
+}
diff -r 738ba414ce80 -r db8a7f39df93 xen/arch/ia64/vcpu.c
--- a/xen/arch/ia64/vcpu.c      Wed Jul 27 19:07:07 2005
+++ b/xen/arch/ia64/vcpu.c      Wed Jul 27 19:57:05 2005
@@ -28,7 +28,7 @@
 
 // this def for vcpu_regs won't work if kernel stack is present
 #define        vcpu_regs(vcpu) ((struct pt_regs *) vcpu->arch.regs)
-#define        PSCB(x,y)       x->vcpu_info->arch.y
+#define        PSCB(x,y)       VCPU(x,y)
 #define        PSCBX(x,y)      x->arch.y
 
 #define        TRUE    1
diff -r 738ba414ce80 -r db8a7f39df93 xen/arch/ia64/xentime.c
--- a/xen/arch/ia64/xentime.c   Wed Jul 27 19:07:07 2005
+++ b/xen/arch/ia64/xentime.c   Wed Jul 27 19:57:05 2005
@@ -27,6 +27,7 @@
 #include <asm/sections.h>
 #include <asm/system.h>
 #ifdef XEN
+#include <asm/vcpu.h>
 #include <linux/jiffies.h>     // not included by xen/sched.h
 #endif
 #include <xen/softirq.h>
@@ -143,8 +144,8 @@
        if (!(++count & ((HEARTBEAT_FREQ*1024)-1))) {
                printf("Heartbeat... iip=%p,psr.i=%d,pend=%d\n",
                        regs->cr_iip,
-                       current->vcpu_info->arch.interrupt_delivery_enabled,
-                       current->vcpu_info->arch.pending_interruption);
+                       VCPU(current,interrupt_delivery_enabled),
+                       VCPU(current,pending_interruption));
                count = 0;
        }
 #endif
@@ -159,7 +160,7 @@
                // We have to ensure that domain0 is launched before we
                // call vcpu_timer_expired on it
                //domain0_ready = 1; // moved to xensetup.c
-               current->vcpu_info->arch.pending_interruption = 1;
+               VCPU(current,pending_interruption) = 1;
        }
        if (domain0_ready && vcpu_timer_expired(dom0->vcpu[0])) {
                vcpu_pend_timer(dom0->vcpu[0]);
diff -r 738ba414ce80 -r db8a7f39df93 xen/include/asm-ia64/event.h
--- a/xen/include/asm-ia64/event.h      Wed Jul 27 19:07:07 2005
+++ b/xen/include/asm-ia64/event.h      Wed Jul 27 19:57:05 2005
@@ -9,9 +9,11 @@
 #ifndef __ASM_EVENT_H__
 #define __ASM_EVENT_H__
 
+#include <asm/vcpu.h>
+
 static inline void evtchn_notify(struct vcpu *v)
 {
-       vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
+       vcpu_pend_interrupt(v, VCPU(v,evtchn_vector));
 }
 
 #endif
diff -r 738ba414ce80 -r db8a7f39df93 xen/include/asm-ia64/vcpu.h
--- a/xen/include/asm-ia64/vcpu.h       Wed Jul 27 19:07:07 2005
+++ b/xen/include/asm-ia64/vcpu.h       Wed Jul 27 19:57:05 2005
@@ -13,13 +13,9 @@
 struct vcpu;
 typedef        struct vcpu VCPU;
 
-// NOTE: The actual VCPU structure (struct virtualcpu) is defined in
-// thread.h.  Moving it to here caused a lot of files to change, so
-// for now, we'll leave well enough alone.
 typedef struct pt_regs REGS;
-//#define PSCB(vcpu)           (((struct spk_thread_t *)vcpu)->pscb)
-//#define vcpu_regs(vcpu)              &((struct spk_thread_t 
*)vcpu)->thread_regs
-//#define vcpu_thread(vcpu)    ((struct spk_thread_t *)vcpu)
+
+#define VCPU(_v,_x)    _v->vcpu_info->arch._x
 
 #define PRIVOP_ADDR_COUNT
 #ifdef PRIVOP_ADDR_COUNT

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Syntactic changes to prepare for possible vcpu_info changes, Xen patchbot -unstable <=