Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-12 Thread Nadav Amit
On Jan 12, 2012, at 2:26 AM, Takuya Yoshikawa wrote: (2012/01/12 7:11), Takuya Yoshikawa wrote: On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amitna...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-12 Thread Takuya Yoshikawa
(2012/01/12 18:07), Nadav Amit wrote: On Jan 12, 2012, at 2:26 AM, Takuya Yoshikawa wrote: (2012/01/12 7:11), Takuya Yoshikawa wrote: On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amitna...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently,

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-12 Thread Avi Kivity
On 01/12/2012 11:07 AM, Nadav Amit wrote: When I cleaned up insn_fetch(), I thought that fetching the instruction which is being executed by the guest cannot cause #PF. The possibility that a meaningless userspace might similtaneously unmap the page, noted by Avi IIRC, was ignored

[PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Nadav Amit
An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. Instead, emulation should be skipped and the fault should be injected. Skipping instruction should report a failure in this case. Signed-off-by: Nadav Amit

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Takuya Yoshikawa
On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amit na...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. When I cleaned up insn_fetch(), I thought that fetching the instruction which is being

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Takuya Yoshikawa
(2012/01/12 7:11), Takuya Yoshikawa wrote: On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amitna...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. Note that the decode/emulation will not be