You just need a set of magic register values, like how CPUID [0] instruction already works.
[0]: https://github.com/RUB-SysSec/Microcode/tree/master/updates
[1]: http://syssec.rub.de/research/publications/microcode-reversi...
https://hackaday.com/2017/04/25/an-analog-charge-pump-fabric...
I suspect that really keeping it out of view would also cost both silicon and propagation delays in what would probably be some of the most critical paths, but then I'm not a vlsi engineer, or whatever the correct title would be :)
Given this, I suspect wiring in a path all the way from the relevant versions of the relevant registers might be quite expensive. Plus part of the decode logic now needs to block on a register value - so a timing based attack might find these.
More qualified comments welcome...
I mean if you worked for Intel and your manager said "make me a really secret instruction" would your best response be "lets just not document it and hopes noone notices"?
What I would give to read the full microcode of the latest Intel processor. I am guessing it is stored in a vault with the real nuclear codes, Alien cadavers and the Holy Grail.