> since it depends more on the actual device behavior than the behavior documented in the datasheet.
That doesn't sound true at all tbh. I would imagine a huge amount of code is just generalized data structures and algorithms. I doubt many CVEs (<1%) rely on an accurate model of the underlying hardware.
Spectre and meltdown can be seen as caused by the underlying hardware. But those are in that rare 1% bucket and I doubt a more accurate model used by unit testing would have stopped these anyway.