Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/tdx: Use direct paravirt call for wrmsrl
TDX normally handles MSR writes using the #VE exception, or directly for some special MSRs. But there is at least one performance critical MSR which triggers #VE, which is the TSC deadline MSR. It gets reprogrammed every timer interrupt, and also every idle exit. There are noticeable slow downs by relying on #VE for this, since a #VE requires at least 3 exits to the TDX module, which adds up in overhead. Use a direct paravirt call for MSR writes. This will only be used for wrmsrl(), some of the other MSR write paths still use #VE (but these don't seem to be performance critical, so it shouldn't matter) Also remove the redundant check for being a context switched MSR because this is already checked on this path, and shouldn't really happen anyways. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
- Loading branch information