Re: Deadlock due to EPT_VIOLATION

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

 



On Fri, Aug 11, 2023, Eric Wheeler wrote:
> On Fri, 11 Aug 2023, Sean Christopherson wrote:
> > What I suspect is happening is that the in-progress count gets left high, e.g.
> > because of a start() without a paired end(), and that causes KVM to refuse to
> > install mappings for the affected range of guest memory.  Or possibly that the
> > problematic host is generating an absolutely massive storm of invalidations and
> > unintentionally DoS's the guest.
> 
> 
> It would would be great to write a micro benchmark of sorts that generates 
> EPT page invalidation pressure, and run it on a test system inside a 
> virtual machine to see if we can get it to fault:
> 
> Can you suggest the type(s) of memory operations that could be written in 
> user space (or kernel space as a module) to, find a test case that forces 
> it to fail within a reasonable period of time?

Easiest thing would be to toggle PROT_EXEC via mprotect() on guest memory.  KVM
ignores PROT_EXEC so that guest memory doesn't need to be mapped executable in
the VMM, i.e. toggling PROT_EXEC won't cause spurious failures but it will still
trigger mmu_notifier invalidations.

Side topic, can you provide your host Kconfig?



[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