KVM: x86: retry non-page-table writing instructions
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Thu, 22 Sep 2011 09:02:48 +0000 (17:02 +0800)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:16:50 +0000 (11:16 +0200)
commit1cb3f3ae5a3855ba430430706da4201ace1d6ec4
tree1ff844904958cf669c86650da4601eb392f14a91
parentd5ae7ce835cc89556dc18e2070e754f026402efa
KVM: x86: retry non-page-table writing instructions

If the emulation is caused by #PF and it is non-page_table writing instruction,
it means the VM-EXIT is caused by shadow page protected, we can zap the shadow
page and retry this instruction directly

The idea is from Avi

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_emulate.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/emulate.c
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c