On Mon, Dec 5, 2016 at 3:50 PM, Julien Grall <julien.gr...@arm.com> wrote:
> Hi Oleksandr, Hi Julien > > > On 02/12/16 16:38, Oleksandr Tyshchenko wrote: > >> Call irq_get_domain for the IRQ we are interested in >> only after making sure that it is the guest IRQ to avoid >> ASSERT(test_bit(_IRQ_GUEST, &desc->status)) triggering. >> >> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com> >> Signed-off-by: Andrii Anisov <andrii_ani...@epam.com> >> --- >> xen/arch/arm/irq.c | 32 +++++++++++++++++++------------- >> 1 file changed, 19 insertions(+), 13 deletions(-) >> >> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c >> index 06d4843..508028b 100644 >> --- a/xen/arch/arm/irq.c >> +++ b/xen/arch/arm/irq.c >> @@ -477,26 +477,32 @@ int route_irq_to_guest(struct domain *d, unsigned >> int virq, >> */ >> if ( desc->action != NULL ) >> { >> - struct domain *ad = irq_get_domain(desc); >> - >> - if ( test_bit(_IRQ_GUEST, &desc->status) && d == ad ) >> + if ( test_bit(_IRQ_GUEST, &desc->status) ) >> { >> - if ( irq_get_guest_info(desc)->virq != virq ) >> + struct domain *ad = irq_get_domain(desc); >> + >> + if ( d == ad ) >> + { >> + if ( irq_get_guest_info(desc)->virq != virq ) >> > > I know that Stefano already reviewed and queued this patch. But 4 layer of > if seems a bit too much and could have been avoided by re-ordering the > check. > > if ( d != ad ) > .... > else if ( irq_get_guest_info(desc->virq != virq) ) > .... > > Can you please send a follow-up to remove one layer of 1? > Sure > > Regards, > > -- > Julien Grall >
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel