Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp317997rdd; Tue, 9 Jan 2024 05:18:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE44W25TQVF7fZW8EiBfxAMf94P47LXUYJO2aUljVgRADzMVvJdZjig86aScn5UM94ooiVU X-Received: by 2002:ad4:5f08:0:b0:681:14b9:70b3 with SMTP id fo8-20020ad45f08000000b0068114b970b3mr1188347qvb.27.1704806312826; Tue, 09 Jan 2024 05:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704806312; cv=none; d=google.com; s=arc-20160816; b=ElifQQsazNj0JA4y/ObSEi+jQCjkYo9xDUee2xTpqznNgpHiu3TBQWZFgjnPKqnzFr 4RPlHqAlZPUGQYSFVlbnCQ76974ObSG5MiriAY4HNS+MHRGZ1rmRbRrlma+SIMxWx7kJ 2s6D9rvUrL6hZAMcegQNASU4jpVKLYkAi3H42dIJMG4O82Kd+MzpZoP7gVW5hVCyxP/Q WjEcDVYtXqnsDNS+z+vQ9Zj5UpoefqXBIu2bpiI871JTIBl0P/wudL5CbOSni+B3+Q6y nXhPUZu57t1fEZ5X5hB+6nXXwoH32bN/lR/EOEDn+W+uOp1CJlAFiLC9l/QcFO0JteW4 nHcw== ARC-Message-Signature: i=1; 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:dkim-signature; bh=I7VIEYrPSt1QEfJseKShSPfpvN9nQsQTjqFVeshHT14=; fh=03K1RUCHqcBusTrS3s106TL1i37iVEWPw55pl2tIqBw=; b=iAOVDoYXF17xBkQ2Dz2kp5RvzJBP2VgQTkCkLedqjKMOB/amYR9c1FXIUHLVZLkt9C TtQJm7JNB83g1RLH0iBASa1M8Y+tO2sZhFKEToMsU7NDSOMx2UAIzBnZTBIV5RSU3Ig6 jOKu7GsQsypDCrJGAD4AvZ1YPjdS6J6MCATUo4wh4kPywYMLGcWnUyxTnrHxydsKbsfz YKWTnai/ssQz5OGL8quYgc7QdvmdSZafBXnWrNkN+fzaVrQzvamUERGq8np3XryZBtQy ciLYqD5hgcVCnKkNU1wNx3nTO1T3XD+HdRwBNBbcrSy5KCKIl8wA1+UjHIZynUDq5TLu cz2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k4jiLNNQ; spf=pass (google.com: domain of linux-kernel+bounces-20886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r17-20020a0ce291000000b0067f89b1a4e4si2325192qvl.386.2024.01.09.05.18.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:18:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k4jiLNNQ; spf=pass (google.com: domain of linux-kernel+bounces-20886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 91B371C23D4E for ; Tue, 9 Jan 2024 13:18:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6681838FB9; Tue, 9 Jan 2024 13:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="k4jiLNNQ" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 030EA38F83 for ; Tue, 9 Jan 2024 13:18:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704806296; x=1736342296; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=cJPKiirKT9lqC0Z6wFvcgBdIL3HSIWmPzlmahryzrlo=; b=k4jiLNNQT9Xx9hJ3jAVuo5FjN9RLjPKDP6gUJ2p4EH9zN3c8Gjio+mIf rQTC7I2UzFVnoJml4nWHrg/VtaK+X+TPbYWnvGfcWFpsjIWWLhmXH/Bpy RBK6ilbNHU2ox7/X25lkZpRgz4GeTNogDpZuiiRaENpQRpA1bdvYkmlpd 1grnCHv/7ph7WTSyzcpEWH41W/qLfS+V1EhdWrRFYLbGSjPrhCNWzQGjD Fy/FFyJqCuwQBCwNt9QgLuUuLbFu7fF//T5pcEDKBqvM3dzyk9IW5rHcw dx2IL2j43REBA3cvuDsgZgO7svLTC3ipz3lBqG1cJlQVngLH3BzKPs7RM A==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="19697831" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="19697831" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 05:17:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="781794615" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="781794615" Received: from arunjose-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.37.37]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 05:17:43 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 4CB9010A4E9; Tue, 9 Jan 2024 16:17:40 +0300 (+03) Date: Tue, 9 Jan 2024 16:17:40 +0300 From: "Kirill A . Shutemov" To: Kuppuswamy Sathyanarayanan Cc: x86@kernel.org, Dave Hansen , Dan Williams , Xiaoyao Li , linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev Subject: Re: [PATCH v1] virt: tdx-guest: Handle GetQuote request error code Message-ID: <20240109131740.nk54gdmri6gpwkta@box.shutemov.name> References: <20240109054604.2562620-1-sathyanarayanan.kuppuswamy@linux.intel.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: <20240109054604.2562620-1-sathyanarayanan.kuppuswamy@linux.intel.com> On Tue, Jan 09, 2024 at 05:46:04AM +0000, Kuppuswamy Sathyanarayanan wrote: > Currently when a user requests for the Quote generation, the Quote > generation handler (tdx_report_new()) only checks whether the VMM > successfully processes the Quote generation request (status != > GET_QUOTE_IN_FLIGHT) and returns the output to the user without > validating the status of the output data. Since VMM can return error > even after processing the Quote request, returning success just after > successful processing will create confusion to the user. Although for > the failed request, output buffer length will be zero and can also be > used by the user to identify the failure case, it will be more clear to > return error for all failed cases. So validate the Quote output status > and return error code for all failed cases. Could you split commit message into several paragraphs? It would be easier to get along. It can be helpful to follow structure like: -- Kiryl Shutsemau / Kirill A. Shutemov