Open ricardon opened 2 days ago
Items to consider: tenraja29 referred to the new RDMSRLIST/WRMSRLIST instruction for optimization https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
yjiang5 looked into the handling of MSR_LSTAR/MSR_STAR for potential optimization. This work is along the lines of https://lore.kernel.org/all/1253105134-8862-1-git-send-email-avi@redhat.com/. This optimization considers various scenarios for context switch that can make register-saving lazier.
Today, we save/restore many registers in what may be more conservative than required. It would be good to see if some registers (like the syscall MSRs) could only be save restored as necessary depending on the state of the guest. KVM has some optimizations around this path that perhaps we could follow. (migrated from https://github.com/microsoft/HvLite/issues/433)