lkml.org 
[lkml]   [2021]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] KVM: x86: use static calls to reduce kvm_x86_ops overhead
On Thu, Jan 14, 2021 at 10:27:56PM -0500, Jason Baron wrote:
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 5060922..9d4492b 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -1350,7 +1350,7 @@ void kvm_arch_free_vm(struct kvm *kvm);
> static inline int kvm_arch_flush_remote_tlb(struct kvm *kvm)
> {
> if (kvm_x86_ops.tlb_remote_flush &&
> - !kvm_x86_ops.tlb_remote_flush(kvm))
> + !static_call(kvm_x86_tlb_remote_flush)(kvm))
> return 0;
> else
> return -ENOTSUPP;

Would you be able to use something like this?

https://lkml.kernel.org/r/20201110101307.GO2651@hirez.programming.kicks-ass.net

we could also add __static_call_return1(), if that would help.

\
 
 \ /
  Last update: 2021-01-15 10:50    [W:0.203 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site