Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1959686lqe; Tue, 9 Apr 2024 06:01:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/IA+ciP6orCIDYjI1EMBb7oxKPM1u2HFTHnHEoQlOvHrUy0gp46M9NfK2q42JkjIV1YxZMtawhloJVkig8CYQD/soNT/juVGG242TsQ== X-Google-Smtp-Source: AGHT+IGnaL93snQOqoofENpq5NIy0652/+xkr8/r5YfxMxzLnk+lsi2MhcyvH1a/WfNSYxSTr8Iq X-Received: by 2002:a05:6a00:22cf:b0:6eb:3b8c:8fce with SMTP id f15-20020a056a0022cf00b006eb3b8c8fcemr15453219pfj.32.1712667702835; Tue, 09 Apr 2024 06:01:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712667702; cv=pass; d=google.com; s=arc-20160816; b=qRJv1NdiC+u1IswzjNd6/PbQTMyyvCmY8LG5pQqLVq5Q4W8pU/lW7vNN7rNkx9AWxK DDfZsDNgy2rMt0D/7P6oTXLQ9wIeIj1GRCeJ2gBPCshvtfkRyj6srjcqvqQC88PSrF2A th1lP77iN6OaGPPM3QgvyCHuNj5PbKfYFNo5EIdb4HRzAake4vID/Sdy1sTa92kG4LST PAqkGqZzRBWqAevt/pe1eehPknGAiFgr7oCuQrt6mhz8zrnpkrc1KbAAIzUWznQu27D1 GP3dSdmg9MSBELHBcEPfjcIdxAGlygiCXnxXg1Pmv+EoGSqnIi7GrHvpH+peL2520e25 +8mg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=3yKMAvfXpqgOmamqJLFQyikdCqDJcgZrBM+Mfxzj9Ao=; fh=30c5PLoQ0wZhpepaLcTTKFp5qgAhT70/ixOZzvrgxpQ=; b=fySZ8NkiasMhpnXJC1BSGqI9+FlgCPhDbWSoGhyGDPB1XnM7flANv4NBpvUfvj6aUv mnzMJdxCZboPyj4rpVzEk4QNJQPERvQAGVVM+MudggnyGqyFG0fJRWgpXPoEUNRFEVEu ResU8RbE03nEn6z5kq3+FPxRkjVVLKeM73Qtp0yCPD81Vi+LVtIFpqSY0F8BfAWAK0Yo FCtLCd/uM3uNBlXG+SiTQOLLPuDsFvwn0SOBYw8PSWJlrCojsSzYF+PMPKwoahv6QmTi mk82NX0uHEZrYOgn9wHCErOkN2wNrUYxTglh1Y7BopNpW//MQqiuHaaI9BzuZqYkOQq6 1vUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nMba09FJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h28-20020a63385c000000b005e857e42aa7si8641163pgn.55.2024.04.09.06.01.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 06:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nMba09FJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A4660B22583 for ; Tue, 9 Apr 2024 12:46:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 730E212D755; Tue, 9 Apr 2024 12:46:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nMba09FJ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PcPEC9yZ" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 418C51A5A2 for ; Tue, 9 Apr 2024 12:46:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712666808; cv=none; b=VRL2O/3KVQvL7PfPouwjYN9b8E8xCKGa9swzYWMxj5KuY0f5330Llkc5o73WYwu55Hv1+GO5skKURo1hfvzJ9gwvTjGZQdGcGg5dZQJW/CBDX0qPBNrcdKJIy6k0s+MIXrCiZw/seLGghZEiUVYhldVKah1NFz7uNnfRvyUoqR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712666808; c=relaxed/simple; bh=hhe7bULcS36WOlmkF3amud2uzGxOfHlptakv8AMY3UY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=R0yoPjT13U//TLtTBYektvHI3oMsmZvKj6EBd04EVRpAq42zwJZdPB+UB7S/BEmMpkIZhMibo+hu8Ifgn4UszHM6yYYb0MWykzFynhNrOcaSBzVbpeP7koRjdU0TrEyTysbMV2b5jse3LB/3FJl9hK+eY6q7xw2kxqUGhKfl0EE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nMba09FJ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PcPEC9yZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712666805; 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: in-reply-to:in-reply-to:references:references; bh=3yKMAvfXpqgOmamqJLFQyikdCqDJcgZrBM+Mfxzj9Ao=; b=nMba09FJQYdaCAVkYKbj9HT6E+sKW7ycfzjgm6hYsasNpU24kFEfkucAVGaXQJuO3Q9Grm lXCMpqYjj9DwNGiKVXfy8BLTi8iPmHTTdYvnHvf25ZYJ8DASos0zPx2g2luR9MloVe3NEL wVKkC9k5Vu0D8bKT7gS6gC5l+NgrLrY7MjPIxO0E58JRG1ldqDYtTme7zb3EAGa/DPOBPx wXMxANlldSKaYs4LMvzPMMHAWj77azMYTKonB6urFLNJdE+opZIAl/8iUwUMidsiuM2+pM 66feTrCDlk5WFFIMRx1D0XxAigH4rqaGq8+hZK0x03SCwqyFlhekC3C6TuRt1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712666805; 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: in-reply-to:in-reply-to:references:references; bh=3yKMAvfXpqgOmamqJLFQyikdCqDJcgZrBM+Mfxzj9Ao=; b=PcPEC9yZbT0DgiSOMVzN5gDc6MDVIWlZhamj8ZaxVwg/xZaJXTDVHs1Z3Ki4ecgthXx9DN ep9A8zdj9BPV2LAg== To: Tony Luck , x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86 In-Reply-To: References: <20240328163746.243023-1-tony.luck@intel.com> <20240328163746.243023-2-tony.luck@intel.com> Date: Tue, 09 Apr 2024 14:46:45 +0200 Message-ID: <871q7e7lfu.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Apr 01 2024 at 11:23, Tony Luck wrote: > Refactor struct cpuinfo_x86 so that the vendor, family, and model > fields are overlayed in a union with a 32-bit field that combines > all three (together with a one byte reserved field in the upper > byte). > > This will make it easy, cheap, and reliable to check all three > values at once. > > Signed-off-by: Tony Luck Reviewed-by: Thomas Gleixner > --- > arch/x86/include/asm/processor.h | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h > index 811548f131f4..4c5d166aa473 100644 > --- a/arch/x86/include/asm/processor.h > +++ b/arch/x86/include/asm/processor.h > @@ -108,9 +108,15 @@ struct cpuinfo_topology { > }; > > struct cpuinfo_x86 { > - __u8 x86; /* CPU family */ > - __u8 x86_vendor; /* CPU vendor */ > - __u8 x86_model; > + union { > + struct { > + __u8 x86_model; > + __u8 x86; /* CPU family */ > + __u8 x86_vendor; /* CPU vendor */ > + __u8 x86_reserved; > + }; > + __u32 x86_vfm; /* combined vendor, family, model */ > + }; > __u8 x86_stepping; > #ifdef CONFIG_X86_64 > /* Number of 4K pages in DTLB/ITLB combined(in pages): */