From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB060C433F5 for ; Thu, 7 Oct 2021 19:26:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3111610C8 for ; Thu, 7 Oct 2021 19:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240918AbhJGT17 (ORCPT ); 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