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] [IA64] move evtchn_vector to shared_info

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [IA64] move evtchn_vector to shared_info
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2006 12:44:40 +0000
Delivery-date: Tue, 23 May 2006 05:50:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 awilliam@xxxxxxxxxxx
# Node ID 90329e7d6be5a30ebe7c63453428a13ed0c97c01
# Parent  b487f4e1b09f9f127ba99afedebc39ee448a7df6
[IA64] move evtchn_vector to shared_info

Move evtchn_vector from vcpu_info to shared_info.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c |   17 ++-------------
 linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S           |    2 -
 tools/libxc/xc_ia64_stubs.c                              |    2 -
 tools/libxc/xc_linux_build.c                             |    2 -
 xen/arch/ia64/xen/domain.c                               |   13 +++--------
 xen/arch/ia64/xen/hypercall.c                            |    3 --
 xen/arch/ia64/xen/vcpu.c                                 |    4 +--
 xen/include/asm-ia64/event.h                             |    2 -
 xen/include/public/arch-ia64.h                           |    7 +++---
 9 files changed, 17 insertions(+), 35 deletions(-)

diff -r b487f4e1b09f -r 90329e7d6be5 
linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c  Sun May 14 
09:16:21 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c  Mon May 15 
10:53:23 2006 -0600
@@ -246,25 +246,14 @@ static struct irqaction evtchn_irqaction
        .name =         "xen-event-channel"
 };
 
-int evtchn_irq = 0xe9;
+static int evtchn_irq = 0xe9;
 void __init evtchn_init(void)
 {
     shared_info_t *s = HYPERVISOR_shared_info;
-    vcpu_info_t   *vcpu_info = &s->vcpu_info[smp_processor_id()];
-
-#if 0
-    int ret;
-    irq = assign_irq_vector(AUTO_ASSIGN);
-    ret = request_irq(irq, evtchn_interrupt, 0, "xen-event-channel", NULL);
-    if (ret < 0)
-    {
-       printk("xen-event-channel unable to get irq %d (%d)\n", irq, ret);
-       return;
-    }
-#endif
+
     register_percpu_irq(evtchn_irq, &evtchn_irqaction);
 
-    vcpu_info->arch.evtchn_vector = evtchn_irq;
+    s->arch.evtchn_vector = evtchn_irq;
     printk("xen-event-channel using irq %d\n", evtchn_irq);
 
     spin_lock_init(&irq_mapping_update_lock);
diff -r b487f4e1b09f -r 90329e7d6be5 
linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S
--- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S    Sun May 14 09:16:21 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S    Mon May 15 10:53:23 
2006 -0600
@@ -247,7 +247,7 @@ 1:  mov r8=r32
        XEN_RESTORE_PSR_IC
        ;;
        br.ret.sptk.many rp
-END(xen_set_rr)
+END(xen_set_kr)
 
 GLOBAL_ENTRY(xen_fc)
        movl r8=running_on_xen;;
diff -r b487f4e1b09f -r 90329e7d6be5 tools/libxc/xc_ia64_stubs.c
--- a/tools/libxc/xc_ia64_stubs.c       Sun May 14 09:16:21 2006 -0600
+++ b/tools/libxc/xc_ia64_stubs.c       Mon May 15 10:53:23 2006 -0600
@@ -723,7 +723,7 @@ int xc_hvm_build(int xc_handle,
 
     ctxt->flags = VGCF_VMX_GUEST;
     ctxt->regs.cr_iip = 0x80000000ffffffb0UL;
-    ctxt->vcpu.privregs = 0;
+    ctxt->privregs = 0;
 
     memset( &launch_op, 0, sizeof(launch_op) );
 
diff -r b487f4e1b09f -r 90329e7d6be5 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Sun May 14 09:16:21 2006 -0600
+++ b/tools/libxc/xc_linux_build.c      Mon May 15 10:53:23 2006 -0600
@@ -1114,7 +1114,7 @@ static int xc_linux_build_internal(int x
     ctxt->regs.ar_fpsr = xc_ia64_fpsr_default();
     /* currently done by hypervisor, should move here */
     /* ctxt->regs.r28 = dom_fw_setup(); */
-    ctxt->vcpu.privregs = 0;
+    ctxt->privregs = 0;
     ctxt->sys_pgnr = 3;
     i = 0; /* silence unused variable warning */
 #else /* x86 */
diff -r b487f4e1b09f -r 90329e7d6be5 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Sun May 14 09:16:21 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c        Mon May 15 10:53:23 2006 -0600
@@ -269,11 +269,7 @@ fail_nomem:
 
 void arch_getdomaininfo_ctxt(struct vcpu *v, struct vcpu_guest_context *c)
 {
-       struct pt_regs *regs = vcpu_regs (v);
-
-       c->regs = *regs;
-       c->vcpu.evtchn_vector = v->vcpu_info->arch.evtchn_vector;
-
+       c->regs = *vcpu_regs (v);
        c->shared = v->domain->shared_info->arch;
 }
 
@@ -312,11 +308,10 @@ int arch_set_info_guest(struct vcpu *v, 
        }
        new_thread(v, regs->cr_iip, 0, 0);
 
-       v->vcpu_info->arch.evtchn_vector = c->vcpu.evtchn_vector;
-       if ( c->vcpu.privregs && copy_from_user(v->arch.privregs,
-                          c->vcpu.privregs, sizeof(mapped_regs_t))) {
+       if ( c->privregs && copy_from_user(v->arch.privregs,
+                          c->privregs, sizeof(mapped_regs_t))) {
            printk("Bad ctxt address in arch_set_info_guest: %p\n",
-                  c->vcpu.privregs);
+                  c->privregs);
            return -EFAULT;
        }
 
diff -r b487f4e1b09f -r 90329e7d6be5 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Sun May 14 09:16:21 2006 -0600
+++ b/xen/arch/ia64/xen/hypercall.c     Mon May 15 10:53:23 2006 -0600
@@ -153,9 +153,6 @@ fw_hypercall_ipi (struct pt_regs *regs)
                c.regs.cr_iip = targ_regs->cr_iip;
                c.regs.r1 = targ_regs->r1;
                
-               /* Copy from vcpu 0.  */
-               c.vcpu.evtchn_vector =
-                       current->domain->vcpu[0]->vcpu_info->arch.evtchn_vector;
                if (arch_set_info_guest (targ, &c) != 0) {
                        printf ("arch_boot_vcpu: failure\n");
                        return;
diff -r b487f4e1b09f -r 90329e7d6be5 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Sun May 14 09:16:21 2006 -0600
+++ b/xen/arch/ia64/xen/vcpu.c  Mon May 15 10:53:23 2006 -0600
@@ -682,9 +682,9 @@ UINT64 vcpu_check_pending_interrupts(VCP
         */
 check_start:
        if (event_pending(vcpu) && 
-               !test_bit(vcpu->vcpu_info->arch.evtchn_vector,
+               !test_bit(vcpu->domain->shared_info->arch.evtchn_vector,
                        &PSCBX(vcpu, insvc[0])))
-               vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector);
+               vcpu_pend_interrupt(vcpu, 
vcpu->domain->shared_info->arch.evtchn_vector);
 
        p = &PSCBX(vcpu,irr[3]);
        r = &PSCBX(vcpu,insvc[3]);
diff -r b487f4e1b09f -r 90329e7d6be5 xen/include/asm-ia64/event.h
--- a/xen/include/asm-ia64/event.h      Sun May 14 09:16:21 2006 -0600
+++ b/xen/include/asm-ia64/event.h      Mon May 15 10:53:23 2006 -0600
@@ -29,7 +29,7 @@ static inline void evtchn_notify(struct 
         smp_send_event_check_cpu(v->processor);
 
     if(!VMX_DOMAIN(v))
-       vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
+       vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector);
 }
 
 /* Note: Bitwise operations result in fast code with no branches. */
diff -r b487f4e1b09f -r 90329e7d6be5 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Sun May 14 09:16:21 2006 -0600
+++ b/xen/include/public/arch-ia64.h    Mon May 15 10:53:23 2006 -0600
@@ -293,8 +293,6 @@ typedef struct {
 } mapped_regs_t;
 
 typedef struct {
-    mapped_regs_t *privregs;
-    int evtchn_vector;
 } arch_vcpu_info_t;
 
 typedef mapped_regs_t vpd_t;
@@ -302,6 +300,9 @@ typedef struct {
 typedef struct {
     unsigned int flags;
     unsigned long start_info_pfn;
+
+    /* Interrupt vector for event channel.  */
+    int evtchn_vector;
 } arch_shared_info_t;
 
 typedef struct {
@@ -321,7 +322,7 @@ typedef struct vcpu_guest_context {
     unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
 
     cpu_user_regs_t regs;
-    arch_vcpu_info_t vcpu;
+    mapped_regs_t *privregs;
     arch_shared_info_t shared;
     arch_initrd_info_t initrd;
     char cmdline[IA64_COMMAND_LINE_SIZE];

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [IA64] move evtchn_vector to shared_info, Xen patchbot-unstable <=