aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/mmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index c0350be52c91..9f4be0114bce 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2990,7 +2990,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)
2990 pt = sp->spt; 2990 pt = sp->spt;
2991 for (i = 0; i < PT64_ENT_PER_PAGE; ++i) 2991 for (i = 0; i < PT64_ENT_PER_PAGE; ++i)
2992 /* avoid RMW */ 2992 /* avoid RMW */
2993 if (pt[i] & PT_WRITABLE_MASK) 2993 if (is_writable_pte(pt[i]))
2994 pt[i] &= ~PT_WRITABLE_MASK; 2994 pt[i] &= ~PT_WRITABLE_MASK;
2995 } 2995 }
2996 kvm_flush_remote_tlbs(kvm); 2996 kvm_flush_remote_tlbs(kvm);
@@ -3425,7 +3425,7 @@ void inspect_spte_has_rmap(struct kvm *kvm, u64 *sptep)
3425 struct kvm_mmu_page *rev_sp; 3425 struct kvm_mmu_page *rev_sp;
3426 gfn_t gfn; 3426 gfn_t gfn;
3427 3427
3428 if (*sptep & PT_WRITABLE_MASK) { 3428 if (is_writable_pte(*sptep)) {
3429 rev_sp = page_header(__pa(sptep)); 3429 rev_sp = page_header(__pa(sptep));
3430 gfn = kvm_mmu_page_get_gfn(rev_sp, sptep - rev_sp->spt); 3430 gfn = kvm_mmu_page_get_gfn(rev_sp, sptep - rev_sp->spt);
3431 3431
@@ -3474,7 +3474,7 @@ static void check_writable_mappings_rmap(struct kvm_vcpu *vcpu)
3474 3474
3475 if (!(ent & PT_PRESENT_MASK)) 3475 if (!(ent & PT_PRESENT_MASK))
3476 continue; 3476 continue;
3477 if (!(ent & PT_WRITABLE_MASK)) 3477 if (!is_writable_pte(ent))
3478 continue; 3478 continue;
3479 inspect_spte_has_rmap(vcpu->kvm, &pt[i]); 3479 inspect_spte_has_rmap(vcpu->kvm, &pt[i]);
3480 } 3480 }
@@ -3508,7 +3508,7 @@ static void audit_write_protection(struct kvm_vcpu *vcpu)
3508 3508
3509 spte = rmap_next(vcpu->kvm, rmapp, NULL); 3509 spte = rmap_next(vcpu->kvm, rmapp, NULL);
3510 while (spte) { 3510 while (spte) {
3511 if (*spte & PT_WRITABLE_MASK) 3511 if (is_writable_pte(*spte))
3512 printk(KERN_ERR "%s: (%s) shadow page has " 3512 printk(KERN_ERR "%s: (%s) shadow page has "
3513 "writable mappings: gfn %lx role %x\n", 3513 "writable mappings: gfn %lx role %x\n",
3514 __func__, audit_msg, sp->gfn, 3514 __func__, audit_msg, sp->gfn,