]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: drop read-only large sptes when creating lower level sptes
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 24 Feb 2014 16:59:32 +0000 (13:59 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Feb 2014 16:23:32 +0000 (17:23 +0100)
commitd80ccdce6a247adccce11dd9ab20f160ada0b12e
tree428dc29ebd433849b621e6238e93e33f9cfca0e2
parentaf18dbdc538d68661a2dc170065e02fb49a2ec53
KVM: MMU: drop read-only large sptes when creating lower level sptes

Read-only large sptes can be created due to read-only faults as
follows:

- QEMU pagetable entry that maps guest memory is read-only
due to COW.
- Guest read faults such memory, COW is not broken, because
it is a read-only fault.
- Enable dirty logging, large spte not nuked because it is read-only.
- Write-fault on such memory causes guest to loop endlessly
(which must go down to level 1 because dirty logging is enabled).

Fix by dropping large spte when necessary.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c