Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2517914rdb; Mon, 12 Feb 2024 07:26:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEptQ/YEg2t2arHv8aJLC2e+/2QlGc742SCJsh1ILMdnXeNtaimMqq1pnj2auzGzNO/+FhG X-Received: by 2002:a05:6a00:1d1f:b0:6de:3b41:2845 with SMTP id a31-20020a056a001d1f00b006de3b412845mr9518039pfx.32.1707751572929; Mon, 12 Feb 2024 07:26:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707751572; cv=pass; d=google.com; s=arc-20160816; b=dZQZZJTdaI48XJFkM4KqAlzRFikudQCC6nl41i6vweNR8eIbVM1wIR2/GngK6WXzAu QytXcPBiUFwilBql3OtUE4Vfh3hSdpYNeBmEoJovyWtZrYEZBzlfXccVExQH5S9eDrpa YAMBOGXlX8U9C2c/zo2OVrfKV/nqjYO0zB+pr7SLgXHd6BLY2+mybkSToSTvfKVqH0Ko lhsYGyVvPM/A9ZJKoE+wW8KwVa8Csnrh/FU76kk4CsSeSiif0t4+rp3MNmGT926VblnP S4+NuiFYFmy/zbbIvCuRvehF1TegDH27i7EV8lzUbFJ2zujRZNB7ujgTlufSkD/9obj3 3afg== 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=v1glk031wqZcbbm/jOYZ8J2yM9vWz7AxqAE4GGPiTx4=; fh=yAoP3b6xeOTyoi33oHpR2a6H8SHrhtIUzbYQGlluDBw=; b=dCybHsDvq080SdPKIpsMLW7mcPZ5lkCi2MjXe6mbOO2W4VdFhqJC62BWfs1RUp8Icw blKYwNQtMW2AinYbyYOseDPcwIUUENjet9pf8tqkH1/N/iM/TMxLVSaKtMmSOr2cEsMH jQ/zbh4csWRc8THbI5O5VHSnPEHcyBy1oxcnORh7hq5bJr3MPMHIVAGfio7KAL+anQhu HmiTJuVavZ2AV/KOeNRDtjO78n/rS3g13YzKTE+MalCS+OYQr8oK2Y0b/jsbOR073FVn TQy1xCKeFSey8U7Nl1JIzauR3dgRZKigtTy4Ca7EPU+khlo1oSOspHhHsXGfbW5tZV20 6iew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=z1Q3cIZp; 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-61861-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCV5tYxNbO7hzEII+GcNS8OJqLUpaO94KYKmOEzpI9T/e5su3DOzi1ljHYgusm3zQoLVtvQfJSbWctPHCHfXCAQo6dr5CzG4pyLgqN+THg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b5-20020a6567c5000000b005dbcf612461si388897pgs.416.2024.02.12.07.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61861-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=z1Q3cIZp; 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-61861-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61861-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 DE1A9B24E1B for ; Mon, 12 Feb 2024 15:03:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 688763C699; Mon, 12 Feb 2024 15:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="z1Q3cIZp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DL0xfnIw" 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 35B373C680 for ; Mon, 12 Feb 2024 15:03:43 +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=1707750225; cv=none; b=Rm0LXlx86Nh4kqwwLVb0hvDCoGtY5bzYNm2NJcWmB56NL84MAibGftQ3+GTZLu+dl5kbIzICb6pAVNPLLaUaxPmaS3CIj5GZO9twv6XfENq2tYHiSyDJGIN8MA8777S+/nZyrSSKje0t33U//+wlLjXfJkLJQh5bvsxwXfGBi8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707750225; c=relaxed/simple; bh=yLdZ044RR8tzkqHTq1T2/FUjDwuAMQovYCA01kek/r0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=arzjdc0vDU301BFNpEozwbWNz8Q78q2B5VyrVMrp6NVKk090AesZ5BRWEThZ75ceRXXl5tsbPi7byfXbvUrMvshnb9cNKtZG002EQYV45Y9J1leDv9DFTwxc6HHoILl6yFMlKNwFagSI7+bO542BjuphlTg7B2ZL2Wc2ZtmRrh0= 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=z1Q3cIZp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DL0xfnIw; 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=1707750222; 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=v1glk031wqZcbbm/jOYZ8J2yM9vWz7AxqAE4GGPiTx4=; b=z1Q3cIZpknDXRTBZVv2/sOH092ZX7SMy+oAk3dFq0AgvoKq76vWK9yE5cCDWKggrTvnZMA sKLsoinsoJPrhAGnVSEDgz1ePru2xlVwtarnAc6QbWGPQa63vccX4VIw0EqDP3peDy0VaU rKNTp/bTKfHsYAjNcZr8prLo8kpOszZoIJoFMT0sXSlvNWcsLmKVFkzn1kEvYO0gUHuxcx TS8AqZFpjnQ8ZJh7lOe+0i+L9jqkxKpbMvnXmCD7VwDJVrtBQ6OXs4+ao9ONp/5vV0Knlv 7bvM3P1FjjElib1poPwevve17e/wc9SJnBbMVnVyDRXMH5Z5uPppHHaYVOXnXA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707750222; 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=v1glk031wqZcbbm/jOYZ8J2yM9vWz7AxqAE4GGPiTx4=; b=DL0xfnIwOuRH+z4PyPUnb7bEgnertudTfObU/RUGFRSeD/+5XnxyMuc2wQlV5u0ZtvE+N/ 5cHk4Z5p4oPP1JAg== To: Borislav Petkov Cc: LKML , x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" Subject: Re: [patch v5 06/19] x86/cpu: Provide a sane leaf 0xb/0x1f parser In-Reply-To: <87il2tlqba.ffs@tglx> References: <20240117115752.863482697@linutronix.de> <20240117115908.674834306@linutronix.de> <20240130193102.GEZblOdor_bzoVhT0f@fat_crate.local> <87il2tlqba.ffs@tglx> Date: Mon, 12 Feb 2024 16:03:41 +0100 Message-ID: <87a5o5lo6q.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, Feb 12 2024 at 15:17, Thomas Gleixner wrote: > On Tue, Jan 30 2024 at 20:31, Borislav Petkov wrote: > TBH, the // comment style is really better for struct definitions. It's > denser and easier to parse. > > // eax > u32 x2apic_shift : 5, // Number of bits to shift APIC ID right > // for the topology ID at the next level > : 27; // Reserved > // ebx > u32 num_processors : 16, // Number of processors at current level > : 16; // Reserved > > versus: > > /* eax */ > u32 x2apic_shift : 5, /* > * Number of bits to shift APIC ID right > * for the topology ID at the next level > */ > : 27; /* Reserved */ > > /* ebx */ > u32 num_processors : 16, /* Number of processors at current level */ > : 16; /* Reserved */ > > Especially x2apic_shift is horrible and the comments of EBX are visually > impaired while with the C++ comments x2apic_shift looks natural and the > EBX comments are just open to the right and therefore simpler. Aside of that it would make the struct generator in the CPUID data base more complex.