Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1117343lqo; Fri, 17 May 2024 11:08:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvctfD4YSVooAKlySuYuD2wId1PQJ9BtXQ6/w+NcdrsygfG9T9YsYcbAYroLuTJBcOzPJz0sO/K8YFeucnDHSsBbHrA6COcVY3oTLqvw== X-Google-Smtp-Source: AGHT+IF64lUfFjHiOgS1uqodpXsIKdHeKOitV9gxmnXNaprHL/1RLjMJRLMz08Pkx5HsAUb+kv+S X-Received: by 2002:a05:6512:344b:b0:51e:2e0a:c38c with SMTP id 2adb3069b0e04-5221016b55amr16452744e87.45.1715969318304; Fri, 17 May 2024 11:08:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715969318; cv=pass; d=google.com; s=arc-20160816; b=WcoCkkNwWiKQgGmwNLOlce0Q0ZRCPyILps1ewDCigFXzXoCvckXqC9Uh9GT0f9oRZO Q6A83hWKQH99IiGGCUZrkdI9KPzNsfUiY/bxPvtaYApcFUovd/qD9SAxr45S74Ey5bM+ 3oMZXFmUoy2jIFdTzZ6xSfpC6AoRAuqF1uWr5KTDI1UscoooXIceJRDregB8IcNZepRd CAaMVgYAsEGYrbiGarrviL1jN5JVEXrfJpUE2WGof2C7hGpfcUCu91m0jdqimwvfQMaa EJ9H0d096Za1WjaRhfhKYAQJVvm+LVauoS1bRgw3J+1P34C59GBFmEdYYI1tmmQCpsLi +Qrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BklJ0Xy1NwJgkxAFnP/a6AerOzCrYYikftsLx1c6YRo=; fh=ltrMD3CsjN7RVQImMFHicOOcj8lW2vu1cMFahj88CkA=; b=F45UQMzCB6ZN5AoWUGH+qSoEwg39w3NQ7g4eVmCcMk3LtoE29hwXXqR1Il763w3tn9 cnA69oZAirmaBqLXZollYF04mFNsoqIMFVjtMtN+YsdFwYjlioy3Jjj/k+DkvAD7v+oA pU/lEdBcPxGZ2w8rf7ltBjmTDmPT9vUthT0PayUt5jXU6Evtff6zYJPBerHAcw9hbOh2 DKJIi3zhWb9jneD3MnGvCmPBsIITNulUm2a46R0PVemphjneIRJIRTsQxVpmwCmyG7NU 9jCaYYY9f3ZyvHTtdvjW/wx4c5pH+nQJwqtVZyAfEz25iJuPVtSXWQ0cLGIbdrbsVgfc XyZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=BiJJFotS; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1794621csi989410466b.87.2024.05.17.11.08.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 11:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=BiJJFotS; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C8BD31F29149 for ; Fri, 17 May 2024 17:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1903E14372B; Fri, 17 May 2024 17:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="BiJJFotS" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F53C142E83 for ; Fri, 17 May 2024 17:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715968433; cv=none; b=uTjl2GD1qqyF4wztFpyo0YXH7W2DK9pa3DnsuC5wE4RgoIj3Lhxi5lIL9A1sX/mqeehChOdpMs7rvNtdiZvNq8Ji+OxsnkQyoXyxIrY9oghG9pACevD2axPreHbQ7nTuys80khf4e5IqMs10mZjV7qpMShliYO+1EyxRQTDZqKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715968433; c=relaxed/simple; bh=Pj3XqwCP/tWyNk1MTxRUoT5OZi3EKwTxbKbZWc4jLRI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AAqIan+oBblgczBmTukxe50ifFd7N/IA7U/K619inAHQdknx9QViaNPNd7zDNWzOwC4vvIl5Eea5JPamfykh1He3JGkpIvynOgA0fsNPiz4F1IEPocavj1ASzL+1XTRWgWu/qSsCcfiWbmnmGFjtLpyCVl5tvmjlQ469/P7Szk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=BiJJFotS; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 3E8BE40E01E8; Fri, 17 May 2024 17:53:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H0VWSqlu61N5; Fri, 17 May 2024 17:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1715968426; bh=BklJ0Xy1NwJgkxAFnP/a6AerOzCrYYikftsLx1c6YRo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BiJJFotSKGK3qH/tIdBxj01UL2ZC1FN17eQ4IXKlyPgIpFCj4/A1ZQZgXqMn+U5in LX+pS60VjFg9CtSkLIKigDBTZmhgaS6WJvwTN5ChKraij4y1eFsxX5SeISeiRG8/NY Yp0UoNZyuxJUq0tmzGrjBGZkHXWMD9IlegnPvn/kU6/Jioz/mRQBiuZt1an+jsdXky yHop8mXx439mohzl93AX7vlvIZyCMg9AMKmIYOjZfkRYevTUqNN+T1Pf54HwI1MrZf PDyZ2RyQpGzrCM87AyWhVGNYozXgjqeS08GM9ie2tJh8V5DpK65BBvbki1nVnGD3BL nPsgeSbLlgT7dZmKY0WyqVGdmqXGU+2Z60oflzorrmkaAVK+CYAbGVlIy3InOHK4RA zbWhazdc3K6Qd/lx514pee6vsT5iAlsD9JlLKDW7RmhwvYZr0Olv3I8LszpQjMFKKE 0S1aIKge9IIzyFuuVqriA4OHcFBdYcV6rrTGKbuEISAwysmAQo55jdQbDRlqcAgMSK jWKb97u4h/IQLRQN7QwCkbCL43S/6NP2+4MJFaXjj9F5DckwlopEYeVJDG2ovY8+OR 4z6r+s0m1ICB9qomj2EV+4ZyjBxj2WatSMTpuVMaXcnaKjZCY90q7XYJ4VhOy/wHVo J2cFSWgsGEMBuGQGtVMuMEDM= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E87D340E0244; Fri, 17 May 2024 17:53:29 +0000 (UTC) Date: Fri, 17 May 2024 19:53:24 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , "x86@kernel.org" , "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Uros Bizjak , "Edgecombe, Rick P" , Arnd Bergmann , Mateusz Guzik , Thomas Renninger , Greg Kroah-Hartman , Andi Kleen , "linux-kernel@vger.kernel.org" , "patches@lists.linux.dev" Subject: Re: [PATCH v3] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL Message-ID: <20240517175324.GGZkeZlNgjGxwfumLu@fat_crate.local> References: <20240517172134.7255-1-tony.luck@intel.com> <20240517173811.GFZkeWAzKjYtEMwe1e@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, May 17, 2024 at 05:43:10PM +0000, Luck, Tony wrote: > What if the bit in flags was named " X86_CPU_ID_FLAG_ENTRY_VALID" > > Then the loop in x86_match_cpu() could just be: > > for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) { Yeah, makes sense at a first glance. This'll keep the terminators "{}" unchanged so that we don't have to touch all those gazillion places and it'll explicitly state that an entry is valid or not. But the devil's in the detail, as always... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette