pnv/xive2: XIVE2 Cache Watch, Cache Flush and Sync Injection support
authorFrederic Barrat <fbarrat@linux.ibm.com>
Wed, 24 Jul 2024 21:21:20 +0000 (16:21 -0500)
committerNicholas Piggin <npiggin@gmail.com>
Thu, 25 Jul 2024 23:21:06 +0000 (09:21 +1000)
commit8c01b2e1f7e34e6444abb59a544a52192393e798
treec0df4dca9c52b50c501204cf2e96f1d722b34e3e
parent533074918727c5fafb11a033fcccaac11ee0227b
pnv/xive2: XIVE2 Cache Watch, Cache Flush and Sync Injection support

XIVE offers a 'cache watch facility', which allows software to read/update
a potentially cached table entry with no software lock. There's one such
facility in the Virtualization Controller (VC) to update the ESB and END
entries and one in the Presentation Controller (PC) to update the
NVP/NVG/NVC entries.

Each facility has 4 cache watch engines to control the updates and
firmware can request an available engine by querying the hardware
'watch_assign' register of the VC or PC. The engine is then reserved and
is released after the data is updated by reading the 'watch_spec' register
(which also allows to check for a conflict during the update).
If no engine is available, the special value 0xFF is returned and
firmware is expected to repeat the request until an engine becomes
available.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Kowal <kowal@linux.vnet.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
hw/intc/pnv_xive2.c
hw/intc/pnv_xive2_regs.h