[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWQBmmVODuSXac965o29Oxqo6uo4Ujm2AN2FUMztwCnzA@mail.gmail.com>
Date: Wed, 29 Apr 2020 17:45:16 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
X86 ML <x86@...nel.org>, kvm list <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH RFC 4/6] KVM: x86: acknowledgment mechanism for async pf
page ready notifications
On Wed, Apr 29, 2020 at 10:40 AM Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> On 29/04/20 19:28, Andy Lutomirski wrote:
> > This seems functional, but I'm wondering if it could a bit simpler and
> > more efficient if the data structure was a normal descriptor ring with
> > the same number slots as whatever the maximum number of waiting pages
> > is. Then there would never need to be any notification from the guest
> > back to the host, since there would always be room for a notification.
>
> No, it would be much more complicated code for a slow path which is
> already order of magnitudes slower than a vmexit. It would also use
> much more memory.
Fair enough.
>
> > It might be even better if a single unified data structure was used
> > for both notifications.
>
> That's a very bad idea since one is synchronous and one is asynchronous.
> Part of the proposal we agreed upon was to keep "page not ready"
> synchronous while making "page ready" an interrupt. The data structure
> for "page not ready" will be #VE.
>
#VE on SVM will be interesting, to say the least, and I think that a
solution that is VMX specific doesn't make much sense. #VE also has
unpleasant issues involving the contexts in which it can occur. You
will have quite a hard time convincing me to ack the addition of a #VE
entry handler for this. I think a brand new vector is the right
solution.
Powered by blists - more mailing lists