]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Delay restoration of host MSR_TSC_AUX until return to userspace
authorSean Christopherson <seanjc@google.com>
Fri, 23 Apr 2021 22:34:04 +0000 (15:34 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Apr 2021 09:26:13 +0000 (05:26 -0400)
commit75a460b7b0efab2941b00443fb0276ebc685b9bc
treee4244ad1b8062b3d21afd2337582a3618f54ac3b
parent72e90882c1a9bd8cc0f3ff26f667e575a3a27190
KVM: SVM: Delay restoration of host MSR_TSC_AUX until return to userspace

Use KVM's "user return MSRs" framework to defer restoring the host's
MSR_TSC_AUX until the CPU returns to userspace.  Add/improve comments to
clarify why MSR_TSC_AUX is intercepted on both RDMSR and WRMSR, and why
it's safe for KVM to keep the guest's value loaded even if KVM is
scheduled out.

Cc: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210423223404.3860547-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h