Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1711160pxb; Fri, 20 Aug 2021 11:59:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzV+DgG5IS/bS+J6C7uT7r6Qhk4m7Dtch/cl+wtPKXNmFr4VdScQapFk0/symte8x2+leW X-Received: by 2002:a02:970d:: with SMTP id x13mr18943698jai.57.1629485999515; Fri, 20 Aug 2021 11:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629485999; cv=none; d=google.com; s=arc-20160816; b=bFohgAc96J75VR3PhH+HzIZp8069MKTYcvWOU1gRILzo2elR3xwe2XdqJB877vmhtj eeDs8ZHT7Gw0l42qGIdWAbd02ghOpsenX75uwqdmTMGHFn+PqtbgrFDRCc+ZLNVs8owL XUhZoJW+ZSTeHT2D2dwFOtYY8d76AZxhFue+xcNzNmRpb9ARebrpKPFevkAXtCKdYMu6 FrRC5eanIM724bxaCGAx847s0mX4zlxO3MH7YukQPCB1HlvhARrvw4RTBbF3sCELxex1 0Vq2vnVoNeH3UiT6Enu/ULv6Wm5VLE3lhlEhquB7wKHRGSbC2R/NAaPTKkSSLvw41UpN fhbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ICPNypLcTLcPAIqgxouNjlHZcuESOEvGYseq7udtX7M=; b=lp/NX9H9Qfn0mYya3zzWiem93SuU3Ovjm2Vo0sUCyXpnb25q1RF8jkxa/dnQCjmwT/ dqd8PpKKNVAf60AfVn1Ov+mBPNOd5M8UM/b5SkM/M1FmwSW8j8veN595RiiAiUJPjIvn MfKu0QA/pAqc6J/TrLC0SfyXYFhbN6gGipOeFyUoID9bryTYZE/Hwy17birCo4O5PaYn E9S01APNEjqyLanhTP9lOKJVMusonNGezLKg+SZ8clD0VMXiAV2M/yUrz5udzzU9QCsG sbGCLyUgqMxz5wanZlWh7Xcwq4MEYS/ausU1tGxziCGOMC1J1mQ/29vEnPUsvw0RRgNB bijg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si8661596jac.95.2021.08.20.11.59.47; Fri, 20 Aug 2021 11:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235726AbhHTS7R (ORCPT + 99 others); Fri, 20 Aug 2021 14:59:17 -0400 Received: from mga18.intel.com ([134.134.136.126]:50865 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhHTS7Q (ORCPT ); Fri, 20 Aug 2021 14:59:16 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10082"; a="203970835" X-IronPort-AV: E=Sophos;i="5.84,338,1620716400"; d="scan'208";a="203970835" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2021 11:58:38 -0700 X-IronPort-AV: E=Sophos;i="5.84,338,1620716400"; d="scan'208";a="452966569" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.221.228]) ([10.212.221.228]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2021 11:58:36 -0700 Subject: Re: [PATCH v5 06/12] x86/tdx: Get TD execution environment information via TDINFO To: "Kuppuswamy, Sathyanarayanan" , Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org References: <20210804181329.2899708-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210804181329.2899708-7-sathyanarayanan.kuppuswamy@linux.intel.com> <174d5062-3618-4343-bdfb-22b5cd2662f8@linux.intel.com> From: Andi Kleen Message-ID: <5c4b8cff-ebc0-515f-acb3-aee53f955e4c@linux.intel.com> Date: Fri, 20 Aug 2021 11:58:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <174d5062-3618-4343-bdfb-22b5cd2662f8@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/20/2021 11:29 AM, Kuppuswamy, Sathyanarayanan wrote: > > > On 8/20/21 10:35 AM, Borislav Petkov wrote: >> Ok, put that as a comment above it to explain why it cannot continue. >> Also, make sure you issue an error message before it explodes so that >> the user knows. > > Ok. I will fix this in next version. Without working TDCALLs the error message won't appear anywhere. The only practical way to debug such a problem is a kernel debugger. Also printing an error message might end up recursing because the console write would trigger TDCALL again, or eventually stop because the console lock is already taken. In any case it won't work. -Andi