If you want this to be used by more callsites, it probably doesn't make
sense to have it print out a message each time.
In fact would it make more sense to have a framework (cpu feature flag?)
to detect that we're in any virtualized environment and make this one of
the detection routines, and perhaps cache the result. Especially if this
detection would be used to manage anything near a hot-path in the page
cache as you suggested.
But maybe that's overkill.
--