http://libre-riscv.org/shakti/m_class/EINT/
see: https://groups.google.com/a/groups.riscv.org/d/msg/hw-dev/EimCdsKMFOo/E28VwmAeCAAJ Dear Palmer, I appreciate your pragmatic decision to adopt the specification of the SiFive PLIC as a working model of how things should be done. However at Cambridge and ETHZ we recently observed a problem with the PLIC claim mechanism if the idempotency PMA is not implemented. Since I assume the latter is an optional and perhaps rather complicated feature, we were wondering whether it would be possible to support an optional specification to the PLIC to use a write operation to claim an interrupt instead of a read. The bug arises because, to maximise performance, speculative load instructions are initiated at the beginning of the pipeline, this will have the effect of claiming the interrupt whether or not that instruction reaches the commit stage. As you know in Linux this claim routine happens with interrupts off but there is always the possibility of a machine mode interrupt or other event causing a pipeline flush. Another option would be to force the PLIC to support atomic reads. I appreciate backward compatibility is an issue and there could be sound architectural reasons why your group chose to do it this way. Regards, Jonathan Kimmitt