Re: [PATCH v2] KVM: x86: Fix recording of guest steal time / preempted status

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

 



On 11/3/21 13:56, David Woodhouse wrote:
No need to resubmit, thanks!  I'll review the code later and
decide whether to include this in 5.16 or go for the "good"
solution in 5.16 and submit this one for 5.15 only.
I would call this the good solution for steal time. We really do
always have a userspace HVA for that when it matters, and we should
use it.

For Xen event channel delivery we have to do it from hardware
interrupts under arbitrary current->mm and we need a kernel mapping,
and we need the MMU notifiers and all that stuff. But for every
mapping we do that way, we need extra checks in the MMU notifiers.

For steal time there's just no need.

Yes, but doing things by hand that it is slightly harder to get right, between the asm and the manual user_access_{begin,end}.

The good solution would be to handle the remapping of _all_ gfn-to-pfn caches from the MMU notifiers, so that you can still do map/unmap, keep the code simple, and get for free the KVM-specific details such as marking the gfn as dirty.

When I was working on it before, I got stuck with wanting to do it not just good but perfect, including the eVMCS page in it. But that makes no sense because really all that needs to be fixed is the _current_ users of the gfn-to-pfn cache.

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