Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3240587lqo; Wed, 15 May 2024 04:10:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUp+cWD/lYNqqEj4sfvpgebGU68mqariZZhEIzQympfb0ny66goPmmnXurwI4mlznr3IhEZC77TXOvLrLFDyXl23L+Tf6wUDlfpO8hh2Q== X-Google-Smtp-Source: AGHT+IGwqbBmWR2OM8xf19eDZ4XHNAZtjVXwuCKhWGGVq1XjwkE+Zn5n0mEgKP2R+g9ndzk2wYaW X-Received: by 2002:a17:906:d7a5:b0:a5a:88ac:fbbe with SMTP id a640c23a62f3a-a5a88acfc17mr308339266b.46.1715771418905; Wed, 15 May 2024 04:10:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715771418; cv=pass; d=google.com; s=arc-20160816; b=W9NPaCXRrnWm+O4o5EemsymrrpK4gU1YFqqbxFmnFoj5T0hVpi6bB8U8phFyQn9xvN yfqCLs+RgVJcgod1VsOXgiTN2uBg4sjH8EfBgeXQL7bjmJnc7x1Zvs7PUul5R4Z6LXZn X6X2KAmZ3/VsiTCmOFPCoz1HD9RtSoTX+TngSU5MXXmvIWTt0zXwvFjVy501HP1SXKd9 EIotusT1cFb08G0nhk9fERmulaHpKEx2KORfey5IPvS23trMatw91TC9egjF42zxh3gk u9OQC2cjSg6OZNhVOt/hvHrDKLf62j+2AjRwhrx6+k7RIZ2rC0O9FJVUZEzvnKYufIgt nBcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=sRsPr/yA7H2gMGB6uE5QplV0xzf77e+GfJyq/YyGzrQ=; fh=9FPoVR/+WGNoiPiXGvmNlZfnZ7MXEMqmHu07FnPII3Q=; b=pHWb4JSZj4kzLsaQHknHudidoCq1vSWod6jvJHiRgI70uTV/Aa4aEDKgbOJGdrN55y Vt5iQ6gjd2zGZj9qqSqktX99AwJLfT+2i6pDoyPpU7pDBb2gT2lm3Z/O1KLu/ZHpUygL C7zxpN7VpANUifWM4YrP1enkbYk8lQcLtbmqUTmZoEg994wUUO2ZTbF1iTRpKnF/wxOj IqQZ7SJH/VdFdDW3bLEpF/wQUCYsBRAIG6mgQAtI/3II19khMYzZKXbrmpGFBDSEJDrZ OIfCHBeq2pT5afUEKaRkeAJG1pXmRdKxrlmdWEVh7Bn6xWlAEQbav0RvYrSPXI4YfaA4 mGvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a885f413bsi162135666b.824.2024.05.15.04.10.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 04:10:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9F83C1F2211F for ; Wed, 15 May 2024 11:10:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6048B6E617; Wed, 15 May 2024 11:10:08 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CC3985BAFC; Wed, 15 May 2024 11:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715771407; cv=none; b=NbkGOdqfq8hFSrIm9dKnQ0dVWuk35bZMcLO+fR2UJeEzgCKwSnsa7Cpm9mVe/0uUK8AKNySBYovlGJ+KNibrh2cGyRaAA034KNVi9jmrC8QqgO1hmQWpZPnMh/iirjoj191QmZ66ZFHbVStFVTsYtGOjnAi3IMOqZq80oixnvpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715771407; c=relaxed/simple; bh=DaChnHbMuBT0EbeOyLIHANpkyNbg7flUDNy6OkASHSw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WsyNHvMCm8HRVOpp9h1Wyb69cbI/4oDK4o0k7wWFU58iswVhZ/VlQvmJupoRKyW0pqB+FH5tlVmM+ABrxUUHh+v3UTWL+yHaSsOqe32y33uPvv3MRzWdNnbS8575RwqtGCYdR8FtSXg/cjT7PAY//rTTgKA1PRW53LHa2oZiel4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E049C116B1; Wed, 15 May 2024 11:10:03 +0000 (UTC) Date: Wed, 15 May 2024 12:10:01 +0100 From: Catalin Marinas To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Sami Mujawar , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni Subject: Re: [PATCH v2 13/14] arm64: rsi: Interfaces to query attestation token Message-ID: References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-14-steven.price@arm.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240412084213.1733764-14-steven.price@arm.com> On Fri, Apr 12, 2024 at 09:42:12AM +0100, Steven Price wrote: > diff --git a/arch/arm64/include/asm/rsi_cmds.h b/arch/arm64/include/asm/rsi_cmds.h > index b4cbeafa2f41..c1850aefe54e 100644 > --- a/arch/arm64/include/asm/rsi_cmds.h > +++ b/arch/arm64/include/asm/rsi_cmds.h > @@ -10,6 +10,9 @@ > > #include > > +#define GRANULE_SHIFT 12 > +#define GRANULE_SIZE (_AC(1, UL) << GRANULE_SHIFT) The name is too generic and it goes into a header file. Also maybe move it to rsi.h, and use it for other definitions like rsi_config struct size and alignment. -- Catalin