Skip to content

Commit 91ca767

Browse files
Lai Jiangshansean-jc
authored andcommitted
kvm: x86/mmu: Remove @no_dirty_log from FNAME(prefetch_gpte)
FNAME(prefetch_gpte) is always called with @no_dirty_log=true. Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com> Link: https://lore.kernel.org/r/20230216235321.735214-4-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 9fd4a4e commit 91ca767

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/x86/kvm/mmu/paging_tmpl.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
519519

520520
static bool
521521
FNAME(prefetch_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
522-
u64 *spte, pt_element_t gpte, bool no_dirty_log)
522+
u64 *spte, pt_element_t gpte)
523523
{
524524
struct kvm_memory_slot *slot;
525525
unsigned pte_access;
@@ -535,8 +535,7 @@ FNAME(prefetch_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
535535
pte_access = sp->role.access & FNAME(gpte_access)(gpte);
536536
FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte);
537537

538-
slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn,
539-
no_dirty_log && (pte_access & ACC_WRITE_MASK));
538+
slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, pte_access & ACC_WRITE_MASK);
540539
if (!slot)
541540
return false;
542541

@@ -605,7 +604,7 @@ static void FNAME(pte_prefetch)(struct kvm_vcpu *vcpu, struct guest_walker *gw,
605604
if (is_shadow_present_pte(*spte))
606605
continue;
607606

608-
if (!FNAME(prefetch_gpte)(vcpu, sp, spte, gptep[i], true))
607+
if (!FNAME(prefetch_gpte)(vcpu, sp, spte, gptep[i]))
609608
break;
610609
}
611610
}

0 commit comments

Comments
 (0)