Message ID | 20210807073821.192901-1-clg@kaod.org |
---|---|
State | Accepted |
Headers | show |
Series | [1/3] xive/p10: Fix xive_special_cache_check when DEBUG=1 | expand |
On 8/7/21 1:08 PM, Cédric Le Goater wrote: > The special cache check done when skiboot is compiled with DEBUG is > incompatible with Automatic Context Save and Restore. > > Random data is written in the NVP to check that cache updates are > correct but this can lead to a checkstop raised by the XIVE interrupt > controller. When the NVP Valid (0) bit, the hardware controlled H (7) > bit, and the Checked Out bit (45) are all ones at the same time, the > HW thinks that the NVP entry is checked out by a thread and does not > allow the cache write to occur. > > Make sure that the valid bit is not set on the NVP. > > Signed-off-by: Cédric Le Goater <clg@kaod.org> Thanks! Merged series to master as of cd12ea6d. -Vasant
diff --git a/hw/xive2.c b/hw/xive2.c index d5814bcbfd0c..c09dd555f4ef 100644 --- a/hw/xive2.c +++ b/hw/xive2.c @@ -25,7 +25,6 @@ /* Verbose debug */ #undef XIVE_VERBOSE_DEBUG -#undef DEBUG /* Extra debug options used in debug builds */ #ifdef DEBUG @@ -2938,6 +2937,7 @@ static void xive_special_cache_check(struct xive *x, uint32_t blk, uint32_t idx) struct xive_nvp *vp_m = xive_get_vp(x, idx); memset(vp_m, (~i) & 0xff, sizeof(*vp_m)); + vp_m->w0 = xive_set_field32(NVP_W0_VALID, vp_m->w0, 0); sync(); vp.w1 = (i << 16) | i; assert(!xive_nxc_cache_update(x, blk, idx, &vp, true));
The special cache check done when skiboot is compiled with DEBUG is incompatible with Automatic Context Save and Restore. Random data is written in the NVP to check that cache updates are correct but this can lead to a checkstop raised by the XIVE interrupt controller. When the NVP Valid (0) bit, the hardware controlled H (7) bit, and the Checked Out bit (45) are all ones at the same time, the HW thinks that the NVP entry is checked out by a thread and does not allow the cache write to occur. Make sure that the valid bit is not set on the NVP. Signed-off-by: Cédric Le Goater <clg@kaod.org> --- hw/xive2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)