Commit 9e90e215 authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini
Browse files

KVM: SVM: Don't bother writing vmcb->save.rip at vCPU RESET/INIT



Drop unnecessary initialization of vmcb->save.rip during vCPU RESET/INIT,
as svm_vcpu_run() unconditionally propagates VCPU_REGS_RIP to save.rip.

No true functional change intended.

Reviewed-by: default avatarReiji Watanabe <reijiw@google.com>
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-21-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 49d8665c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1253,8 +1253,7 @@ static void init_vmcb(struct kvm_vcpu *vcpu)
	svm_set_efer(vcpu, 0);
	save->dr6 = 0xffff0ff0;
	kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);
	save->rip = 0x0000fff0;
	vcpu->arch.regs[VCPU_REGS_RIP] = save->rip;
	vcpu->arch.regs[VCPU_REGS_RIP] = 0x0000fff0;

	/*
	 * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.