qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH qemu.git v2 3/9] hw/timer/imx_epit: simplify interrupt logic


From: Axel Heider
Subject: Re: [PATCH qemu.git v2 3/9] hw/timer/imx_epit: simplify interrupt logic
Date: Mon, 21 Nov 2022 18:35:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2



Having an "update interrupt" function is the more common
convention in QEMU device models -- it means you have one
function you can call from any point where you've updated
any of the state that affects whether an interrupt is generated or not.

Ok, will keept it.

For instance there's currently I think a bug where when the
guest writes to the CR register and changes the value of
the CR_OCIEN bit we aren't updating the state of the IRQ line.
If you keep the imx_epit_update_int() function then fixing
that bug is fairly straightforward: you just need to call it
in the appropriate place. Without the function then the
logic of "what is the IRQ line state given the current
device register state" ends up dispersed across the device
model code and potentially duplicated.

That bug is fixed for the next iteration of this patch set.

Axel



reply via email to

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