From 8dc147cba84aff842a57a79d9fbd4ae25df57618 Mon Sep 17 00:00:00 2001 From: Gui Jianfeng Date: Thu, 27 May 2010 16:09:48 +0800 Subject: [PATCH] --- yaml --- r: 202303 b: refs/heads/master c: 01c168ac3d6568fed0373d82bd2db2b9339aab16 h: refs/heads/master i: 202301: d99e0eb6789b1497cbd4597212436faaf0b175c5 202299: bb1e399c0f8a4bfee6153c03214590a14db1c14d 202295: b982e061034e29529032eeddcf686c1d96eadf48 202287: d4029028c8f3d3bf97c9a2d56e2829fe137bbca2 202271: e69e511bd1835159d8d635e935055feff14491a8 202239: 87e0a6811ebde81333129db99ad5ffa86a14dea2 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/mmu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 27d08090175c..0e0598b1a501 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3af1817a0d65e8c1317e8d23cfe8a91aa1d4a065 +refs/heads/master: 01c168ac3d6568fed0373d82bd2db2b9339aab16 diff --git a/trunk/arch/x86/kvm/mmu.c b/trunk/arch/x86/kvm/mmu.c index c0350be52c91..9f4be0114bce 100644 --- a/trunk/arch/x86/kvm/mmu.c +++ b/trunk/arch/x86/kvm/mmu.c @@ -2990,7 +2990,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot) pt = sp->spt; for (i = 0; i < PT64_ENT_PER_PAGE; ++i) /* avoid RMW */ - if (pt[i] & PT_WRITABLE_MASK) + if (is_writable_pte(pt[i])) pt[i] &= ~PT_WRITABLE_MASK; } kvm_flush_remote_tlbs(kvm); @@ -3425,7 +3425,7 @@ void inspect_spte_has_rmap(struct kvm *kvm, u64 *sptep) struct kvm_mmu_page *rev_sp; gfn_t gfn; - if (*sptep & PT_WRITABLE_MASK) { + if (is_writable_pte(*sptep)) { rev_sp = page_header(__pa(sptep)); gfn = kvm_mmu_page_get_gfn(rev_sp, sptep - rev_sp->spt); @@ -3474,7 +3474,7 @@ static void check_writable_mappings_rmap(struct kvm_vcpu *vcpu) if (!(ent & PT_PRESENT_MASK)) continue; - if (!(ent & PT_WRITABLE_MASK)) + if (!is_writable_pte(ent)) continue; inspect_spte_has_rmap(vcpu->kvm, &pt[i]); } @@ -3508,7 +3508,7 @@ static void audit_write_protection(struct kvm_vcpu *vcpu) spte = rmap_next(vcpu->kvm, rmapp, NULL); while (spte) { - if (*spte & PT_WRITABLE_MASK) + if (is_writable_pte(*spte)) printk(KERN_ERR "%s: (%s) shadow page has " "writable mappings: gfn %lx role %x\n", __func__, audit_msg, sp->gfn,