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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F291C4332F for ; Thu, 17 Nov 2022 17:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240488AbiKQRHS (ORCPT ); Thu, 17 Nov 2022 12:07:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240511AbiKQRHP (ORCPT ); Thu, 17 Nov 2022 12:07:15 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50B5574AB5; Thu, 17 Nov 2022 09:07:13 -0800 (PST) Received: from zn.tnic (p200300ea9733e7de329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7de:329c:23ff:fea6:a903]) (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 711661EC04CB; Thu, 17 Nov 2022 18:07:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1668704831; 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:in-reply-to:in-reply-to: references:references; bh=IwsBrupBKGDExJ0jOHnOGr0FcQMCStxLIP7mgxO9ptw=; b=SnIyULoqABEtCUPcoQMC5Kee1zP3M65nfTwCBHMVkiJGP2ifnpqLK2PxuRo1ujkRAICmut rxij+U97Rou+Wl3tnRtmJwa80MAJvsEmI+oXlmj9p33b+nGEhM5NjK+9VKH07WQi8bAvPR hJafUZKHZONO6gXRRWL71J093jx1mbQ= Date: Thu, 17 Nov 2022 18:07:06 +0100 From: Borislav Petkov To: Sean Christopherson Cc: Maxim Levitsky , kvm@vger.kernel.org, Paolo Bonzini , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Sandipan Das , Daniel Sneddon , Jing Liu , Josh Poimboeuf , Wyes Karny , Babu Moger , Pawan Gupta , Jim Mattson , x86@kernel.org, Santosh Shukla Subject: Re: [PATCH 06/13] KVM: SVM: Add VNMI bit definition Message-ID: References: <20221117143242.102721-1-mlevitsk@redhat.com> <20221117143242.102721-7-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Nov 17, 2022 at 04:42:57PM +0000, Sean Christopherson wrote: > Why? This is rarely run code, won't cpu_feature_enabled() > unnecessarily require patching? Because we want one single interface to test X86_FEATURE flags. And there's no need for the users to know whether it wants patching or not - we simply patch *everywhere* and that's it. > And while we're on the topic... https://lore.kernel.org/all/Y22IzA9DN%2FxYWgWN@google.com Because static_ or boot_ is not relevant to the user - all she wants to know is whether a cpu feature has been enabled. Thus cpu_feature_enabled(). And yes, at the time I protested a little about unnecessary patching. And tglx said "Why not?". And I had no good answer to that. So we can just as well patch *everywhere*. And patching is soo not a big deal anymore considering all the other things we do to kernel code at build time and runtime. objdump output compared to what's actually running has in some cases no resemblance whatsoever. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette