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 12DC7FA3740 for ; Fri, 21 Oct 2022 16:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbiJUQUA (ORCPT ); Fri, 21 Oct 2022 12:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbiJUQTy (ORCPT ); Fri, 21 Oct 2022 12:19:54 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D557D4456E; Fri, 21 Oct 2022 09:19:36 -0700 (PDT) Received: from zn.tnic (p200300ea9733e769329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e769: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 0CC6D1EC0731; Fri, 21 Oct 2022 18:19:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666369174; 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=osvnA1VVG8lOO7CofSEE3U1qKE+FmJzIhRV7z1btuj4=; b=kTrJPiFSirvT8QAitnYEpzpcdMbtcXA5yOQxTep7XgZPzoZ7lttGRZVygRLbYsnaOD+LzU /RhEgA3iGecU55zSIGnw2ZiO8DllFm7LXz29lmQH3D3HkNrqJcr2lCuQHbKV8uRxNlwMvW ITkPMYEdCWAcH8rJMRHThhLuixBO9Z8= Date: Fri, 21 Oct 2022 18:19:29 +0200 From: Borislav Petkov To: Maxim Levitsky Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Pawan Gupta , Ingo Molnar , Josh Poimboeuf , Namhyung Kim , Tony Luck , Paolo Bonzini , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Thomas Gleixner , Alexander Shishkin , Tim Chen , "David S. Miller" , Dave Hansen , "Chang S. Bae" , Jane Malalane , Kees Cook , Kan Liang , Peter Zijlstra , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Herbert Xu , Jiri Olsa , Mark Rutland , linux-perf-users@vger.kernel.org, "open list:CRYPTO API" Subject: Re: [PATCH v2 2/5] x86/cpuid: refactor setup_clear_cpu_cap()/clear_cpu_cap() Message-ID: References: <20220718141123.136106-1-mlevitsk@redhat.com> <20220718141123.136106-3-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220718141123.136106-3-mlevitsk@redhat.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jul 18, 2022 at 05:11:20PM +0300, Maxim Levitsky wrote: > Currently setup_clear_cpu_cap passes NULL 'struct cpuinfo_x86*' > to clear_cpu_cap to indicate that capability should be cleared from boot_cpu_data. > > Later that is used in clear_feature to do recursive call to > clear_cpu_cap together with clearing the feature bit from 'cpu_caps_cleared' > > Remove that code and just call the do_clear_cpu_cap on boot_cpu_data directly > from the setup_clear_cpu_cap. > > The only functional change this introduces is that now calling clear_cpu_cap > explicitly on boot_cpu_data also sets the bits in cpu_caps_cleared, > which is the only thing that makes sense anyway. > > All callers of both functions were checked for this and fixed. Change looks ok. What I can't grok is this sentence: what was checked and fixed where? What does need fixing and why? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette