KVM: x86/mmu: Add comment on try_cmpxchg64 usage in tdp_mmu_set_spte_atomic
authorUros Bizjak <ubizjak@gmail.com>
Tue, 25 Apr 2023 11:39:32 +0000 (13:39 +0200)
committerSean Christopherson <seanjc@google.com>
Fri, 26 May 2023 18:24:52 +0000 (11:24 -0700)
commit12ced095956a517dc0c8c8f9264e29fd67124302
tree4d69035b8f68b754ac9092ad5a5a270e405fb897
parentb9846a698c9aff4eb2214a06ac83638ad098f33f
KVM: x86/mmu: Add comment on try_cmpxchg64 usage in tdp_mmu_set_spte_atomic

Commit aee98a6838d5 ("KVM: x86/mmu: Use try_cmpxchg64 in
tdp_mmu_set_spte_atomic") removed the comment that iter->old_spte is
updated when different logical CPU modifies the page table entry.
Although this is what try_cmpxchg does implicitly, it won't hurt
if this fact is explicitly mentioned in a restored comment.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: David Matlack <dmatlack@google.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20230425113932.3148-1-ubizjak@gmail.com
[sean: extend comment above try_cmpxchg64()]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/tdp_mmu.c