diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2013-01-13 10:49:07 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-01-21 19:58:33 -0500 |
commit | 93c05d3ef25275829d421a255271595ac219a518 (patch) | |
tree | b987097751977ca63bd9a9ef53956cd0d14127c3 /arch/x86/include | |
parent | 95b3cf69bdf8b27a02d878e24ca353cebb4e009e (diff) |
KVM: x86: improve reexecute_instruction
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>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index f75e1feb6ec5..77d56a4ba89c 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -497,6 +497,13 @@ struct kvm_vcpu_arch { | |||
497 | u64 msr_val; | 497 | u64 msr_val; |
498 | struct gfn_to_hva_cache data; | 498 | struct gfn_to_hva_cache data; |
499 | } pv_eoi; | 499 | } pv_eoi; |
500 | |||
501 | /* | ||
502 | * Indicate whether the access faults on its page table in guest | ||
503 | * which is set when fix page fault and used to detect unhandeable | ||
504 | * instruction. | ||
505 | */ | ||
506 | bool write_fault_to_shadow_pgtable; | ||
500 | }; | 507 | }; |
501 | 508 | ||
502 | struct kvm_lpage_info { | 509 | struct kvm_lpage_info { |