Cavitation erosion mainly impacts cylinder liners, but can also show up in water cooled manifolds and turbo housings, in cylinder heads, and other areas in an engine of relatively high surface temperatures and low coolant flow rates. Here is a nice summary from Cummins,
The pitting in your picture looks more like a corrosive attack, I'm assuming this is an exhaust port based on the color of the deposits, correct? Although I have seen corrosive pitting and erosion on large turbocharged engines in high ambient humidity environments in the inlet valve pockets as well.
Could be the result of high sulpher and/or vanadium if this engine is using HFO or a heavy marine diesel oil, could be due to extended run times at lower loads, a shared exhaust system as mentioned above, or several other factors. Had one a few years ago that had a pin hole leak in the liner wall that only allowed coolant to leak when the engine was at a higher temp and load, the indication was a low cylinder temp, and when we pulled the head, both exhaust valve pockets had similar erosion, pulled another head and its exhaust pockets didn't show the erosion, so we looked harder, finally found the problem.
If this is affecting all cylinders as you said, likely fuel or air system related, could be a possible leak if engine equipped with a charge air cooler.
Hope that helps, MikeL.