Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2332052rwb; Thu, 17 Nov 2022 09:21:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pZWaSPxpf+Bd5nR4YtolksrIbwgc3WV/JBuXHumI8oMvOE+SgSDih3PTsofT4SOgttA3R X-Received: by 2002:a05:6402:2ce:b0:462:3340:758f with SMTP id b14-20020a05640202ce00b004623340758fmr3131843edx.37.1668705670165; Thu, 17 Nov 2022 09:21:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668705670; cv=none; d=google.com; s=arc-20160816; b=hmcudXZiAbboNVNAQlfmRKloaRhrn4SqLTx5/p2nUH/zSJCFlE5oRzV0ng4D0+cu/+ DyHDOu2/EdjmAFGy3hOHv9wjecH/9D+vgPuYno4mNj26LRxP8CmsveEq7J4ViPnALj7c Dm4PQcDu4Ln8o6+m3BXLoOLDjkrE37Vwdiv+RuNkPO2YpSCFvA/wco7Q4jzW5s7T9i0v HhHecq/KwreR01VdPpR5BCP6Hz7vm/2hvzHeTCzT4FYNxOms+CcQghv5GVT2agggo5xt Fqo7BQ36V0NHx9mywud3+BCcUcQQ8/EYGfh/nS0G9cWhG3F/vVXY/E+aP8hn5/gIhUCH mfpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IwsBrupBKGDExJ0jOHnOGr0FcQMCStxLIP7mgxO9ptw=; b=YzRg8v7IQwfJEesd8u04jO3guVi/Y0401o4+JDmUTUqn1WLCuE0SsmJVclrwF6U5U3 6gREkoOUwC3QQgnQfEzjs4XY2PHN2LQQVT0oLoRBruMexnbQrCOygoXUZeEzcQVxqIPi oJ1LZAyvqmFSgoy+9JOKYbs1KyjkICinxnzsAwEMI55Znf8H/eBYzdYenWlO+oPgAzAe 0CD0JA+eubZs9unmlM9Xf9br/xHgtLvtsRLPsvhT2BePK5yMgYgBpROEU/hMr0mXupOo YI74C9XvuR6/+6S8PykNhjLlFuy8Ml/WT382nwUO6ixB9mVY3fk5iJEu/HLvfxwGts4f jh5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=SnIyULoq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a05640227c600b00462e5235356si1417626ede.619.2022.11.17.09.20.42; Thu, 17 Nov 2022 09:21:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=SnIyULoq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240525AbiKQRHT (ORCPT + 92 others); Thu, 17 Nov 2022 12:07:19 -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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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