From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 384143E3C6C for ; Fri, 10 Apr 2026 16:51:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775839893; cv=none; b=no5jYfk4VZ5db4sSvDpUAwqCUlX1o23j6hd+D1RuKu4fs/ppjCQNWdu1yyglxCaiRTQt+PzT3oW4Dz4L4PcNH8M+YOmw7twzHPZYUdmm+zxCnEeig1EJCOsX4Fj59NIfSI50W3bbgDHvAEQ2bbMQyJ0BASL4oSdY86CfNA4l8/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775839893; c=relaxed/simple; bh=qdVzseOvTWqCZ+np1uwpYSC5FbMzSZB0d74LiMoUtd0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=flXIBoZyWYKCSXovM1vto1OCSGOwN/rxON59M46EcbKqCWSXrjJm5vCTFXuPu0QT2EyadiLtrR3IiOnnYxVTHZfqi48ufgVoXDsqFnA5lZIKz1IvARikXE274J6b7Q9PdGnSgH60cD8SF2z2JR2EjREhKxamkq5tJDoT8I9vuFc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=c2fTK+Ta; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="c2fTK+Ta" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5074647E0; Fri, 10 Apr 2026 09:51:23 -0700 (PDT) Received: from e129823.arm.com (e129823.arm.com [10.1.197.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F97B3F632; Fri, 10 Apr 2026 09:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775839889; bh=qdVzseOvTWqCZ+np1uwpYSC5FbMzSZB0d74LiMoUtd0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c2fTK+TazfaOYZ3jSTWmVNW1wplv3FpCrvaAgb28d29sxEmAgsCDF7OgHKd+mNjk/ tOqOVR2tuUKOd6vuV0hSpZs8nFu/BeCTDfno67+foQKUJRhDBmn/zkSAViUW4S5vXv OxGBLhyLgX8VkyV7+mOOMMxDhbekccZTwjN1rZ3A= Date: Fri, 10 Apr 2026 17:51:25 +0100 From: Yeoreum Yun To: Sami Mujawar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, gshan@redhat.com, Jagdish Gediya Subject: Re: [PATCH 1/1] virt: arm-cca-guest: fix error check for RSI_INCOMPLETE Message-ID: References: <20260410163636.259443-1-sami.mujawar@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: <20260410163636.259443-1-sami.mujawar@arm.com> Look good to me. Reviewed-by: Yeoreum Yun On Fri, Apr 10, 2026 at 05:36:36PM +0100, Sami Mujawar wrote: > The RSI interface can return RSI_INCOMPLETE when a report spans > multiple granules. This is an expected condition and should not be > treated as a fatal error. > > Currently, arm_cca_report_new() checks for `info.result != RSI_SUCCESS` > and bails out, which incorrectly flags RSI_INCOMPLETE as a failure. > Fix the check to only break out on results other than RSI_SUCCESS or > RSI_INCOMPLETE. > > This ensures partial reports are handled correctly and avoids spurious > -ENXIO errors when generating attestation reports. > > Fixes: 7999edc484ca ("virt: arm-cca-guest: TSM_REPORT support for realms") > Signed-off-by: Sami Mujawar > Reported-by: Jagdish Gediya > --- > drivers/virt/coco/arm-cca-guest/arm-cca-guest.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c b/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c > index 0c9ea24a200c..66d00b6ceb78 100644 > --- a/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c > +++ b/drivers/virt/coco/arm-cca-guest/arm-cca-guest.c > @@ -157,7 +157,8 @@ static int arm_cca_report_new(struct tsm_report *report, void *data) > } while (info.result == RSI_INCOMPLETE && > info.offset < RSI_GRANULE_SIZE); > > - if (info.result != RSI_SUCCESS) { > + /* Break out in case of failure */ > + if (info.result != RSI_SUCCESS && info.result != RSI_INCOMPLETE) { > ret = -ENXIO; > token_size = 0; > goto exit_free_granule_page; > -- > SAMI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7} > -- Sincerely, Yeoreum Yun