On 13 May 2016 at 16:24, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 13 May 2016 at 16:05, Shannon Zhao <shannon.z...@linaro.org> wrote:
>> So I think it shouldn't call gicv3_update if attrs.secure is true and
>> irq < 32. And it should check the parameter irq in gicv3_update().
>
> If irq < 32 then gicd_write_ipriority() will return without
> doing anything. We'll unnecessarily call gicv3_update(), but that
> does no harm, and I don't think being slightly inefficient for
> an access a correctly functioning guest will never make is a big problem.

Thinking about this again over the weekend I realised you're right,
because gicv3_update() doesn't handle out-of-range irq numbers.
I need to either make gicv3_update() return doing nothing for
out of range IRQs or ensure we don't call it in that case (and
add an assert just in case).

thanks
-- PMM

Reply via email to