lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e13aa15-2f64-8e54-03b1-c4843af96bc1@redhat.com>
Date:   Fri, 15 Jan 2021 14:56:41 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Jason Baron <jbaron@...mai.com>
Cc:     seanjc@...gle.com, kvm@...r.kernel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [PATCH v2 3/3] KVM: x86: use static calls to reduce kvm_x86_ops
 overhead

On 15/01/21 10:45, Peter Zijlstra wrote:
> 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.
> 

I think I'd rather make the default callee return -ENOTSUPP directly and 
remove the "if" completely.  So __static_call_return1() is not 
particularly useful here.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ