In risc-v official doc 'Unprivileged Specification version 20191213', p31 says:
The FENCE.I instruction was designed to support a wide variety of implementations. A sim- ple implementation can flush the local instruction cache and the instruction pipeline when the FENCE.I is executed. A more complex implementation might snoop the instruction (data) cache on every data (instruction) cache miss
It seems to mean that data cache miss will search instruction cache (normally L1I cache). It seems to be conflict with instruction cache designed function although in general instruction and data are all binary data.
Then I found this Arm blog, it make sense of the situation that we snoop the data cache on instruction cache miss in JIT because the instruction are modified and corresponding instruction cache is invalidated.
Q1: Is there other conditions that we should snoop the data cache on the instruction cache miss?
I also found this Q&A comment. In modern CISC cpu (Although risc-v is MISC. Here CISC is said in this lwn article), L1I cache is indeed the trace cache (i.e. micro-op cache). So I guess maybe decoded micro-op has useful data which can be used in resolving data cache miss.
Q2: Is my guess right? Also, is there other conditions that we should snoop the instruction cache on the data cache miss?