mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
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: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Jia Qingtong <jiaqingtong97@gmail.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
ebf00272da
commit
d7ad41a31d
@ -569,10 +569,8 @@ 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);
|
||||
/* call kvm_set_pfn_accessed() after unlock */
|
||||
new = kvm_pte_mkyoung(*ptep);
|
||||
/* call kvm_set_pfn_accessed() after unlock */
|
||||
|
||||
if (write && !kvm_pte_dirty(new)) {
|
||||
if (!kvm_pte_write(new)) {
|
||||
|
Loading…
Reference in New Issue
Block a user