KVM: x86/mmu: rephrase unclear comment
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 12:30:40 +0000 (07:30 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:18 +0000 (12:49 -0400)
If accessed bits are not supported there simple isn't any distinction
between accessed and non-accessed gPTEs, so the comment does not make
much sense.  Rephrase it in terms of what happens if accessed bits
*are* supported.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/paging_tmpl.h

index 7d4377f..07a7832 100644 (file)
@@ -151,7 +151,7 @@ static bool FNAME(prefetch_invalid_gpte)(struct kvm_vcpu *vcpu,
        if (!FNAME(is_present_gpte)(gpte))
                goto no_present;
 
-       /* if accessed bit is not supported prefetch non accessed gpte */
+       /* Prefetch only accessed entries (unless A/D bits are disabled). */
        if (PT_HAVE_ACCESSED_DIRTY(vcpu->arch.mmu) &&
            !(gpte & PT_GUEST_ACCESSED_MASK))
                goto no_present;