Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp796286rdb; Fri, 2 Feb 2024 04:32:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcu/hbNrCFlCPBCVZZ2M0BOtggQ6uj1113X1kBnY/6WdyAnjkw66VKgWTYFntNZKZE5lkn X-Received: by 2002:a05:6808:1649:b0:3bf:bac0:1022 with SMTP id az9-20020a056808164900b003bfbac01022mr3283007oib.25.1706877122877; Fri, 02 Feb 2024 04:32:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706877122; cv=pass; d=google.com; s=arc-20160816; b=Gxd2sLx3KXl3++/JdFuhU4qK74SlV8Fq9P09Q2AdOOK36LWbz+6HFb7d+MqJI8XX57 n3EJDXnm3EN4R2dBfqK4HMgUNiwfuEYGOndkwHeZkipMLv1unQhfgWsvzNhf8uDj7qnt 6zlG0Wpk486RuVtlx8+iH/l8riY6T/0qdUNAtlhHH/dy4wS0/DWxlUFtrAoHN4xG6Lr6 6y5OTITgdxk6yuB4YxJdFMci4kmzxVGUHkv8b6WHv1ppo8UojSSl1/AzgK5XGm6Z+AhQ Luabb2B59Tbb/5jqDwDLV/xop44hSOaGG85/4eBEhVmMODxvvq7q1taLNvPAtdQrxvPd q/Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding: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=sBhH6oDjRqJU9W1pnGOmnI8OCU06jkx5sAArSOqAJMs=; fh=LW1+WveImC9OVEKgDDimoHqz+7BCHuf9cqXnTXMbWvs=; b=miKSiM04R6NoqEt0epjsEu1mkhk3mAn0LdI76xDQVqRqE356VClrIGQ9g2zJIGRNBY iM+NegFZyCdYrnHXR1LKyw8KWlDooJgngE505MnxEwsPP6+G3se9oZSn2+oexWYd/SPB dzpIe0NsXPp32RqCl1dkOuVVwikW3zey+BbP4lEc6j+W0zFPUGwQgMUJIpKBJnAfZuel fQ99RGAiXKlS8tF9hskvUvmZNvQgcbIJ5jWw8F6be+/mQk6YmggDgbcFo5DwZjtc3Q2d B2uCoqXp+HbNo5OEcL6ZP+ItoznFdB3AIRpI/YlTEhwrmIPo0aeU2PrNFD7yM1ugKQBx Zz7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=D56drevp; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-49845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de X-Forwarded-Encrypted: i=1; AJvYcCVybOVRHBsl+Aw1GEpQ5oJ2L3w+KPrHrIP7dcPo02w5nrACbZFy2j+QwSzo3JjHXYyLH9QlYZoHa7EvLF+d0Fz9CYENNVdLsUfAppkcTQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a4-20020ac85b84000000b0042bdfbf7785si1894075qta.406.2024.02.02.04.32.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:32:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49845-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=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=D56drevp; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-49845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9CC081C22279 for ; Fri, 2 Feb 2024 12:32:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F33717F6; Fri, 2 Feb 2024 12:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="D56drevp" 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 CFEAC4206C for ; Fri, 2 Feb 2024 12:30:42 +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=1706877046; cv=none; b=gfyqMDE/o+dy9sfxZym30trNSBRkESN/XM4ZiNrsVvVgOjb6Iiw3+0L0TmH/V/vau2F/+ylMPAT4tiYXukZGCB2Vq1WZs776SYA14icOa1rD2rzUaPw3XswsexaFr0gk+3Q2bsRy7aKPBBKbw4bz6x+NdBUiXZuKe8TPewrtrzU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706877046; c=relaxed/simple; bh=6kSFMQfQ6yQnGE0Dw7Q4P+dZOQf+sdUi8tqFp7CM+Mw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=njT5JaWsfPHx7X3KKJW2nlD0aHWKewM6WJ8LZIp7vP7tQfFF5xaSJE+6ctFBZq7q/nRPKDF0P6SBKzd38IK4XNuOU2dFz8HeDbjgFfINL/g2sn2Uwsf+Rky/mvyJ7RWM86tlXijkL7UDg6ggRLvDtrytAViuJYTVXmizolbgyT0= 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=fail (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=D56drevp reason="signature verification failed"; 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 D5C2540E01A9; Fri, 2 Feb 2024 12:30:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" 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 q8sUyCQ-xDJ6; Fri, 2 Feb 2024 12:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1706877037; bh=LAnMzrZs6f7RGntop7h3m0eQMyoneTWjdlZan+jFKfU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D56drevpdtRq1XgIpZlwYvi7WxSfT7P6hUTd5mxlwFf+YMxwsgFr1B2ChDX/7qC67 vfF6XZtUv0oGpQ+6nJrqClUMS8xyif5OmupiwwCewgp/xy4ydsBEkN4GePx8yxK4Ml ORaG3FEYvcgG9fgRS7CkL7lSUqdJngE9pPXXLeCyNXjJejWg2hBXY0BT+OsnPoxgn+ LLtWc9GCyfQmm1ZTDYiRM6tLrOJavaA64LmmxicGmSRtiGAJHYG51mcun9SebwrWPk P1WVZ2LtuulUtUy2vDkUO85/Meq62eu99IdT8BJvsPta463pywenL4OcRh+ESFJohU NSm0H6uuAZAB0CM9VD3xEfZWLsz7AZt/f9gKUP5dy8XhZi+eaRezdOjpdIsKlgrjxv a3s60Q3sB8cye6iXhApC3rch3Q0QU45oirO1Mq2IAG5wCFcACAVATTX4caDkZayEok F10xPx0q5qKH3wTSOvYONs3J+S7+u9nSLxqYdVZx56Ihf+KwKvkau6BbPsrdNR1p++ aAfSIvQcS+Ha6Cim3hd6cB5fxwD56f0im2A/eFcuCKRsladiXvHXeQjuqFkkdnwOJX cEY+m13WBaAZDlNJzraQDIbstj+LLxHgw+mRPAs7ZlRcXzdEUj+n9ZyxtB9X0+c97O FJpeDDS8khy322bT1X/c0qz8= Received: from zn.tnic (pd953021b.dip0.t-ipconnect.de [217.83.2.27]) (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 E80B340E01A2; Fri, 2 Feb 2024 12:30:18 +0000 (UTC) Date: Fri, 2 Feb 2024 13:30:11 +0100 From: Borislav Petkov To: Thomas Gleixner 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 09/19] x86/cpu: Provide an AMD/HYGON specific topology parser Message-ID: <20240202123011.GAZbzgU8jqAYiTe8bH@fat_crate.local> References: <20240117115752.863482697@linutronix.de> <20240117115908.880472059@linutronix.de> 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: <20240117115908.880472059@linutronix.de> Content-Transfer-Encoding: quoted-printable On Tue, Jan 23, 2024 at 01:53:43PM +0100, Thomas Gleixner wrote: > +static bool parse_8000_0008(struct topo_scan *tscan) > +{ > + struct { > + u32 ncores : 8, Yeah, so there was some confusion what this field actually means. It is documented correctly in the latest APM: "NT: number of physical threads - 1. The number of threads in the processor is NT+1 (e.g., if NT =3D 0, then there is one thread). See =E2=80=9CLegacy Method=E2=80=9D on page 645." > + __rsvd0 : 4, > + apicidsize : 4, > + perftscsize : 2, > + __rsvd1 : 14; > + } ecx; > + unsigned int sft; > + > + if (tscan->c->extended_cpuid_level < 0x80000008) > + return false; > + > + cpuid_leaf_reg(0x80000008, CPUID_ECX, &ecx); > + > + /* If the APIC ID size is 0, then get the shift value from ecx.ncores= */ > + sft =3D ecx.apicidsize; > + if (!sft) > + sft =3D get_count_order(ecx.ncores + 1); > + > + topology_set_dom(tscan, TOPO_CORE_DOMAIN, sft, ecx.ncores + 1); So yeah, this should be TOPO_SMT_DOMAIN. Thx. --=20 Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette