Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1276820lqz; Mon, 1 Apr 2024 00:23:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbqBZGS5dUimmj9/8dbrz8xO2qu6g0he2Ip5G3D4yppHmmUojPkFvrrw5KVczUHexUbjf73aj3mBltBb47qT/kr7IyiAWFzWRF4gDsJw== X-Google-Smtp-Source: AGHT+IFn+06cgyAGLalUhteK+yp/sltdpdKaSjczsyXLtWpkkK/3u5e3vMwgAFKe1V6ryfv/fX8U X-Received: by 2002:a17:90a:d50e:b0:2a0:3fe1:2e1 with SMTP id t14-20020a17090ad50e00b002a03fe102e1mr6139950pju.6.1711956212288; Mon, 01 Apr 2024 00:23:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711956212; cv=pass; d=google.com; s=arc-20160816; b=fGGsLZxO9KSURwgSmZL9a/WESgVA4/AJSNe6Vn5nIcY7AM7gFdJLtrXlsDcvt5Adad 5YUrmm3vteZRLnS/sN481IZkP0spVod77lzXQazP6/cV/B5c9Bu54qAjva27TU6IGCFf vXueLJIUoemgZwuo52BkBLFf8Z1gfVEHzFuntICm3aaWGoCFs5/CCjySfraGN6yrOPnl dV6u/njuo2YBpohRDz8V/9ljyeWyyLGUChxUCYHYBHt79vpChp7x9P0nYiVmyiqdLYel DgIX8/r50OR6z3z/gO4KKifdN6pzz08j8gse1EavOuUg0iwoakl0mnTIP3lG/JRbj7Ce JXDA== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mKAbZh9c6aTdM0lwgdrg3M0DRRvv0gOIn35mrZzL25U=; fh=JcJEicNBI1Z2ag/jG78zvX1GU+a2FiHuwjnotUbeOYw=; b=mF8ZK1e7qIFyMDjriOnwThZ2zbrajgvo8TY9UZjOi41zaNJKbPVRcH3LAkxmXmRzBv vCU37OIYYqtG0GHC/JNTUS7FRomPOBQdXZtGTEdkB23tN6qdohnWeZpyILFi/WvIseRR ALtoGkK9I2JAJ64XyO8R2yDGNnLFNLdERA4IhJzybrRa5t950/sulsRm7ITj3srqjxlF TXO9WswvdeRdgWVcKx+uDsA4yI5Qgu/1KPUV+1FaUDEdnoCciZXRHJzq+TWDJO2/a6Ns UXNw7tB3MIEq6cmjXR8QRFCb4fJp0PbDFyb60dXwirvLUCxq7KNlyXLh/DlQUwa08Uey 5n7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hERuwyHl; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126493-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w7-20020a17090a5e0700b0029dddd0779fsi11167656pjf.153.2024.04.01.00.23.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 00:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hERuwyHl; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126493-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 83241B21357 for ; Mon, 1 Apr 2024 07:23:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C070BA27; Mon, 1 Apr 2024 07:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hERuwyHl" 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 0C0978480; Mon, 1 Apr 2024 07:23:12 +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=1711956195; cv=none; b=kajg+lpeNMDT/bR1VfLViQYEmM07Y+9XPB874t4g5cKVT8GyefJHu30ig0BtRRerBNGdFqR/oOvqE7Nd8RJt21PcMMzyCkE2gK+T4duQv8pzTKspN5+lYKRQou+m4FUogcPCBxpI/ox1iSlpoqXUQONIr2FTFFkbe9oXJb8CCuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711956195; c=relaxed/simple; bh=Ezycmnn7/V5CGwXkSuVumI+IORwY0gBsF2k0Yk2ici0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N/T6eNXbZjIrdbE8rYgWV9/3/COyKDz36y+CBQyLf37L86dtVE8fTa0OvJ3eNa9mMQWfG/LYZbW/mb3pqDdEzB+uoSz2EQXgijIyrr7fsm2mYPXwA1YcnbcDzyDZMudLm7hIa1uCTJbzJppeSUu5Kaogqvr9qGx0RgnugetSgmY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hERuwyHl; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711956193; x=1743492193; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ezycmnn7/V5CGwXkSuVumI+IORwY0gBsF2k0Yk2ici0=; b=hERuwyHlbl8YgNurhEYhTgadKCMbAX9bSAENJadvyrtWtQm9X7BwGBJ5 /SnCZ4SgTdv5eysmZgYQ44Ih3RP2gLRAbPQHLxFsuHuVa7GouOGi2svMH V87dbU7hwYdow6SvXMn1dxYVxoY94xUVb+fdGH9cDecdlHRZ/WT9zgOOP BYfvG7f+8X/B4kJwv4ax3fVF2MDLXwlM/d0Uht4H1D/NeSmy/It/8Cnae y8QVbJ+Nv/7Xh53Nfxsi9g6PeY0BBBbSOw/H101yZ4yqM9BFVgr2REB6K FxiGL2Up6T/fXzZEIVcFx/FlDZ4sew7VG2fbkE5PX24/I6dTtn8NKSzv2 Q==; X-CSE-ConnectionGUID: ZstI885XShasXDYY/w3wgg== X-CSE-MsgGUID: b+dqwTaSSaGF7HTvp7TJNQ== X-IronPort-AV: E=McAfee;i="6600,9927,11030"; a="32480977" X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="32480977" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 00:23:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="22376374" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.124.224.7]) ([10.124.224.7]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 00:23:07 -0700 Message-ID: Date: Mon, 1 Apr 2024 15:23:04 +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 039/130] KVM: TDX: initialize VM with TDX specific parameters To: "Edgecombe, Rick P" , "Gao, Chao" , "Yamahata, Isaku" Cc: "Zhang, Tina" , "linux-kernel@vger.kernel.org" , "seanjc@google.com" , "Huang, Kai" , "Chen, Bo2" , "sagis@google.com" , "isaku.yamahata@linux.intel.com" , "Aktas, Erdem" , "isaku.yamahata@gmail.com" , "kvm@vger.kernel.org" , "Yuan, Hang" , "pbonzini@redhat.com" References: <5eca97e6a3978cf4dcf1cff21be6ec8b639a66b9.1708933498.git.isaku.yamahata@intel.com> <20240321155513.GL1994522@ls.amr.corp.intel.com> <5470570d804b52dcf24b454d5fdfc2320f735e80.camel@intel.com> <482bd937c52cf79c49f1c666cbc8d28c11af7c4a.camel@intel.com> Content-Language: en-US From: Xiaoyao Li In-Reply-To: <482bd937c52cf79c49f1c666cbc8d28c11af7c4a.camel@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/29/2024 2:26 AM, Edgecombe, Rick P wrote: > On Thu, 2024-03-28 at 09:36 +0800, Xiaoyao Li wrote: >>>>> Any reason to mask off non-configurable bits rather than return an error? this >>>>> is misleading to userspace because guest sees the values emulated by TDX module >>>>> instead of the values passed from userspace (i.e., the request from userspace >>>>> isn't done but there is no indication of that to userspace). >>>> >>>> Ok, I'll eliminate them.  If user space passes wrong cpuids, TDX module will >>>> return error. I'll leave the error check to the TDX module. >>> >>> I was just looking at this. Agreed. It breaks the selftests though. >> >> If all you prefer to go this direction, then please update the error >> handling of this specific SEAMCALL. > > What do you mean by SEAMCALL, TDH_MNG_INIT? Can you be more specific? Sorry. I missed the fact that current patch already has the specific handling for TDX_OPERAND_INVALID for TDH.MNG.INIT. I need to update QEMU to match the new behavior.