diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-11-21 21:13:58 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-11-23 16:24:19 +0300 |
commit | 0c0f40bdbe4ddb48ebecfb5c2b56eeb175a57c45 (patch) | |
tree | 5fc295c2999bcfe9d4860d1cac012188e46a82aa /arch/x86 | |
parent | ce50b91d0f7b0b90e3960a6f306b4027378c7c27 (diff) | |
download | linux-0c0f40bdbe4ddb48ebecfb5c2b56eeb175a57c45.tar.xz |
KVM: MMU: fix sync of ptes addressed at owner pagetable
During page sync, if a pagetable contains a self referencing pte (that
points to the pagetable), the corresponding spte may be marked as
writable even though all mappings are supposed to be write protected.
Fix by clearing page unsync before syncing individual sptes.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index f1983d9477cd..410ddbc1aa2e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1038,13 +1038,13 @@ static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) } rmap_write_protect(vcpu->kvm, sp->gfn); + kvm_unlink_unsync_page(vcpu->kvm, sp); if (vcpu->arch.mmu.sync_page(vcpu, sp)) { kvm_mmu_zap_page(vcpu->kvm, sp); return 1; } kvm_mmu_flush_tlb(vcpu); - kvm_unlink_unsync_page(vcpu->kvm, sp); return 0; } |