[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 2/2] xen/arm: support irq delivery to vcpu > 0
Hi Stefano, You removed the bits to make ITARGET read-only. Why? With this patch series, Xen doesn't validate ITARGET and a malicious guest could crash Xen... On 06/04/2014 03:35 PM, Stefano Stabellini wrote: > Export vgic_get_target_vcpu. > Use vgic_get_target_vcpu to retrieve the target vcpu from do_IRQ. > Route guest irqs to vcpu0 initially. > Remove in-code comments about missing implementation of SGI delivery to > vcpus other than 0. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > --- > xen/arch/arm/gic.c | 3 +-- > xen/arch/arm/irq.c | 7 +++---- > xen/arch/arm/vgic.c | 2 +- > xen/include/asm-arm/gic.h | 2 ++ > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > index 08ae23b..125ff36 100644 > --- a/xen/arch/arm/gic.c > +++ b/xen/arch/arm/gic.c > @@ -287,8 +287,7 @@ void gic_route_irq_to_guest(struct domain *d, struct > irq_desc *desc, > gic_set_irq_properties(desc->irq, level, cpumask_of(smp_processor_id()), > GIC_PRI_IRQ); > > - /* TODO: do not assume delivery to vcpu0 */ > - p = irq_to_pending(d->vcpu[0], desc->irq); > + p = irq_to_pending(d->vcpu[cpumask_first(cpu_mask)], desc->irq); Hrmmm... you misused the mask here. cpumask contains a list a physical CPU not Virtual CPU... [..] > @@ -342,8 +341,8 @@ int route_dt_irq_to_guest(struct domain *d, const struct > dt_irq *irq, > goto out; > > level = dt_irq_is_level_triggered(irq); > - gic_route_irq_to_guest(d, desc, level, cpumask_of(smp_processor_id()), > - GIC_PRI_IRQ); > + /* route to vcpu0 initially */ > + gic_route_irq_to_guest(d, desc, level, cpumask_of(0), GIC_PRI_IRQ); That makes the comment here wrong. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |