Re: [EXTERNAL] [PATCH] KVM: x86/xen: Fix runstate updates to be atomic when preempting vCPU

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

 



On Mon, 2021-10-25 at 14:22 +0200, Paolo Bonzini wrote:
> On 25/10/21 14:19, David Woodhouse wrote:
> > So, with a fixed version of kvm_map_gfn() I suppose I could do the
> > same, but that's*two*  maps/unmaps for each interrupt? That's probably
> > worse than just bouncing out and letting userspace do it!
> 
> 
> 
> Absolutely!  The fixed version of kvm_map_gfn should not do any
> map/unmap, it should do it eagerly on MMU notifier operations.

When you put it like that, it just seems so stunningly redundant :)

"When we get notified that the guest HVA has been mapped, we create our
own kernel mapping of the same page. When we are notifed that the guest
HVA gets unmapped, we tear down our kernel mapping of it."

The really important part of that is the *synchronisation*, using the
notifier to send a request to each vCPU to ensure that they aren't
currently *using* the virtual address in question.

If we can get that part right, then perhaps it shouldn't *matter*
whether the HVA in question is a guest or a kernel one?

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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