Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp104117lqb; Thu, 14 Mar 2024 06:42:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVq00K8Ev0ab4rYaePwt2GAw/miynri0ZqR6YPbrT8xz1KfHehSXffj3NmpeOElGwWjdsr08hOh/Tx+jjBjwDyA7bL0Ej/FWMwG4mrMcA== X-Google-Smtp-Source: AGHT+IG5zW0Zj06gSVj1AY6Ev9g/k5DYSop83sW4+Gnn7dBg9bkG4Pzjjcg4JqMhd1qGMD/HYVWB X-Received: by 2002:a17:906:bc8e:b0:a46:6433:2c2 with SMTP id lv14-20020a170906bc8e00b00a46643302c2mr1275304ejb.53.1710423735927; Thu, 14 Mar 2024 06:42:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710423735; cv=pass; d=google.com; s=arc-20160816; b=Z7zokZTbcx/d6dGQXJWs28YDhOYwAW3RT8W5Avr7PhsTzrdppYnjKA6CZktwEhYI0u vCk4F2hTBjTBdd0e6yFGIUl34YqbpEMdNYGfxOUyUkwtuvhSK9/gduH3+OF7viszVfkz zX190vi0MCaXktxMFMsrAmrkmLcZOp3aIYvcyylZG/7ZjvdIYQGJ2H5t/hIlLS1jg2ZN 0iFZxBc3P1A4DRKlG0/2n8cwg/S5bsywtPVDUuVtVNyJKmbtkqswMz8TiM4o/zXFALuq 81CfQuo9+hmayNMamBcGsF18q5vNzDjTwSDX9f1o4pNruOfTOjXTzlS04w4wtmcE1TJB rcyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=HLkEjvtcwTlNOrgDK3fpgg39vVH9Nk86ROdgeMUkyh0=; fh=Zfz02jlmT1Ia7zfr6dK1uEj6Z1LYfmKp8tqunyXBLlc=; b=XN5ASEl6XiOkwsUQH/NQqkeWH0zTH6diBfBsrcnMW+y75l5m5lgIQaDGgn126deQBc vP+Wx3JtoOZzd/eLfnP7TImJFeAcMgZYa2fUDaa2Ijr1x9Si0nAz6abo3ZK2Ygabl152 3HL2IkxBUiPB5xjQ2NVoAtugC5e6ITr4tNEqOGmMczJq+VdhngAxdALkKHT53/uZcpkq SmzXnpojV0kcAXS6KK1ZnieUy1Msxx1tWqtLwS+vaFKY45/s80nhGylEt/xjL4qt/JDf cjzXs/zQ6FodiijOjeHZWD/Twre0HmXLkpQyf+BKDCuhDSjgiTYUGbZoUI9DAb5mVVaj +kWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jz0lOh20; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-102937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102937-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d6-20020a170906344600b00a45bb14b17asi736383ejb.158.2024.03.14.06.42.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 06:42:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jz0lOh20; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-102937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102937-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 34DD71F24366 for ; Thu, 14 Mar 2024 07:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09CE25CDE7; Thu, 14 Mar 2024 07:46:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jz0lOh20" 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 6366C5C8E1; Thu, 14 Mar 2024 07:46:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710402362; cv=none; b=JAfsCJupCnkZ7xc01Sc0TEGTU+TMsxzs0cT2CXVFFLTJzDt7EG/uaXjg0jaXE0Cw06Vnjtrydcno1oXCFKPKSOC5ZkzBvOXQoWg/ypYwcnz378MvByhGIOjGntx0HRcXDq58YO5E4wo5HmNCQjbgxvzvT8pI4xxk5NKpSiMsS5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710402362; c=relaxed/simple; bh=+12a9Ym6krS0ceAODUt6qno/X9iDB65b21T7phg714I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e7+YnhQ19t2Z9O1Zk0I35MqBGcQtHLEJKYV8tMlWxkrHUh4vPLk/5Ov0brhrPTIjweFgtzobsr/zGChuhqdO50W4XEgJ1TsiAXAZnZRZfxbL0Y7UlqO3VhRKUh99HPqDTf0VvnKcSbkOvW0paeFBtHctGeG3VhIasCOlOf7uYgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jz0lOh20; arc=none smtp.client-ip=192.198.163.7 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=1710402361; x=1741938361; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=+12a9Ym6krS0ceAODUt6qno/X9iDB65b21T7phg714I=; b=jz0lOh20JO51GUWg6RwcbdzEwGgaouU0uGhRzd7M4siRSq2PHcBVKK+P sLGvWGc72WH+Gn/yF4b4j/jUJrnr0MynF6/dlchCxsSN/bj7NEs+tHLO1 II+/KRWHx4LGITYN43p4SdRDbF3T8X/Mhw5SQoOrMb88eHgzyLvfFN36V nbXboTS05gHW/YPPm+3tRjbX8wWc36oBP4zO2jMhqvaQO5Os3F4p9BrtR JqNCN+FIS27WlZmMzVj6zsXZaiJoHFsvTWYQU9Wr8OTSXB3fSSCVUK7OP 0b8jO70/YYh5CPUEZ0RAgNRncPRpBruCThGPfMrAfa9shwGaLPREuozY1 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="30645114" X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="30645114" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 00:45:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="16799150" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.242.47]) ([10.124.242.47]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 00:45:52 -0700 Message-ID: Date: Thu, 14 Mar 2024 15:45:49 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v19 028/130] KVM: TDX: Add TDX "architectural" error codes To: Isaku Yamahata , isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, Sean Christopherson , Yuan Yao , Xiaoyao Li References: <20240226192757.GS177224@ls.amr.corp.intel.com> From: Binbin Wu In-Reply-To: <20240226192757.GS177224@ls.amr.corp.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/27/2024 3:27 AM, Isaku Yamahata wrote: > On Mon, Feb 26, 2024 at 12:25:30AM -0800, > isaku.yamahata@intel.com wrote: > >> diff --git a/arch/x86/include/asm/shared/tdx.h b/arch/x86/include/asm/shared/tdx.h >> index fdfd41511b02..28c4a62b7dba 100644 >> --- a/arch/x86/include/asm/shared/tdx.h >> +++ b/arch/x86/include/asm/shared/tdx.h >> @@ -26,7 +26,13 @@ >> #define TDVMCALL_GET_QUOTE 0x10002 >> #define TDVMCALL_REPORT_FATAL_ERROR 0x10003 >> >> -#define TDVMCALL_STATUS_RETRY 1 > Oops, I accidentally removed this constant to break tdx guest build. Is this the same as "TDVMCALL_RETRY" added in the patch? Since both tdx guest code and VMM share the same header file, maybe it needs another patch to change the code in guest or you just follow the naming style of the exist code? > > diff --git a/arch/x86/include/asm/shared/tdx.h b/arch/x86/include/asm/shared/tdx.h > index ef1c8e5a2944..1367a5941499 100644 > --- a/arch/x86/include/asm/shared/tdx.h > +++ b/arch/x86/include/asm/shared/tdx.h > @@ -28,6 +28,8 @@ > #define TDVMCALL_REPORT_FATAL_ERROR 0x10003 > #define TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT 0x10004 > > +#define TDVMCALL_STATUS_RETRY 1 > + > /* > * TDG.VP.VMCALL Status Codes (returned in R10) > */