Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-20 Thread Paolo Bonzini
On 20/09/21 15:40, Marc Zyngier wrote: At least not before we declare the arm64 single kernel image policy to be obsolete. --verbose please.:) I am sure you're right, but I don't understand the link between the two. To start making KVM/arm64 modular, you'd have to build it such as there is

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-20 Thread Marc Zyngier
On Mon, 20 Sep 2021 14:18:30 +0100, Paolo Bonzini wrote: > > On 20/09/21 14:22, Marc Zyngier wrote: > >> I think that's only ARM, and even then it is only because of > >> limitations of the hardware which mostly apply only if VHE is not in > >> use. > >> > >> If anything, it's ARM that should su

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-20 Thread Paolo Bonzini
On 20/09/21 14:22, Marc Zyngier wrote: I think that's only ARM, and even then it is only because of limitations of the hardware which mostly apply only if VHE is not in use. If anything, it's ARM that should support module build in VHE mode (Linux would still need to know whether it will be runn

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-20 Thread Marc Zyngier
On Mon, 20 Sep 2021 13:05:25 +0100, Paolo Bonzini wrote: > > On 17/09/21 09:28, Peter Zijlstra wrote: > >> In theory, I like the idea of burying intel_pt inside x86 (and even in > >> Intel+VMX code for the most part), but the actual implementation is a > >> bit gross. Because of the whole "KVM c

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-20 Thread Paolo Bonzini
On 17/09/21 09:28, Peter Zijlstra wrote: In theory, I like the idea of burying intel_pt inside x86 (and even in Intel+VMX code for the most part), but the actual implementation is a bit gross. Because of the whole "KVM can be a module" thing, ARGH!! we should really fix that. I've heard other

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-17 Thread Sean Christopherson
On Fri, Sep 17, 2021, Peter Zijlstra wrote: > On Thu, Sep 16, 2021 at 09:37:43PM +, Sean Christopherson wrote: > So I don't mind exporting __static_call_return0, but exporting a raw > static_call is much like exporting a function pointer :/ Ya, that part is quite gross. > > The unregister pat

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-17 Thread Peter Zijlstra
On Thu, Sep 16, 2021 at 09:37:43PM +, Sean Christopherson wrote: > On Sat, Aug 28, 2021, Peter Zijlstra wrote: > Argh, sorry, I somehow managed to miss all of your replies. I'll get back to > this series next week. Thanks for the quick response! > > > Lets keep the whole intel_pt crud insid

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-16 Thread Sean Christopherson
On Sat, Aug 28, 2021, Peter Zijlstra wrote: > On Fri, Aug 27, 2021 at 05:35:45PM -0700, Sean Christopherson wrote: > > Like Xu (2): > > perf/core: Rework guest callbacks to prepare for static_call support > > perf/core: Use static_call to optimize perf_guest_info_callbacks > > > > Sean Christo

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-08-28 Thread Peter Zijlstra
On Fri, Aug 27, 2021 at 05:35:45PM -0700, Sean Christopherson wrote: > Like Xu (2): > perf/core: Rework guest callbacks to prepare for static_call support > perf/core: Use static_call to optimize perf_guest_info_callbacks > > Sean Christopherson (11): > perf: Ensure perf_guest_cbs aren't rel

[PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-08-27 Thread Sean Christopherson
This is a combination of ~2 series to fix bugs in the perf+KVM callbacks, optimize the callbacks by employing static_call, and do a variety of cleanup in both perf and KVM. Patch 1 fixes a mostly-theoretical bug where perf can deref a NULL pointer if KVM unregisters its callbacks while they're bei