On 18/08/2016 19:24, Linus Torvalds wrote: >> > I didn't do CPL0 tests yet. Realized that cli/sti can be tested in >> > userspace >> > if we set iopl(3) first. > Yes, but it might not be the same. So the timings could be very > different from a cpl0 case.
FWIW I recently measured around 20 cycles for a popf as well on Haswell-EP and CPL=0 (that was for commit f2485b3e0c6c, "KVM: x86: use guest_exit_irqoff", 2016-07-01). Paolo