local_irq_enable(); <- Problem starts here
preempt_enable(); <- Becomes wider here
It doesn't become that much wider because there's always preempt
notifiers. So if it's okay to save XFD in the XSAVES wrapper and in
kvm_arch_vcpu_put(), that might be already remove the need to do it
schedule().
Did not think about preemption notifiers. Probably because I hate
notifiers with a passion since I had to deal with the CPU hotplug
notifier trainwreck.
But yes that would work. So the places to do that would be:
1) kvm_sched_out() -> kvm_arch_vcpu_put() > 2) kernel_fpu_begin_mask()
3) kvm_put_guest_fpu()
I'd be really surprised if that RDMSR is truly noticeable within all the
other crud this path is doing.