Commit d7ad41a3 authored by Jia Qingtong's avatar Jia Qingtong Committed by Huacai Chen
Browse files

LoongArch: KVM: always make pte young in page map's fast path



It seems redundant to check if pte is young before the call to
kvm_pte_mkyoung() in kvm_map_page_fast(). Just remove the check.

Reviewed-by: default avatarBibo Mao <maobibo@loongson.cn>
Signed-off-by: default avatarJia Qingtong <jiaqingtong97@gmail.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent ebf00272
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -569,9 +569,7 @@ static int kvm_map_page_fast(struct kvm_vcpu *vcpu, unsigned long gpa, bool writ
	}

	/* Track access to pages marked old */
	new = *ptep;
	if (!kvm_pte_young(new))
		new = kvm_pte_mkyoung(new);
	new = kvm_pte_mkyoung(*ptep);
	/* call kvm_set_pfn_accessed() after unlock */

	if (write && !kvm_pte_dirty(new)) {