Skip to content

Commit e03a7ca

Browse files
yanzhao56sean-jc
authored andcommitted
KVM: x86/mmu: Fixup comments missed by the REMOVED_SPTE=>FROZEN_SPTE rename
Replace "removed" with "frozen" in comments as appropriate to complete the rename of REMOVED_SPTE to FROZEN_SPTE. Fixes: 964cea8 ("KVM: x86/tdp_mmu: Rename REMOVED_SPTE to FROZEN_SPTE") Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://lore.kernel.org/r/20240712233438.518591-1-rick.p.edgecombe@intel.com [sean: write changelog] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 47ac09b commit e03a7ca

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/x86/kvm/mmu/spte.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ void kvm_mmu_set_mmio_spte_mask(u64 mmio_value, u64 mmio_mask, u64 access_mask)
391391
mmio_value = 0;
392392

393393
/*
394-
* The masked MMIO value must obviously match itself and a removed SPTE
395-
* must not get a false positive. Removed SPTEs and MMIO SPTEs should
396-
* never collide as MMIO must set some RWX bits, and removed SPTEs must
394+
* The masked MMIO value must obviously match itself and a frozen SPTE
395+
* must not get a false positive. Frozen SPTEs and MMIO SPTEs should
396+
* never collide as MMIO must set some RWX bits, and frozen SPTEs must
397397
* not set any RWX bits.
398398
*/
399399
if (WARN_ON((mmio_value & mmio_mask) != mmio_value) ||

arch/x86/kvm/mmu/spte.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ extern u64 __read_mostly shadow_nonpresent_or_rsvd_mask;
214214
*/
215215
#define FROZEN_SPTE (SHADOW_NONPRESENT_VALUE | 0x5a0ULL)
216216

217-
/* Removed SPTEs must not be misconstrued as shadow present PTEs. */
217+
/* Frozen SPTEs must not be misconstrued as shadow present PTEs. */
218218
static_assert(!(FROZEN_SPTE & SPTE_MMU_PRESENT_MASK));
219219

220220
static inline bool is_frozen_spte(u64 spte)

arch/x86/kvm/mmu/tdp_mmu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ static void handle_removed_pt(struct kvm *kvm, tdp_ptep_t pt, bool shared)
359359
/*
360360
* Set the SPTE to a nonpresent value that other
361361
* threads will not overwrite. If the SPTE was
362-
* already marked as removed then another thread
362+
* already marked as frozen then another thread
363363
* handling a page fault could overwrite it, so
364364
* set the SPTE until it is set from some other
365-
* value to the removed SPTE value.
365+
* value to the frozen SPTE value.
366366
*/
367367
for (;;) {
368368
old_spte = kvm_tdp_mmu_write_spte_atomic(sptep, FROZEN_SPTE);
@@ -536,8 +536,8 @@ static inline int __must_check __tdp_mmu_set_spte_atomic(struct tdp_iter *iter,
536536
u64 *sptep = rcu_dereference(iter->sptep);
537537

538538
/*
539-
* The caller is responsible for ensuring the old SPTE is not a REMOVED
540-
* SPTE. KVM should never attempt to zap or manipulate a REMOVED SPTE,
539+
* The caller is responsible for ensuring the old SPTE is not a FROZEN
540+
* SPTE. KVM should never attempt to zap or manipulate a FROZEN SPTE,
541541
* and pre-checking before inserting a new SPTE is advantageous as it
542542
* avoids unnecessary work.
543543
*/

0 commit comments

Comments
 (0)