Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp233502rdh; Tue, 13 Feb 2024 15:32:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUp9WiYnUoXJZeh6/5Ppw7rAFv1lbJxyFs7P9p7w5YPlV+fln6st26ehlx8wtOVF4K16DbWm7CNMT1naTnJZ0g0K0BKqQrq5fRs2LZ3w== X-Google-Smtp-Source: AGHT+IFiaPMFeeOkTx+AbOm9fFEDxgnuqJWzfgS2alC3HYNhq8xDmHDGhIMbbDR58LY2XQAzvNnh X-Received: by 2002:a05:6a21:398f:b0:19e:a9c2:e0cb with SMTP id ad15-20020a056a21398f00b0019ea9c2e0cbmr489645pzc.25.1707867135085; Tue, 13 Feb 2024 15:32:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707867135; cv=pass; d=google.com; s=arc-20160816; b=CUIp7VNRgnNrgjUj8vct0IsUH6qrDQSrHX9WYDskU+rVRD78FfeHjeqxO8JrnGMuhJ vgfmdRtZd9PKRgu6qDwqJsX6bbFF6WwCCne/3Npq93Cqcg0Jx7llGYXUivA103NgiY5k a9ZTDaXzcTOwcHub9j2RhUyJwK8LLtumGQLlD2DCF3eqFSfEnPN/iRHauBjYmdW9QMGV Vt7ZaRcBHHgQXGgJ2B83kS8IlEO18x5FYCq+gPHTnoMrTddfmXEDozIsQzo3H9T/0/vU kaPZHMcecycN5z6jH5RCFjdQ5CiMUn/IDANavXGM2TGckCih58thTuyOwK705NKbwimD aZ7A== 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=rU1FgLsKHAJWf7CpAomdWuiPOAofXzn8IOSddAMdtG8=; fh=kWPENI8rqnu7LExuEVoAsoZhJVC/qe+RxIxP4Qe7MYg=; b=MDPF/PkDOL+LG3ftUtBd4fbd7DCGoPEPCcbk7ofuxKHGcqi7l+gqHDvoeFE95rIyss wirztEUCxlZZmPv0nplQ03qJGFIkCm5J7eje4h2Pmdvd1kKTdhL/x/C7ko9Mh8TB/xKB lrP4FO29wKuYN2vLY2U8EJ4XMqQ2/UOjJvyUks9QbhkGfl8NtkCvPFCsKpfbl2zFMLqX xae8Q1s8AAUQL44uOO00PAAOaboKVYjZYtElVDFwY8sMoFgacYPcCoZpS5UjemJuOodn J+HHHMQGGz7qNRHLLU1lopn6mjDfm5lVQ7QqrEFLq8w9bMkt8jNhILSBFGaOG5n966Vp rdGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Buqv5oDt; 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-64545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64545-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; AJvYcCWGKnz5ZZp1H0clGNyVfVmefGMT5crhy9ints93VjGcK30omkFh3hg4PSQOpgMkH97QsX/dGe0Ikogix9ms8HSqu88P2K8ZxmANhzY5Cg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jo36-20020a056a0090a400b006e081c9be0fsi7493324pfb.392.2024.02.13.15.32.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:32:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Buqv5oDt; 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-64545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64545-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BEE0C28366B for ; Tue, 13 Feb 2024 23:32:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 058EC6310A; Tue, 13 Feb 2024 23:32:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Buqv5oDt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DrTzMJIu" 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 C38B963103 for ; Tue, 13 Feb 2024 23:32:07 +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=1707867129; cv=none; b=j0OOFETEy+E00MfDrCVN2Y4gD4iZeDH8BBG5ycU34YR2LFuxdLOxLz+hTG2GNUFMFXijR7oFdWreFDmjhOH0HIfCXLYd3a4DCDLAUrKzh2gtdsjjLJtP7HPkByg6xmARlePxIeyzbZ/jnWFntjMs27iVBJpX4LYaw9UfK6M7CHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707867129; c=relaxed/simple; bh=FXv/Vo1WmMGv7AFSR6AVe33vs054JP6t/z3Pasq2Av4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=e5QkiBs5PnRElJEGi9lISxV3Fa6QpitQaz2ZhfV92jB4bIcEvNz0/R0GkB53icSDQboN6a1GEVuorEQnK1m6t0xM+d/PKzduyx0FW6ZvYECESK+UCC8XxkFcTRroUYu4LEaBUxJrtg5NtIuyXBNSRZJQCE+JIWyvEuylTN74g7s= 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=Buqv5oDt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DrTzMJIu; 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=1707867125; 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=rU1FgLsKHAJWf7CpAomdWuiPOAofXzn8IOSddAMdtG8=; b=Buqv5oDtIzARJ+pHYK5j1F/pjwRYnFB0SQEsFR/fcGXtcPuiNOUur5fkFcXvFmspx24SkH 7C8cR/Ums7FFjC3axtlc9jT34096Ul3rb4PhooOEQjMJm6k6ayMndGoSUP4Fo9EL2HMH5u 4N/FQJTSRhwNljeF6x2XEOUwJk5gAoAxtJBTtnRmp+m4b2EqZoLpals+KBjN6XuodJtCMT gxZb7PCwPJRK8Rx+DBGonH+MKdUs6LhKAxFqHIL25ZZoKTKdmo/E/IeJjn949ejTXW6zND NOJRmP6Kq+lmjKexKpqdsBcVYE10rG3NHTDDPoLMJh+uBsHMPKZi8sEZkjvqcA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707867125; 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=rU1FgLsKHAJWf7CpAomdWuiPOAofXzn8IOSddAMdtG8=; b=DrTzMJIuT/de4iUpRBFmLXj1J29CdpEOLZz06FYaNFW4L3ep2tEofYYDzdMIyH16hDd4nV YCfhqP4307rJO3Dg== 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)" , Wang Wendy Subject: Re: [patch V6 01/19] x86/cpu: Provide cpuid_read() et al. In-Reply-To: <20240213213650.GEZcvg8uvjPXTVhmHv@fat_crate.local> References: <20240212153109.330805450@linutronix.de> <20240212153624.516965279@linutronix.de> <20240213213650.GEZcvg8uvjPXTVhmHv@fat_crate.local> Date: Wed, 14 Feb 2024 00:32:05 +0100 Message-ID: <87v86seya2.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 Tue, Feb 13 2024 at 22:36, Borislav Petkov wrote: > On Tue, Feb 13, 2024 at 10:04:00PM +0100, Thomas Gleixner wrote: >> +static inline void __cpuid_read(unsigned int leaf, unsigned int subleaf, u32 *regs) >> +{ >> + regs[CPUID_EAX] = leaf; >> + regs[CPUID_ECX] = subleaf; >> + __cpuid(regs, regs + 1, regs + 2, regs + 3); > > Yeah, > > __cpuid(regs, regs + CPUID_EBX, regs + CPUID_ECX, regs + CPUID_EDX); > > explains what those numbers are. Oops. Sorry, I missed that part of your previous reply and just responded to the u32 *regs part. I'll send an update tomorrow. Thanks, tglx