On 23/08/2018 17:57, Sean Christopherson wrote: > That being said, I agree that adding the check in kvm_mmu_page_fault() > makes the desired behavior more obvious. And I also think removing > EMULTYPE_NO_REEXECUTE (or at least making re-execute opt-in) is a very > good thing for robustness and readability. Yeah, retry and reexecute are really the same thing, and your patch 2 was already a baby step towards fixing that. reexecute is really more like retry_failed_decode and need not have a separate emul_type bit. > So, what about adding !is_guest_mode() to kvm_mmu_page_fault(), and > also add a WARN_ON_ONCE(is_guest_mode()) check in the retry functions? Sure! Actually I wanted to propose the same, but not before checking that doing it in kvm_mmu_page_fault() made sense... Thanks, Paolo