Re: [PATCH 03/13] kvm: monolithic: fixup x86-32 build
From: Paolo Bonzini
Date: Fri Nov 08 2019 - 16:02:57 EST
On 08/11/19 21:01, Andrea Arcangeli wrote:
> On Fri, Nov 08, 2019 at 08:51:04PM +0100, Paolo Bonzini wrote:
>> I suppose we could use code patching mechanism to avoid the retpolines.
>> Andrea, what do you think about that? That would have the advantage
>> that we won't have to remove kvm_x86_ops. :)
>
> page 17 covers pvops:
>
> https://people.redhat.com/~aarcange/slides/2019-KVM-monolithic.pdf
You can patch call instructions directly using text_poke when
kvm_intel.ko or kvm_amd.ko, I'm not sure why that would be worse for TLB
or RAM usage. The hard part is recording the location of the call sites
using some pushsection/popsection magic.
Paolo