From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5EDFC433DB for ; Wed, 10 Mar 2021 14:15:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB28E64FFC for ; Wed, 10 Mar 2021 14:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232894AbhCJOOa (ORCPT ); Wed, 10 Mar 2021 09:14:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232861AbhCJOOD (ORCPT ); Wed, 10 Mar 2021 09:14:03 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 254C4C061760; Wed, 10 Mar 2021 06:14:03 -0800 (PST) Received: from zn.tnic (p200300ec2f0a9900452923910729ca7d.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:9900:4529:2391:729:ca7d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AE4BD1EC026F; Wed, 10 Mar 2021 15:14:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1615385641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TkMrmSK/gpY6OtMDP3bCzeW/KsANAPjk+GubcA0SiVk=; b=E5tIxCfbxV1QtJ7+kVylOOkptdMD5POD0M28l1YoZoIW5BjvRtSO1DgTJyfsd3pCigHb73 FLUR0E5MOJBdgkckOwBZ5WRAvXqEU6lsD2TQRaNJRsdp9MwWTl+mpMOE9fP7avOddwZqi+ MMqMSC4Aom3dQrDOqhVRCmy5BqdUCF4= Date: Wed, 10 Mar 2021 15:13:47 +0100 From: Borislav Petkov To: =?utf-8?B?SsO8cmdlbiBHcm/Dnw==?= Cc: xen-devel@lists.xenproject.org, x86@kernel.org, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, Deep Shah , "VMware, Inc." , Russell King , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Boris Ostrovsky , Stefano Stabellini , Peter Zijlstra Subject: Re: [PATCH v6 02/12] x86/paravirt: switch time pvops functions to use static_call() Message-ID: <20210310141347.GF23521@zn.tnic> References: <20210309134813.23912-1-jgross@suse.com> <20210309134813.23912-3-jgross@suse.com> <20210309185737.GE699@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Mar 10, 2021 at 08:51:22AM +0100, Jürgen Groß wrote: > It is combining the two needed actions: update the static call and > set the paravirt_using_native_sched_clock boolean. I actually meant what the point of using_native_sched_clock() is but put this comment at the wrong place, sorry. > Just had another idea: I could add a function to static_call.h for > querying the current function. This would avoid the double book keeping > and could probably be used later when switching other pv_ops calls to > static_call, too (e.g. pv_is_native_spin_unlock()). > > What do you think? Yap, that makes sense. Alternatively, you could even add a bitfield to pv_ops which carries that info and since pv_ops is global... But yeah, the less bookkeeping the better. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette