Re: [PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-07 Thread Marcelo Tosatti
On Sat, Jan 05, 2013 at 04:16:37PM +0800, Xiao Guangrong wrote: > On 01/05/2013 06:44 AM, Marcelo Tosatti wrote: > > >> index b0a3678..44c6992 100644 > >> --- a/arch/x86/kvm/x86.c > >> +++ b/arch/x86/kvm/x86.c > >> @@ -4756,15 +4756,8 @@ static int handle_emulation_failure(struct kvm_vcpu > >> *v

Re: [PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-05 Thread Xiao Guangrong
On 01/05/2013 06:44 AM, Marcelo Tosatti wrote: >> index b0a3678..44c6992 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -4756,15 +4756,8 @@ static int handle_emulation_failure(struct kvm_vcpu >> *vcpu) >> static bool reexecute_instruction(struct kvm_vcpu *vcpu, unsigned lon

Re: [PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-04 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 09:56:59PM +0800, Xiao Guangrong wrote: > 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

[PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-04 Thread Xiao Guangrong
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 c