The ITS spec says that ITS commands are only processed when the ITS
is enabled (section 8.19.4, Enabled, bit). Our emulation was not taking
this into account.
Fix this by checking the enabled state before handling CWRITER writes.
On the other hand that means that CWRITER could advance while the ITS
is disabled, and enabling it would need those commands to be processed.
Fix this case as well by refactoring actual command processing and
calling this from both the GITS_CWRITER and GITS_CTLR handlers.
Reviewed-by: Eric Auger <firstname.lastname@example.org>
Reviewed-by: Christoffer Dall <email@example.com>
Signed-off-by: Andre Przywara <firstname.lastname@example.org>
Signed-off-by: Marc Zyngier <email@example.com>