Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df4f3108 authored by Andre Przywara's avatar Andre Przywara Committed by Avi Kivity
Browse files

KVM: SVM: implement enhanced INVLPG intercept



When the DecodeAssist feature is available, the linear address
is provided in the VMCB on INVLPG intercepts. Use it directly to
avoid any decoding and emulation.
This is only useful for shadow paging, though.

Signed-off-by: default avatarAndre Przywara <andre.przywara@amd.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent cae3797a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2652,7 +2652,12 @@ static int iret_interception(struct vcpu_svm *svm)

static int invlpg_interception(struct vcpu_svm *svm)
{
	if (!static_cpu_has(X86_FEATURE_DECODEASSISTS))
		return emulate_instruction(&svm->vcpu, 0) == EMULATE_DONE;

	kvm_mmu_invlpg(&svm->vcpu, svm->vmcb->control.exit_info_1);
	skip_emulated_instruction(&svm->vcpu);
	return 1;
}

static int emulate_on_interception(struct vcpu_svm *svm)