Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3809824pxb; Tue, 19 Apr 2022 10:13:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMzxSF0SWucU/+ppuh6fTb0el1x2+AKQsKQNuIhfc9crwDEw4kN3N/SHyuS/R0MLardONN X-Received: by 2002:a17:907:ea1:b0:6e8:917b:6b6f with SMTP id ho33-20020a1709070ea100b006e8917b6b6fmr14147362ejc.409.1650388416960; Tue, 19 Apr 2022 10:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650388416; cv=none; d=google.com; s=arc-20160816; b=Ae7I7vOWVTK3qngeEWfxIdBXeKLafhzg91Gi6K6n3in3wawzd6XCPs2yMO9eFYz8u8 M+H7mXwByzDwUHD3qdLBjpUrJhjm1JK+VJuzeRvyRnKLuDgxwCfHo43P82zPd1uzFK9n gemcgcpxtvbvPovxWH6jIY98yPFKs1Fe+jxwJcvvb9cagP61upREpDNgb0VkMf3LJMUQ Rt6aL5NDG7gI3A+f8utYn/YZJnwrSpE7ZCmgD7AVNPfx1q+4g6RH5yf0iDo/svb9Aj9I 7M6+OT0SH+Q/W1Z5uY7ph0mwID+2m0/xM/ZPCptZYjh4rkvbHvcDBZBACAE8x0j7d2Bw LA+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=i6+WFTIgXaeSu1ms9vF/74XhCOsrdDKV7jDAYqTTPbc=; b=MwfrrKCVKuDIoTynuYSd8yTO3S/+D5Kmk9imTBBUPALkqcw525b5TtED6xX7Zxrjmx VpZh9EZvkCeF44sI7jF4Ujtx3R8dMDkNu14+PZQL9okEnDhB6bFffgJbLlElQgK++2o7 ePKED9kn9MzD0YFiXMBjJBel793iazxI3+UzhEx1ZbLT79Nen4qCrxdK70uWechGdq3D FmafLhoY/M2OFqnLbBVgdR30GyEXUIVIjX7+oOleLXo65Mnoaj64SiJNCoBo/9Uu0I4H p0LaZgNRkn6C/IJWL/izLbXkt1auAtB3fErL6Ttznvo5MzMju3LkvaYK9Yp23Nk9QgW+ NeCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="hMHwFy2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a056402424900b00418c2b5bf0dsi9740064edb.495.2022.04.19.10.13.11; Tue, 19 Apr 2022 10:13:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="hMHwFy2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348661AbiDSFqX (ORCPT + 99 others); Tue, 19 Apr 2022 01:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbiDSFqW (ORCPT ); Tue, 19 Apr 2022 01:46:22 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B05E220EB; Mon, 18 Apr 2022 22:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650347021; x=1681883021; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=wL0mWb5EUPM1GhSsvIU5cWAq5FjA0Desn4tLJo1cmZc=; b=hMHwFy2/CoOiGNeMGnB9gq7Vuv03PXf482rLkOjGSZbgHuqY3UxmpYzv Ietqqrp58MqtYYFqHFZKOODGjeLItAczqrVpFA+hneSYLoKaxQNQwxT7G EZbnOXpdsb5GrcqfaCZeoAVeBr8zJH+zHGIoG2ssiKDN3+60AqovEPOgE Hbu9FTST9x4rBdglDskpJxq2IMRAKnrpsGqe5QM28VytazTLnXzuRLjJ1 Ymv2l9zhMgXXPbx8zaWeE7KrxwZa1Si9dqVuUt2HaT4dQbN3KC91npRdY hS2Fh70ZR3neyFCYGMc6Ega1RLWzRU3pZxq7FKmAFTJ5p7S2aKKY7Muoy w==; X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="263856482" X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="263856482" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 22:42:14 -0700 X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="657511655" Received: from chferrer-mobl.amr.corp.intel.com (HELO [10.209.37.31]) ([10.209.37.31]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 22:42:12 -0700 Message-ID: Date: Mon, 18 Apr 2022 22:42:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.7.0 Subject: Re: [PATCH v3 02/21] x86/virt/tdx: Detect TDX private KeyIDs Content-Language: en-US To: Kai Huang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, dave.hansen@intel.com, len.brown@intel.com, tony.luck@intel.com, rafael.j.wysocki@intel.com, reinette.chatre@intel.com, dan.j.williams@intel.com, peterz@infradead.org, ak@linux.intel.com, kirill.shutemov@linux.intel.com, isaku.yamahata@intel.com References: <2fb62e93734163d2f367fd44e3335cd8a2bf2995.1649219184.git.kai.huang@intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <2fb62e93734163d2f367fd44e3335cd8a2bf2995.1649219184.git.kai.huang@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/5/22 9:49 PM, Kai Huang wrote: > detect_seam(c); > + detect_tdx_keyids(c); Do you want to add some return value to detect_seam() and not proceed if it fails? In case if this function is going to be extended by future patch set, maybe do the same for detect_tdx_keyids()? -- Sathyanarayanan Kuppuswamy Linux Kernel Developer