ia64/xen-unstable

changeset 10008:90329e7d6be5

[IA64] move evtchn_vector to shared_info

Move evtchn_vector from vcpu_info to shared_info.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon May 15 10:53:23 2006 -0600 (2006-05-15)
parents b487f4e1b09f
children 299f048c4855
files linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S tools/libxc/xc_ia64_stubs.c tools/libxc/xc_linux_build.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/hypercall.c xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/event.h xen/include/public/arch-ia64.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Sun May 14 09:16:21 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Mon May 15 10:53:23 2006 -0600
     1.3 @@ -246,25 +246,14 @@ static struct irqaction evtchn_irqaction
     1.4  	.name =		"xen-event-channel"
     1.5  };
     1.6  
     1.7 -int evtchn_irq = 0xe9;
     1.8 +static int evtchn_irq = 0xe9;
     1.9  void __init evtchn_init(void)
    1.10  {
    1.11      shared_info_t *s = HYPERVISOR_shared_info;
    1.12 -    vcpu_info_t   *vcpu_info = &s->vcpu_info[smp_processor_id()];
    1.13  
    1.14 -#if 0
    1.15 -    int ret;
    1.16 -    irq = assign_irq_vector(AUTO_ASSIGN);
    1.17 -    ret = request_irq(irq, evtchn_interrupt, 0, "xen-event-channel", NULL);
    1.18 -    if (ret < 0)
    1.19 -    {
    1.20 -	printk("xen-event-channel unable to get irq %d (%d)\n", irq, ret);
    1.21 -	return;
    1.22 -    }
    1.23 -#endif
    1.24      register_percpu_irq(evtchn_irq, &evtchn_irqaction);
    1.25  
    1.26 -    vcpu_info->arch.evtchn_vector = evtchn_irq;
    1.27 +    s->arch.evtchn_vector = evtchn_irq;
    1.28      printk("xen-event-channel using irq %d\n", evtchn_irq);
    1.29  
    1.30      spin_lock_init(&irq_mapping_update_lock);
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Sun May 14 09:16:21 2006 -0600
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Mon May 15 10:53:23 2006 -0600
     2.3 @@ -247,7 +247,7 @@ 1:	mov r8=r32
     2.4  	XEN_RESTORE_PSR_IC
     2.5  	;;
     2.6  	br.ret.sptk.many rp
     2.7 -END(xen_set_rr)
     2.8 +END(xen_set_kr)
     2.9  
    2.10  GLOBAL_ENTRY(xen_fc)
    2.11  	movl r8=running_on_xen;;
     3.1 --- a/tools/libxc/xc_ia64_stubs.c	Sun May 14 09:16:21 2006 -0600
     3.2 +++ b/tools/libxc/xc_ia64_stubs.c	Mon May 15 10:53:23 2006 -0600
     3.3 @@ -723,7 +723,7 @@ int xc_hvm_build(int xc_handle,
     3.4  
     3.5      ctxt->flags = VGCF_VMX_GUEST;
     3.6      ctxt->regs.cr_iip = 0x80000000ffffffb0UL;
     3.7 -    ctxt->vcpu.privregs = 0;
     3.8 +    ctxt->privregs = 0;
     3.9  
    3.10      memset( &launch_op, 0, sizeof(launch_op) );
    3.11  
     4.1 --- a/tools/libxc/xc_linux_build.c	Sun May 14 09:16:21 2006 -0600
     4.2 +++ b/tools/libxc/xc_linux_build.c	Mon May 15 10:53:23 2006 -0600
     4.3 @@ -1114,7 +1114,7 @@ static int xc_linux_build_internal(int x
     4.4      ctxt->regs.ar_fpsr = xc_ia64_fpsr_default();
     4.5      /* currently done by hypervisor, should move here */
     4.6      /* ctxt->regs.r28 = dom_fw_setup(); */
     4.7 -    ctxt->vcpu.privregs = 0;
     4.8 +    ctxt->privregs = 0;
     4.9      ctxt->sys_pgnr = 3;
    4.10      i = 0; /* silence unused variable warning */
    4.11  #else /* x86 */
     5.1 --- a/xen/arch/ia64/xen/domain.c	Sun May 14 09:16:21 2006 -0600
     5.2 +++ b/xen/arch/ia64/xen/domain.c	Mon May 15 10:53:23 2006 -0600
     5.3 @@ -269,11 +269,7 @@ fail_nomem:
     5.4  
     5.5  void arch_getdomaininfo_ctxt(struct vcpu *v, struct vcpu_guest_context *c)
     5.6  {
     5.7 -	struct pt_regs *regs = vcpu_regs (v);
     5.8 -
     5.9 -	c->regs = *regs;
    5.10 -	c->vcpu.evtchn_vector = v->vcpu_info->arch.evtchn_vector;
    5.11 -
    5.12 +	c->regs = *vcpu_regs (v);
    5.13  	c->shared = v->domain->shared_info->arch;
    5.14  }
    5.15  
    5.16 @@ -312,11 +308,10 @@ int arch_set_info_guest(struct vcpu *v, 
    5.17  	}
    5.18  	new_thread(v, regs->cr_iip, 0, 0);
    5.19  
    5.20 - 	v->vcpu_info->arch.evtchn_vector = c->vcpu.evtchn_vector;
    5.21 -	if ( c->vcpu.privregs && copy_from_user(v->arch.privregs,
    5.22 -			   c->vcpu.privregs, sizeof(mapped_regs_t))) {
    5.23 +	if ( c->privregs && copy_from_user(v->arch.privregs,
    5.24 +			   c->privregs, sizeof(mapped_regs_t))) {
    5.25  	    printk("Bad ctxt address in arch_set_info_guest: %p\n",
    5.26 -		   c->vcpu.privregs);
    5.27 +		   c->privregs);
    5.28  	    return -EFAULT;
    5.29  	}
    5.30  
     6.1 --- a/xen/arch/ia64/xen/hypercall.c	Sun May 14 09:16:21 2006 -0600
     6.2 +++ b/xen/arch/ia64/xen/hypercall.c	Mon May 15 10:53:23 2006 -0600
     6.3 @@ -153,9 +153,6 @@ fw_hypercall_ipi (struct pt_regs *regs)
     6.4  		c.regs.cr_iip = targ_regs->cr_iip;
     6.5  		c.regs.r1 = targ_regs->r1;
     6.6  		
     6.7 -		/* Copy from vcpu 0.  */
     6.8 -		c.vcpu.evtchn_vector =
     6.9 -			current->domain->vcpu[0]->vcpu_info->arch.evtchn_vector;
    6.10  		if (arch_set_info_guest (targ, &c) != 0) {
    6.11  			printf ("arch_boot_vcpu: failure\n");
    6.12  			return;
     7.1 --- a/xen/arch/ia64/xen/vcpu.c	Sun May 14 09:16:21 2006 -0600
     7.2 +++ b/xen/arch/ia64/xen/vcpu.c	Mon May 15 10:53:23 2006 -0600
     7.3 @@ -682,9 +682,9 @@ UINT64 vcpu_check_pending_interrupts(VCP
     7.4  	 */
     7.5  check_start:
     7.6  	if (event_pending(vcpu) && 
     7.7 -		!test_bit(vcpu->vcpu_info->arch.evtchn_vector,
     7.8 +		!test_bit(vcpu->domain->shared_info->arch.evtchn_vector,
     7.9  			&PSCBX(vcpu, insvc[0])))
    7.10 -		vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector);
    7.11 +		vcpu_pend_interrupt(vcpu, vcpu->domain->shared_info->arch.evtchn_vector);
    7.12  
    7.13  	p = &PSCBX(vcpu,irr[3]);
    7.14  	r = &PSCBX(vcpu,insvc[3]);
     8.1 --- a/xen/include/asm-ia64/event.h	Sun May 14 09:16:21 2006 -0600
     8.2 +++ b/xen/include/asm-ia64/event.h	Mon May 15 10:53:23 2006 -0600
     8.3 @@ -29,7 +29,7 @@ static inline void evtchn_notify(struct 
     8.4          smp_send_event_check_cpu(v->processor);
     8.5  
     8.6      if(!VMX_DOMAIN(v))
     8.7 -	vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
     8.8 +	vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector);
     8.9  }
    8.10  
    8.11  /* Note: Bitwise operations result in fast code with no branches. */
     9.1 --- a/xen/include/public/arch-ia64.h	Sun May 14 09:16:21 2006 -0600
     9.2 +++ b/xen/include/public/arch-ia64.h	Mon May 15 10:53:23 2006 -0600
     9.3 @@ -293,8 +293,6 @@ typedef struct {
     9.4  } mapped_regs_t;
     9.5  
     9.6  typedef struct {
     9.7 -    mapped_regs_t *privregs;
     9.8 -    int evtchn_vector;
     9.9  } arch_vcpu_info_t;
    9.10  
    9.11  typedef mapped_regs_t vpd_t;
    9.12 @@ -302,6 +300,9 @@ typedef mapped_regs_t vpd_t;
    9.13  typedef struct {
    9.14      unsigned int flags;
    9.15      unsigned long start_info_pfn;
    9.16 +
    9.17 +    /* Interrupt vector for event channel.  */
    9.18 +    int evtchn_vector;
    9.19  } arch_shared_info_t;
    9.20  
    9.21  typedef struct {
    9.22 @@ -321,7 +322,7 @@ typedef struct vcpu_guest_context {
    9.23      unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
    9.24  
    9.25      cpu_user_regs_t regs;
    9.26 -    arch_vcpu_info_t vcpu;
    9.27 +    mapped_regs_t *privregs;
    9.28      arch_shared_info_t shared;
    9.29      arch_initrd_info_t initrd;
    9.30      char cmdline[IA64_COMMAND_LINE_SIZE];