1. Use FreeBSD system with hardware supporting sleep/resume and Intel CPU that lacks IBRS support out of box but has microcode update bringing IBRS in.
2. Install sysutils/cpupdate version g20180324_1 and enable it in /etc/rc.conf (cpupdate_enable="YES").
3. Make the system sleep/resume that clears loaded CPU microcode. WIth patch applied, rc.resume calls "service cpupdate resume" and microcode reloaded automatically.