Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80853
b: refs/heads/master
c: caa5b8a
h: refs/heads/master
i:
  80851: e10118b
v: v3
  • Loading branch information
Eddie Dong authored and Avi Kivity committed Jan 30, 2008
1 parent 70f134e commit 91f2ec6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec10f4750db5e810cafef114a592428f8242b640
refs/heads/master: caa5b8a5ed27708521e0667649699fea202043b2
8 changes: 6 additions & 2 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
{
unsigned long *rmapp;
u64 *spte;
int write_protected = 0;

gfn = unalias_gfn(kvm, gfn);
rmapp = gfn_to_rmap(kvm, gfn);
Expand All @@ -522,11 +523,14 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
BUG_ON(!spte);
BUG_ON(!(*spte & PT_PRESENT_MASK));
rmap_printk("rmap_write_protect: spte %p %llx\n", spte, *spte);
if (is_writeble_pte(*spte))
if (is_writeble_pte(*spte)) {
set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK);
kvm_flush_remote_tlbs(kvm);
write_protected = 1;
}
spte = rmap_next(kvm, rmapp, spte);
}
if (write_protected)
kvm_flush_remote_tlbs(kvm);
}

#ifdef MMU_DEBUG
Expand Down

0 comments on commit 91f2ec6

Please sign in to comment.