Hi Andre, On 09/06/17 18:41, Andre Przywara wrote:
@@ -478,8 +515,14 @@ static void gic_update_one_lr(struct vcpu *v, int i) gic_hw_ops->read_lr(i, &lr_val); irq = lr_val.virq; p = irq_to_pending(v, irq); - /* An LPI might have been unmapped, in which case we just clean up here. */ - if ( unlikely(!p) ) + /* + * An LPI might have been unmapped, in which case we just clean up here. + * If that LPI is marked as PRISTINE, the information in the LR is bogus, + * as it belongs to a previous, already unmapped LPI. So we discard it + * here as well. + */ + if ( unlikely(!p || + test_and_clear_bit(GIC_IRQ_GUEST_PRISTINE_LPI, &p->status)) )
NIT: !p and test_and_clear_bit should be aligned. By that I mean: unlikely(!p || test_and_clear_bit(....) With that: Acked-by: Julien Grall <julien.gr...@arm.com> Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel