Re: [PATCH 1/2] KVM: x86: Do not re-{try,execute} after failed emulation in L2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux