[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <34082A11-321D-4DF0-A076-7BBF332DCA66@gmail.com>
Date: Mon, 2 Mar 2020 01:28:04 -0800
From: Nadav Amit <nadav.amit@...il.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>,
kvm list <kvm@...r.kernel.org>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v2] x86/kvm: Handle async page faults directly through
do_page_fault()
> On Feb 29, 2020, at 9:50 AM, Andy Lutomirski <luto@...nel.org> wrote:
>
> KVM overloads #PF to indicate two types of not-actually-page-fault
> events. Right now, the KVM guest code intercepts them by modifying
> the IDT and hooking the #PF vector. This makes the already fragile
> fault code even harder to understand, and it also pollutes call
> traces with async_page_fault and do_async_page_fault for normal page
> faults.
>
> Clean it up by moving the logic into do_page_fault() using a static
> branch. This gets rid of the platform trap_init override mechanism
> completely.
>
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
Indeed the async-PF mechanism is only used by KVM, and there is no need for
over-engineering the solution just in case some other hypervisor ever
introduces support for a similar paravirtual feature.
Yet, this might be a slippery slope, making Linux optimized to run on KVM
(and maybe Xen). In other words, I wonder whether a similar change was
acceptable for a paravirtual feature that is only supported by a proprietary
hypervisor, such as Hyper-V or VMware.
Powered by blists - more mailing lists