[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa31edbb-6082-1b95-4d65-059351ac4884@redhat.com>
Date: Tue, 24 Sep 2019 03:24:26 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Andrea Arcangeli <aarcange@...hat.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
"Dr. David Alan Gilbert" <dgilbert@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Peter Xu <peterx@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 13/17] KVM: monolithic: x86: drop the kvm_pmu_ops
structure
On 24/09/19 02:51, Andrea Arcangeli wrote:
> This was covered in the commit header of patch 2:
Oops, sorry.
> Lot more patches are needed to get rid of kvm_x86_ops entirely because
> there are lots of places checking the actual value of the method
> before making the indirect call. I tried to start that, but then it
> got into potentially heavily rejecting territory, so I thought it was
> simpler to start with what I had, considering from a performance
> standpoint it's optimal already as far as retpolines are concerned.
The performance may be good enough, but the maintainability is bad.
Let's make a list of function pointers that are checked, and function
pointers that are written at init time.
For the former, it should be possible to make them __weak symbols so
that they are NULL if undeclared. For the latter, module parameters can
be made extern and then you can have checks like kvm_x86_has_...() in
inline functions in a header file.
Paolo
Powered by blists - more mailing lists