Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp57650lqn; Thu, 11 Apr 2024 13:47:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAWilCQD9byPTZuniwm9P+t3xDomll/aQdNJ5yr8DwUmyaCbK7Aue7varnGRxBxTueAC2oYSI6cG1NKix61zF6qSDTKEm2NlDLbaKeHQ== X-Google-Smtp-Source: AGHT+IEcslRTUzQjQhAdEyj5qQPBklbwXoeT9Xiyr0co39AcyE+aIt8y+GjmSwhTXDG0B52W+bEx X-Received: by 2002:a05:6a00:1886:b0:6ea:f369:f20f with SMTP id x6-20020a056a00188600b006eaf369f20fmr820589pfh.1.1712868446428; Thu, 11 Apr 2024 13:47:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712868446; cv=pass; d=google.com; s=arc-20160816; b=nWZHa090PgiElDXQ+ukizqTLLDFnsCtYxZmvuuiOmKZy4W+u+8kd1NR+GEKcHdyi3h boQB9gTFDEZvj0uGnVJL5lx+WXJnhP1arXs+zhfS/iP8upx8rOL/ROU4Fd+lS4z4lWr0 G+KWqLKkFkJEf2GG3MTfQL4fsMXmjxivmq8yyD4bfnrrgJSHKweVb4uUUjTt1eBwh+V9 LpTeahmDOWo5fkBZrjs2FhlJyeXZH/4LWbRlS31ebca267gp8sCoyRD2jV1BTL4joSWY uhJ8YBjbEcx/wGqmqjReBrQUNuZrgUZRg3pIKLCjMr6Jrkp6JPxkH28UY7SeUy14wmZ8 h7mQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ENidnsGRYY9PU6wq4z0zzIEF+HAa02pBRlogdYQfZV8=; fh=LkdRrsPHwiaXkdfp2ACRGEayb2ujJ9u36ofrIpNjMmU=; b=y8vmpGFewfxMM42yyOoJxhNPxEGQAyVZhb+ETpao57JlGjc2ug6wAiIlJO+0S25rhH BmqI8oOqJme32MPl36A/ca9R3TFCGR/ZFCzOVHVzUHp/H2Im5IluVIGJ4WMxyBh8kOze advrayO0xdtqikiuqUnc0S41Mmnkp3ZDu4ADVAmZ0hKAQd7Mgk/UW4qKXWw1V3/ukkit 1EWBKRwm0qJV16fSrhmHqGw7hGtPDsLinDlLx65nOwfWQPb1epkTy7KqpdIAmm1CZT/R gkY44txrGOBshk1cZIWJ3lnCBi38Jd9L9KQFBF6Uh5R9cwt15sSfYJd/UjHtFaHnGz9R SEKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O9Avea6b; 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-141590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141590-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 w29-20020aa79a1d000000b006ead1509816si1996549pfj.341.2024.04.11.13.47.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 13:47:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141590-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=O9Avea6b; 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-141590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141590-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 47F92B21965 for ; Thu, 11 Apr 2024 20:46:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AF9F18041; Thu, 11 Apr 2024 20:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O9Avea6b" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 3B0A5205E15; Thu, 11 Apr 2024 20:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712868393; cv=none; b=OpD9u/CFwOfqKl9hCY6tTc8sRjafSKV8d4IHHCbqes+GK66+so/PGn/F17PuVXx/I3mYyJVqLBfQEKg6GbIPkFl0fWqD6jUfgPUq1ZwlFQWpDwWTfdQ8nEJzH66e6agVUux4R3yM5F30RHvClMwGRsgstxoU9/BbOrRqgBSBPr0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712868393; c=relaxed/simple; bh=xGjifG/Meb0EpxZ/+JCL9Kf4LMpK0B5P9WfvNR35+u8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sf1iOd7kjTQIXXaL+Py9YDoOO1afPjgkt9L6mx4mW8S96jkguhpckPy4Okq1RybVuTIwBJRj7gbUraJJSBIFWFjNs7ClSCg1vypLiquljt9qShu14AQdWXOY9tFg98Rl1hsjo+TRDrcNjtIIxehldghQErxOX89ND6ViCV0XYUc= 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=O9Avea6b; arc=none smtp.client-ip=198.175.65.9 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=1712868391; x=1744404391; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=xGjifG/Meb0EpxZ/+JCL9Kf4LMpK0B5P9WfvNR35+u8=; b=O9Avea6boRo3L+tlxSe8hIQk07Ynl9eVyo6IBH1ENeatHqYekqPGIyLx Ozh0YMVTzLy0TAUx2hxPKf4Kglr/JsIcIkgVuLCWQotXxAHVmucjv9zsY cMgsJzanj/dm9asK3HzuBb1P2//IAiPv7AMV53q1fS9iJN0tZGJ4CrKsa CmSUmTyg0nQRaGswP5tLnmdKX/b7mbihWqqJD3IzLYWC5/2c11u6hZiU1 redtS6d7I8YASZ/jqtJDHJeP+NQkFcrzOk5uQBMDXbn5JiUP0jILBrqth i2CxmwGT4/YoKaqJSanIgAt2bxlvvKAAR4cWauunNj8SVi/LIy/rr+7dO w==; X-CSE-ConnectionGUID: JnfJG2JNQCyLsUsAWCHwZg== X-CSE-MsgGUID: uu84z/UWTM6XXhWjvNMkIQ== X-IronPort-AV: E=McAfee;i="6600,9927,11041"; a="30787199" X-IronPort-AV: E=Sophos;i="6.07,194,1708416000"; d="scan'208";a="30787199" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 13:46:30 -0700 X-CSE-ConnectionGUID: RjUis6vlRqybWBBjNCgJLg== X-CSE-MsgGUID: +A9NZ8A3TNCJ0HcqBEr0mA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,194,1708416000"; d="scan'208";a="25488117" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 13:46:29 -0700 Date: Thu, 11 Apr 2024 13:46:29 -0700 From: Isaku Yamahata To: "Edgecombe, Rick P" Cc: "Yamahata, Isaku" , "Zhang, Tina" , "isaku.yamahata@linux.intel.com" , "seanjc@google.com" , "Huang, Kai" , "Chen, Bo2" , "sagis@google.com" , "linux-kernel@vger.kernel.org" , "Yuan, Hang" , "Aktas, Erdem" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "Li, Xiaoyao" , "isaku.yamahata@gmail.com" Subject: Re: [PATCH v19 039/130] KVM: TDX: initialize VM with TDX specific parameters Message-ID: <20240411204629.GF3039520@ls.amr.corp.intel.com> References: <5eca97e6a3978cf4dcf1cff21be6ec8b639a66b9.1708933498.git.isaku.yamahata@intel.com> <20240411192645.GE3039520@ls.amr.corp.intel.com> <54f933223d904871d6e10ef8a6c7c5e9c3ab0122.camel@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54f933223d904871d6e10ef8a6c7c5e9c3ab0122.camel@intel.com> On Thu, Apr 11, 2024 at 07:51:55PM +0000, "Edgecombe, Rick P" wrote: > On Thu, 2024-04-11 at 12:26 -0700, Isaku Yamahata wrote: > > > > > > So this enables features based on xss support in the passed CPUID, but these > > > features are not > > > dependent xsave. You could have CET without xsave support. And in fact > > > Kernel IBT doesn't use it. To > > > utilize CPUID leafs to configure features, but diverge from the HW meaning > > > seems like asking for > > > trouble. > > > > TDX module checks the consistency.  KVM can rely on it not to re-implement it. > > The TDX Base Architecture specification describes what check is done. > > Table 11.4: Extended Features Enumeration and Execution Control > > The point is that it is an strange interface. Why not take XFAM as a specific > field in struct kvm_tdx_init_vm? Now I see your point. Yes, we can add xfam to struct kvm_tdx_init_vm and move the burden to create xfam from the kernel to the user space. -- Isaku Yamahata