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>
Цей коміт міститься в:

зафіксовано
Marcelo Tosatti

джерело
95b3cf69bd
коміт
93c05d3ef2
@@ -497,6 +497,13 @@ struct kvm_vcpu_arch {
|
||||
u64 msr_val;
|
||||
struct gfn_to_hva_cache data;
|
||||
} pv_eoi;
|
||||
|
||||
/*
|
||||
* Indicate whether the access faults on its page table in guest
|
||||
* which is set when fix page fault and used to detect unhandeable
|
||||
* instruction.
|
||||
*/
|
||||
bool write_fault_to_shadow_pgtable;
|
||||
};
|
||||
|
||||
struct kvm_lpage_info {
|
||||
|
Посилання в новій задачі
Заблокувати користувача