Re: [PATCH] KVM: MMU: avoid fast page fault fixing mmio page fault

Xiao Guangrong
2013-07-18T06:01:47Z

On 07/18/2013 01:31 PM, Gleb Natapov wrote:
> On Thu, Jul 18, 2013 at 12:52:37PM +0800, Xiao Guangrong wrote:
>> Currently, fast page fault tries to fix mmio page fault when the
>> generation number is invalid (spte.gen != kvm.gen) and returns to
>> guest to retry the fault since it sees the last spte is nonpresent
>> which causes infinity loop
>>
>> It can be triggered only on AMD host since the mmio page fault is
>> recognized as ept-misconfig
>>
> We still call into regular page fault handler from ept-misconfig
> handler, but fake zero error_code we provide makes page_fault_can_be_fast()
> return false.

Yes.

>
> Shouldn't shadow paging trigger this too? I haven't encountered this on
> Intel without ept.

Since currently fast page fault only works for direct mmu. :)