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

Re: [Xen-devel] [PATCH v5 6/6] xen/arm: physical irq follow virtual irq



On Wed, 18 Jun 2014, Ian Campbell wrote:
> On Wed, 2014-06-11 at 17:27 +0100, Stefano Stabellini wrote:
> > +struct vcpu *vgic_get_target_vcpu(struct vcpu *v, unsigned int irq)
> > +{
> > +    struct vcpu *v_target;
> > +    struct vgic_irq_rank *rank = vgic_rank_irq(v, irq);
> > +
> > +    vgic_lock_rank(v, rank);
> > +    v_target = _vgic_get_target_vcpu(v, irq);
> > +    vgic_unlock_rank(v, rank);
> > +    return v_target;
> > +}
> 
> Looks like you just moved this? Did it also change? Please can you
> either introduce it in the right place in earlier patch or leave it
> where it is in this one.

Strange, this chuck shouldn't be here at all.


> > @@ -678,6 +706,8 @@ static int vgic_distr_mmio_write(struct vcpu *v, 
> > mmio_info_t *info)
> >                  v_target = v->domain->vcpu[target];
> >                  v_old = v->domain->vcpu[old_target];
> >                  vgic_migrate_irq(v_old, v_target, irq);
> > +                p = irq_to_pending(v_target, irq);
> > +                irq_set_affinity(p->desc, cpumask_of(v_target->processor));
> 
> I think vgic_migrate_irq should take care of this stuff too. Any reson
> not to?

This covers a different case: if the guest moves an irq from vcpu0 to
vcpu1, we want to also move the corresponding physical irq from the pcpu
that is running vcpu0 to the pcpu that is running vcpu1.


> > diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
> > index 6853842..383057c 100644
> > --- a/xen/common/event_channel.c
> > +++ b/xen/common/event_channel.c
> > @@ -1319,6 +1319,8 @@ void evtchn_move_pirqs(struct vcpu *v)
> >      unsigned int port;
> >      struct evtchn *chn;
> >  
> > +    arch_move_irqs(v);
> 
> It seems odd to do this from event_channel.c
> 
> I suggest adding sched_move_irqs to scheduler.c and having it call
> evtchn_move_pirqs and arch_move_irqs and then replace all the existing
> calls to evtchn_move_pirqs with it.
 
I am OK with that.

_______________________________________________
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®.