Re: [PATCH 5/5] kvm/svm: kick L2 guest to L1 by ready async_pf

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

 



On Fri, Dec 02, 2016 at 04:35:24AM -0500, Paolo Bonzini wrote:
> 
> 
> ----- Original Message -----
> > From: "Roman Kagan" <rkagan@xxxxxxxxxxxxx>
> > To: "Radim Krčmář" <rkrcmar@xxxxxxxxxx>, "Paolo Bonzini" <pbonzini@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx
> > Cc: "Denis Lunev" <den@xxxxxxxxxxxxx>, "Roman Kagan" <rkagan@xxxxxxxxxxxxx>
> > Sent: Friday, December 2, 2016 9:47:54 AM
> > Subject: [PATCH 5/5] kvm/svm: kick L2 guest to L1 by ready async_pf
> > 
> > When async pagefault is resolved vCPU may be executing L2 guest.
> > 
> > In order to allow L1 take better scheduling decisions in such cases,
> > make L2 exit to L1 on a fake external interupt, without actually
> > injecting it (unless L2 has other reasons to vmexit).
> > 
> > This patch does that for x86/AMD.
> > 
> > Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>
> > ---
> > Note 1: I didn't have a chance to test this; I'll do when I get access to an
> > AMD machine and let you know if anything goes wrong
> > 
> > Note 2: I mostly modelled this patch after the one for vmx but is looks not
> > very appealing for svm.  I'd appreciate being pointed at a better location
> > where to stick the fake external interrupt vmexit.
> 
> This should not be necessary, SVM has a different mechanism (which
> requires L1 cooperation) to handle async page faults.

Hmm, I didn't realize that...  I'm afraid we have a problem then: my
patch that triggered all this, "kvm/x86: skip async_pf when in guest
mode", makes async_pf's not delivered if the vcpu is executing L2 on
all x86, so that mechanism will stop working.

I'm also curious what L1 cooperation is assumed here.  E.g. would L1
running linux (which would set up async_pf) and a non-KVM hypervisor
cooperate as expected?  Looks like I need another dive into svm.c...

Roman.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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