bao-project / bao-hypervisor

Bao, a Lightweight Static Partitioning Hypervisor
Apache License 2.0
379 stars 128 forks source link

fix(armv8/vgic): fix comparison on pend_found #164

Closed Clara-Huang closed 2 months ago

Clara-Huang commented 3 months ago

If a suitable pending interrupt is found, it should be replaced rather than checking if pend_found is greater than 1. Thus, I have changed > 1 to >= 1. If my understanding is incorrect, I will close this PR. Thank you for your review!

josecm commented 3 months ago

I'm not sure this fix is correct. The logic here is that if we found more than one pending interrupt in the list registers, we can replace one of them because, as suggested by the GIC spec, if there are any pending interrupts, at least one pending interrupt should be in the list. Do you agree @Clara-Huang @DavidMCerdeira ?

josecm commented 2 months ago

@Clara-Huang I'm closing this for now, unless there is any new arguments that can convince me my rationale is wrong.