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>
This commit is contained in:

committed by
Avi Kivity

parent
d5ae7ce835
commit
1cb3f3ae5a
@@ -3702,6 +3702,11 @@ done:
|
||||
return (rc != X86EMUL_CONTINUE) ? EMULATION_FAILED : EMULATION_OK;
|
||||
}
|
||||
|
||||
bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
return ctxt->d & PageTable;
|
||||
}
|
||||
|
||||
static bool string_insn_completed(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
/* The second termination condition only applies for REPE
|
||||
|
Reference in New Issue
Block a user