Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1686871pxb; Thu, 7 Oct 2021 12:54:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm8S2SkX8aKoMRBq/GnlcHPRFMx0x2SUQvOaUaNm2gThaJ7vpLX1nPDn4z4BduMoZms3K1 X-Received: by 2002:a17:90a:ba09:: with SMTP id s9mr7191403pjr.42.1633636482315; Thu, 07 Oct 2021 12:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633636482; cv=none; d=google.com; s=arc-20160816; b=vEBGchMtHkgmP6Xh6yhRVQjq8TuMK2ptoW7Ixa6KkKk1G6AuCrA5VHZc3g42Pzi/gK sCkDHnTgNY84Du7sUsPyP93Wy6UyFp41YCFvP+RAZ473oUUsoqYGR/nG3D7dmZ9WvKce wIlNvoZOuNG5SXfPoDBj2tNL4Q+AWCPTQ6hl3rRwZwVeD5JgMaWmQTidHfT2LHgLx9OI B296UQA6iyCPexOsknKtAMmO0iQ2T2Ul0Wk4tllw4JL8TYsxhxeUDcoGghYJPDWdWRPF U1Pw10cetP1cd1RlksEWqu4FoNBAZsU6VDph0fo6yHGXpM8sf6LfR9hwxOgMzeyKttF5 6KkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=XvKuIjL6BTVZ6sclUb83ju+kMJ6lV/2Q2k8pQ7SucGY=; b=LxMx97MDvmX2237ST1p4giKgPUBNtCIDrtkxL/sU8BFlP5YAL+akvd45D0Kv1FvmuP W/leX67eCnXT9vkZi2dwBMeZqZ/Wkct48EC5k67mKWoPdjzTIHU5/tMRY9x/hol+7cpU EJopf4XQMKeUgzXoPd327XEi/IApcOQSk3vhuqSi33LP9qFCVC1Cj8y1CbMIOnKSfx6T ZoT5HWs5Inif+jySidOA34AqOMeCL29Q4zCh2fWHjsxsHuzwg7mDpUzF+4xiHPyW36cJ dpUvFNUmtAZ/ZrxDvZB+j8Q2rkyrwobCs6DjRK7NEwUJNvdRlazeAuv8BVsgpxViIKMK n/WQ== 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 u36si273763pgl.231.2021.10.07.12.54.29; Thu, 07 Oct 2021 12:54:42 -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 S233170AbhJGT17 (ORCPT + 99 others); Thu, 7 Oct 2021 15:27:59 -0400 Received: from mga11.intel.com ([192.55.52.93]:23032 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbhJGT16 (ORCPT ); Thu, 7 Oct 2021 15:27:58 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="223742590" X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="223742590" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 12:26:00 -0700 X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="624379792" Received: from kgahmed1-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.209.67.99]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 12:25:59 -0700 Subject: Re: [PATCH v8 07/11] x86/tdx: Add HLT support for TDX guest To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Paolo Bonzini , David Hildenbrand , Andrea Arcangeli , Juergen Gross , Deep Shah , VMware Inc , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org References: <20211005025205.1784480-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20211005025205.1784480-8-sathyanarayanan.kuppuswamy@linux.intel.com> <20211006191716.pyhwbgfyqugoupmg@treble> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Thu, 7 Oct 2021 12:25:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211006191716.pyhwbgfyqugoupmg@treble> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/21 12:17 PM, Josh Poimboeuf wrote: > I'm having trouble following this last comment, does it mean there's no > way to return the error back to the #VE handler when this is called in > #VE context? Seems like that would be any easy problem to solve by > shuffling the functions a bit. Currently tdx_*halt() calls are used in both pv_ops and tdx_handle_virtualization_exception(). If it is just tdx_handle_virtualization_exception() then we can just return the error and let exc_virtualization_exception() handle error using ve_raise_fault(). But in this case, since pv_ops is also involved, instead of defining two different halt handler functions for pv_ops and exc_virtualization_exception( we just use WARN_ON to report the error. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer