KVM: VMX: Load/save guest CR2 via C code in __vmx_vcpu_run()
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 25 Jan 2019 15:41:03 +0000 (07:41 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Feb 2019 12:12:23 +0000 (13:12 +0100)
commit47e97c099bbcb3211b22456679991095c0578da2
tree554332f189cc233cf4dadef626b416f7ec7850fe
parent5a8781607e677eda60b20e0a4c91d2a5f12f9244
KVM: VMX: Load/save guest CR2 via C code in __vmx_vcpu_run()

...to eliminate its parameter and struct vcpu_vmx offset definition
from the assembly blob.  Accessing CR2 from C versus assembly doesn't
change the likelihood of taking a page fault (and modifying CR2) while
it's loaded with the guest's value, so long as we don't do anything
silly between accessing CR2 and VM-Enter/VM-Exit.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c