[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/13] hw/intc/arm_gicv3_its: more cleanups, bugfixes
From: |
Peter Maydell |
Subject: |
[PATCH 00/13] hw/intc/arm_gicv3_its: more cleanups, bugfixes |
Date: |
Tue, 1 Feb 2022 19:31:54 +0000 |
This is another set of patches to the ITS emulation; mostly
cleanups, but there are two bug fixes.
Cleanups:
(1) Switch away from reading command packets by multiple separate
calls to address_space_ldq_le(), and instead use
address_space_map()/unmap() to get all 4 doublewords in the command
packet at once in the top level queue-processing loop. This gets all
the handling of loading words out of the individual command-handling
functions and makes them a lot easier to read IMHO. Plus it reduces
the number of lines of code by about a hundred.
(2) Unify all of the get_foo()/update_foo() functions that we use
for reading and writing the various in-guest-memory tables so that
they use a single style of API rather than being confusingly
different about how they indicate failure and how they return
the interesting fields from the table entries.
(3) A handful of less exciting minor tweaks.
Bugfixes:
(1) We were mis-calculating the address to use for the
last 4 bytes in an interrupt table entry, so they overwrote
the middle 4 bytes... The fix for this one is slightly
awkward because we need to handle migration from guests which
have in-memory tables written using the buggy code.
(2) We shouldn't validity-check rdbase in MAPC with V=0
(3) MAPI/MAPTI with intid 1023 should be rejected
thanks
-- PMM
Peter Maydell (13):
hw/intc/arm_gicv3_its: Use address_space_map() to access command queue
packets
hw/intc/arm_gicv3_its: Keep DTEs as a struct, not a raw uint64_t
hw/intc/arm_gicv3_its: Pass DTEntry to update_dte()
hw/intc/arm_gicv3_its: Keep CTEs as a struct, not a raw uint64_t
hw/intc/arm_gicv3_its: Pass CTEntry to update_cte()
hw/intc/arm_gicv3_its: Fix address calculation in get_ite() and
update_ite()
hw/intc/arm_gicv3_its: Avoid nested ifs in get_ite()
hw/intc/arm_gicv3_its: Pass ITE values back from get_ite() via a
struct
hw/intc/arm_gicv3_its: Make update_ite() use ITEntry
hw/intc/arm_gicv3_its: Drop TableDesc and CmdQDesc valid fields
hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field
hw/intc/arm_gicv3_its: Don't allow intid 1023 in MAPI/MAPTI
hw/intc/arm_gicv3_its: Split error checks
hw/intc/gicv3_internal.h | 23 +-
include/hw/intc/arm_gicv3_its_common.h | 2 -
hw/intc/arm_gicv3_its.c | 696 +++++++++++--------------
3 files changed, 328 insertions(+), 393 deletions(-)
--
2.25.1
- [PATCH 00/13] hw/intc/arm_gicv3_its: more cleanups, bugfixes,
Peter Maydell <=
- [PATCH 02/13] hw/intc/arm_gicv3_its: Keep DTEs as a struct, not a raw uint64_t, Peter Maydell, 2022/02/01
- [PATCH 03/13] hw/intc/arm_gicv3_its: Pass DTEntry to update_dte(), Peter Maydell, 2022/02/01
- [PATCH 01/13] hw/intc/arm_gicv3_its: Use address_space_map() to access command queue packets, Peter Maydell, 2022/02/01
- [PATCH 05/13] hw/intc/arm_gicv3_its: Pass CTEntry to update_cte(), Peter Maydell, 2022/02/01
- [PATCH 04/13] hw/intc/arm_gicv3_its: Keep CTEs as a struct, not a raw uint64_t, Peter Maydell, 2022/02/01