KVM: MMU: Do not instantiate nontrapping spte on unsync page
authorAvi Kivity <avi@redhat.com>
Mon, 15 Mar 2010 11:59:56 +0000 (13:59 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:15:42 +0000 (12:15 +0300)
commitfbc5d139bb92e6822e4c000f97631a072d8babf9
tree1fc5dab8996706dccbfe221c9e5d486d75f3af3c
parent4a5f48f666ccc4ffdbc54241d9cab06806ed7922
KVM: MMU: Do not instantiate nontrapping spte on unsync page

The update_pte() path currently uses a nontrapping spte when a nonpresent
(or nonaccessed) gpte is written.  This is fine since at present it is only
used on sync pages.  However, on an unsync page this will cause an endless
fault loop as the guest is under no obligation to invlpg a gpte that
transitions from nonpresent to present.

Needed for the next patch which reinstates update_pte() on invlpg.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/paging_tmpl.h