mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
cae3797a46
commit
df4f310856
1 changed files with 6 additions and 1 deletions
|
@ -2652,7 +2652,12 @@ static int iret_interception(struct vcpu_svm *svm)
|
|||
|
||||
static int invlpg_interception(struct vcpu_svm *svm)
|
||||
{
|
||||
return emulate_instruction(&svm->vcpu, 0) == EMULATE_DONE;
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue