KVM: x86: improve reexecute_instruction
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Sun, 13 Jan 2013 15:49:07 +0000 (23:49 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 22 Jan 2013 00:58:33 +0000 (22:58 -0200)
The current reexecute_instruction can not well detect the failed instruction
emulation. It allows guest to retry all the instructions except it accesses
on error pfn

For example, some cases are nested-write-protect - if the page we want to
write is used as PDE but it chains to itself. Under this case, we should
stop the emulation and report the case to userspace

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

No differences found