qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/6] xics: add flags for interrupts


From: Mike Day
Subject: Re: [Qemu-devel] [PATCH 1/6] xics: add flags for interrupts
Date: Wed, 07 May 2014 09:09:06 -0400
User-agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-redhat-linux-gnu)

>  
>      for (i = 0; i < ics->nr_irqs; i++) {
>          /* FIXME: filter by server#? */
> -        if (ics->islsi[i]) {
> +        if (ics->irqs[i].flags & XICS_FLAGS_LSI) {
>              resend_lsi(ics, i);

Not part of your patch, but I'm curious about this FIXME (there's an
identical FIXME in resend_msi). Has this proved to be a problem? With
these patches you could have many unallocated interrupts in array AFTER
the last allocated interrupt, correct? In that case, the loop would
continue beyond the last allocated interrupt for no purpose.  There are
a couple ways to mitigate this type of situation by using alternative
data structures to inform the loop traversal. I don't know if it is
worth the effort, though.


> +/* @flags == 0 measn the interrupt is not allocated */
> +#define XICS_FLAGS_LSI                 0x1
> +#define XICS_FLAGS_MSI                 0x2

(nit) typo in the above comment

Mike

-- 
Mike Day | "Endurance is a Virtue"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]