mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 03:03:58 +08:00
KVM: SVM: remove unnecessary is_nested check from svm_cpu_run
This check is not necessary. We have to sync the vcpu->arch.cr2 always back to the VMCB. This patch remove the is_nested check. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
410e4d573d
commit
cda0ffdd86
@ -2602,8 +2602,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
|
|||||||
fs_selector = kvm_read_fs();
|
fs_selector = kvm_read_fs();
|
||||||
gs_selector = kvm_read_gs();
|
gs_selector = kvm_read_gs();
|
||||||
ldt_selector = kvm_read_ldt();
|
ldt_selector = kvm_read_ldt();
|
||||||
if (!is_nested(svm))
|
svm->vmcb->save.cr2 = vcpu->arch.cr2;
|
||||||
svm->vmcb->save.cr2 = vcpu->arch.cr2;
|
|
||||||
/* required for live migration with NPT */
|
/* required for live migration with NPT */
|
||||||
if (npt_enabled)
|
if (npt_enabled)
|
||||||
svm->vmcb->save.cr3 = vcpu->arch.cr3;
|
svm->vmcb->save.cr3 = vcpu->arch.cr3;
|
||||||
|
Loading…
Reference in New Issue
Block a user