Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2507288rdb; Mon, 12 Feb 2024 07:08:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQgDvAB3RY3JK5w5NGYdcBxVKYDNCh4as+SggMW8oV3ZGVWTsIl+IvFy9KMKc8VF22a+fX X-Received: by 2002:a0c:de14:0:b0:68d:1859:f77f with SMTP id t20-20020a0cde14000000b0068d1859f77fmr1216532qvk.24.1707750522271; Mon, 12 Feb 2024 07:08:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707750522; cv=pass; d=google.com; s=arc-20160816; b=jug7/2IofT7sI224xy0JAroIfeNSa7kQoClhp5c22GCsFjcNiHzBJBS1HkCKcSzX4F 3BwNAfTXGJzkcD3UkuN0C1pbnxSPHGFJsqTZt1fSi9CiP7zPrucojz5SQHTiaKb+z40u +PqT0VF7WoTTr3IbRCZrzaMOynKQPEYb8foFqJo2fQLtBZWa2wxCf7ezdhO8dXo+yrXU +dSmwPXYJnRtqDTvkgqflY16j9U3XsVZIpKBdcqzlT6N7AkLLLEb+ADyBrzs5WKSAITI WqWdqNyxnEFMmLs4UUnpLuab6/9Qwt3xzbrn52pQzvZLuia70tARSoSeTRaG1T1zJp/T Ue7Q== 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=C3NiDZ+KHPgo640GV/RsQI0vce8s6DSpW2uzrRS6dmA=; fh=zplVcGu52SuS5DrrmrJaousUQ1AZui36PgFDShB3LUs=; b=gqwdPZaCmdY4IBGP9xBJuDiavmh8xqUF+VvO49MqJF3Zukt84n/aFQsV8tsCrlAH8h eq5LWMO/H6lRUAPEti3XspBRVB1WsJMkaeW/uTGA9oSjAQ5UrYUr4wE1qwZ4kP69EulY TMq4Hz5s0Tc8J7G3NLdJrJK4d1KEzdQ+Um2Tf1gMnrkyKE0WYH0RgoMRsLkxLgw+eNTC RQ/kZk3nwT1NZXW7mgoVgV5RkNwCnHFMLpZsfSesqTF1eC3jJbUrzhvX8MpU305sNeId 1gySfNg0aWWRWivA4HvVMMzsNkX6B52yf7BT3FZTc/3a62aEt+5tMIIGi2/nHT1Z9jOy MlZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WY2nOOXl; 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-61873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61873-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; AJvYcCXgsDB1ipGwk+RlUSVdhvD39FmnSYp9giEtBdfMoSEbGTI6/+o/rPBvqjsHwEA/CT/uBAT3YhmOSC+zmVU/su9iGcPnDxrCZnxKZx+JAw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gi8-20020a056214248800b0067f6f831c13si562418qvb.219.2024.02.12.07.08.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:08:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WY2nOOXl; 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-61873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61873-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0877C1C219DF for ; Mon, 12 Feb 2024 15:08:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C727B3BB5E; Mon, 12 Feb 2024 15:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WY2nOOXl"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uLQ3jf8I" 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 9CCF33B797 for ; Mon, 12 Feb 2024 15:08:33 +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=1707750515; cv=none; b=Qxl8mc3Qzs+Y3IJQ3gbSBE6Ssnvp5uwSGaTBprOiCkxbEG75h3ekGAO+oh3ECiTUEn/4yxQOACkUfWbBG9WlqvUwBlCxyJm/DI+rKH+UczuHba6akZgaW+PYOiqjAC7iCpF0RiBLUDJuIUyFYwolTC/NloRmyrhvki8PT5aGZlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707750515; c=relaxed/simple; bh=/rvn5jicE71XyqvaOd7yAVNV1Vin691oFFChx0vgNUw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=a9FlAqnN3n33AxiBObIEVJoDwlJPEbwig5uxd0FUoQoa+St2Y2FoVhhiRYB2CWTaUslJz4GwI1/VcWwmrB6nhLQ4joT2IC2PFIXYYmg4KJ1YVDnwFJ/l0LJgVx3s8lC44D/rkrw9PDmxe4QpE1LrIgUI0oL+x7xxP7UxLNIejQ0= 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=WY2nOOXl; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=uLQ3jf8I; 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=1707750511; 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=C3NiDZ+KHPgo640GV/RsQI0vce8s6DSpW2uzrRS6dmA=; b=WY2nOOXlSebe5e1JYkmk0ykHg9GrGIjsEtnLGngNEEslOVwCE4Vm3JokH1qONzJTrpziB8 weEWerFFmvAKYb6LScYt/AJTiNHq/HCZSi7x5E83lhDqjH68YtE/SdhdvUm4r+QTwa7gmd 8scppCBk2qoRPXD10UXv8+tQU9zEaeNVmt2j05iyXIfc3Typt/VHGG4JnC5OtJaguEVeVr DC+ZMJa/PUFcT0bdbJyHpTJnzqb4TQY5sS70ms7V56zW2NDtCKPv3iqWOZgB0hFMOrVOOU odE/dbQZavGhqDd/OCUgIUe6chioHeFG5M4iKzYDfG7YkBPcicesMZTPJYqYBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707750511; 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=C3NiDZ+KHPgo640GV/RsQI0vce8s6DSpW2uzrRS6dmA=; b=uLQ3jf8IP2FaT6Kmm8Ud/6bOJGaxVphsPr6g9fQPOU5FoYyAiXioVa9+4Ur7pvwJ5Rm6aT dCpv3+gygDAkD4Bw== 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: <20240212150053.GEZcoypaBQPB1IcZGY@fat_crate.local> References: <20240117115752.863482697@linutronix.de> <20240117115908.674834306@linutronix.de> <20240130193102.GEZblOdor_bzoVhT0f@fat_crate.local> <87il2tlqba.ffs@tglx> <20240212150053.GEZcoypaBQPB1IcZGY@fat_crate.local> Date: Mon, 12 Feb 2024 16:08:31 +0100 Message-ID: <877cj9lnyo.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 16:00, Borislav Petkov wrote: > On Mon, Feb 12, 2024 at 03:17:45PM +0100, Thomas Gleixner wrote: >> 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. > > I'd say, put comments *above* the member versus on the side. We don't > like side comments, if you remember. :-) In code, no. For struct definitions if they are strictly tabular formatted, they are actually nice as they are more compact and take less space than the above member variant. // 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 */ /* * Number of bits to shift APIC ID right for the topology ID * at the next level */ u32 x2apic_shift : 5, /* Reserved */ : 27; /* ebx */ /* Number of processors at current level */ u32 num_processors : 16, /* Reserved */ : 16; This really makes my eyes bleed.