Re: [PATCH 3/3] Reenter guest after instruction emulation failure if emulation was due to access to non-mmio address.

2010-07-08 Thread Avi Kivity
On 07/08/2010 12:17 PM, Gleb Natapov wrote: btw, that will mean another page walk, so better fold into kvm_mmu_unprotect_page_virt() (which needs a new name, since it does more than unprotect a page now). But this code will be taken very rarely and usually on the way to failure anyway,

Re: [PATCH 3/3] Reenter guest after instruction emulation failure if emulation was due to access to non-mmio address.

2010-07-08 Thread Gleb Natapov
On Thu, Jul 08, 2010 at 12:15:18PM +0300, Avi Kivity wrote: > On 07/08/2010 12:06 PM, Avi Kivity wrote: > >On 07/07/2010 08:16 PM, Gleb Natapov wrote: > >>When shadow pages are in use sometimes KVM try to emulate an instruction > >>when it accesses a shadowed page. If emulation fails KVM un-shadows

Re: [PATCH 3/3] Reenter guest after instruction emulation failure if emulation was due to access to non-mmio address.

2010-07-08 Thread Avi Kivity
On 07/08/2010 12:06 PM, Avi Kivity wrote: On 07/07/2010 08:16 PM, Gleb Natapov wrote: When shadow pages are in use sometimes KVM try to emulate an instruction when it accesses a shadowed page. If emulation fails KVM un-shadows the page and reenter guest to allow vcpu to execute the instruction.

Re: [PATCH 3/3] Reenter guest after instruction emulation failure if emulation was due to access to non-mmio address.

2010-07-08 Thread Avi Kivity
On 07/07/2010 08:16 PM, Gleb Natapov wrote: When shadow pages are in use sometimes KVM try to emulate an instruction when it accesses a shadowed page. If emulation fails KVM un-shadows the page and reenter guest to allow vcpu to execute the instruction. If page is not in shadow page hash KVM assu

[PATCH 3/3] Reenter guest after instruction emulation failure if emulation was due to access to non-mmio address.

2010-07-07 Thread Gleb Natapov
When shadow pages are in use sometimes KVM try to emulate an instruction when it accesses a shadowed page. If emulation fails KVM un-shadows the page and reenter guest to allow vcpu to execute the instruction. If page is not in shadow page hash KVM assumes that this was attempt to do MMIO and repor