Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115335
b: refs/heads/master
c: 38187c8
h: refs/heads/master
i:
  115333: e6ab22e
  115331: 2f7f24f
  115327: 110aaa7
v: v3
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Oct 15, 2008
1 parent 53d5d94 commit 099fb11
Show file tree
Hide file tree
Showing 2 changed files with 9 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: a378b4e64c0fef2d9e53214db167878b7673a7a3
refs/heads/master: 38187c830cab84daecb41169948467f1f19317e3
10 changes: 8 additions & 2 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,11 +1180,16 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
|| (write_fault && !is_write_protection(vcpu) && !user_fault)) {
struct kvm_mmu_page *shadow;

if (largepage && has_wrprotected_page(vcpu->kvm, gfn)) {
ret = 1;
spte = shadow_trap_nonpresent_pte;
goto set_pte;
}

spte |= PT_WRITABLE_MASK;

shadow = kvm_mmu_lookup_page(vcpu->kvm, gfn);
if (shadow ||
(largepage && has_wrprotected_page(vcpu->kvm, gfn))) {
if (shadow) {
pgprintk("%s: found shadow page for %lx, marking ro\n",
__func__, gfn);
ret = 1;
Expand All @@ -1197,6 +1202,7 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
if (pte_access & ACC_WRITE_MASK)
mark_page_dirty(vcpu->kvm, gfn);

set_pte:
set_shadow_pte(shadow_pte, spte);
return ret;
}
Expand Down

0 comments on commit 099fb11

Please sign in to comment.