[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: trap guest WFI



On Thu, 2013-04-18 at 19:49 +0100, Stefano Stabellini wrote:
>  static inline void local_event_delivery_enable(void)
>  {
> -    /* TODO current->vcpu_info->evtchn_upcall_mask = 0; */
> +    current->vcpu_info->evtchn_upcall_mask = 0;

Did you miss my comments re the meaninglessness of evtchn_upcall_mask on
ARM?

Nothing in the guest ever sets this bit and nothing pays it any
attention on the actual interrupt/evtchn delivery path either, so
looking at it in the "are events pending" path doesn't make sense.

Look at 
$ rgrep evtchn_upcall_mask xen/arch/arm/ xen/include/asm-arm/
and all you will see is false positives like the above commented out
code. The only generic user is the dump_domains() debugkey output (which
is therefore wrong on ARM).

This logic needs to be based around looking at the I bit in the CPSR. To
avoid this confusion reoccuring perhaps we should #define
HAVE_PV_INTERRUPT_MASK and use it to turn this field in vcpu_info into a
padding field?

Ian.

>  }
>  
>  /* No arch specific virq definition now. Default to global. */
> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
> index 24c0d5c..92711d5 100644
> --- a/xen/include/asm-arm/gic.h
> +++ b/xen/include/asm-arm/gic.h
> @@ -143,6 +143,7 @@ extern void gic_route_ppis(void);
>  extern void gic_route_spis(void);
>  
>  extern void gic_inject(void);
> +extern int gic_events_need_delivery(void);
>  
>  extern void __cpuinit init_maintenance_interrupt(void);
>  extern void gic_set_guest_irq(struct vcpu *v, unsigned int irq,



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.