OSDN Git Service

KVM: VMX: Save HOST_CR3 in vmx_prepare_switch_to_guest()
authorLai Jiangshan <laijs@linux.alibaba.com>
Thu, 18 Nov 2021 11:08:03 +0000 (19:08 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:25:06 +0000 (04:25 -0500)
commit15ad9762d69fd8e40a4a51828c1d6b0c1b8fbea0
treebedb6c5f7e79779e68054a8d0425d183a67ccc07
parent3ab4ac877cfabd209d12cbd6af0aa02077bb778d
KVM: VMX: Save HOST_CR3 in vmx_prepare_switch_to_guest()

The host CR3 in the vcpu thread can only be changed when scheduling.
Moving the code in vmx_prepare_switch_to_guest() makes the code
simpler.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20211118110814.2568-5-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c