pnv/xive2: Check TIMA special ops against a dedicated array for P10
commit177835304b39b6ed6a7c51fd19263ac10995dbec
authorFrederic Barrat <fbarrat@linux.ibm.com>
Thu, 22 Jun 2023 16:25:27 +0000 (22 18:25 +0200)
committerCédric Le Goater <clg@kaod.org>
Sun, 25 Jun 2023 20:41:30 +0000 (25 22:41 +0200)
tree5bb0c3744f90f81a6f126ce3b38a38140e41dd56
parent2a24e6e394c0badefd1c6b1ecf571f3663236300
pnv/xive2: Check TIMA special ops against a dedicated array for P10

Accessing the TIMA from some specific ring/offset combination can
trigger a special operation, with or without side effects. It is
implemented in qemu with an array of special operations to compare
accesses against. Since the presenter on P10 is pretty similar to P9,
we had the full array defined for P9 and we just had a special case
for P10 to treat one access differently. With a recent change,
6f2cbd133d4 ("pnv/xive2: Handle TIMA access through all ports"), we
now ignore some of the bits of the TIMA address, but that patch
managed to botch the detection of the special case for P10.

To clean that up, this patch introduces a full array of special ops to
be used for P10. The code to detect a special access is common with
P9, only the array of operations differs. The presenter can pick the
correct array of special ops based on its configuration introduced in
a previous patch.

Fixes: Coverity CID 15129971512998
Fixes: 6f2cbd133d4 ("pnv/xive2: Handle TIMA access through all ports")
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/intc/pnv_xive2.c
hw/intc/xive.c