On Aug 12, 2019, at 7:54 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
Seems like pic_hwmask only needs to be called when is_mask_count==0.
Yes, good catch. I also noticed a few other places where I should be checking is_mask_count before calling pic_hwunmask, and also realized that I needed to add some code to handle the set_affinity flow ... it's complicated by the fact that an intr_mask()'d interrupt will always be "pending", so some care is needed. Specifically, before waiting for "pending" to drain out, I now mark the interrupt sources as "distribution-pending" ... so when intr_unmask() comes along, it won't re-enable the source at the hardware if it sees that, but will still force processing of the source if it was marked as interrupt-pending.
Ok, I've made some tweaks -- I still need to do some more testing, but I think the basic x86 version of the changes is basically ready. Updated diff attached.
Note that XENINTRSTUB will also need the same changes.
Thanks, I'll take a look at those, too.
So, I took a look at this, and I'm not entirely sure what can / should be done with them. They seem only superficially related to the regular interrupt stubs. They don't seem to have any notion of "pending". Can someone explain to me how these work?
-- thorpej