Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6887166rwb; Tue, 15 Nov 2022 05:08:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5JyFrKCGQ9jaZKbP41Yri16mmvKyWiQpsIAtDTTd4BOqwWw0BmWEZy61bxuEKl1QekUdoz X-Received: by 2002:a17:903:120a:b0:185:4625:2a1f with SMTP id l10-20020a170903120a00b0018546252a1fmr3968876plh.24.1668517726218; Tue, 15 Nov 2022 05:08:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668517726; cv=none; d=google.com; s=arc-20160816; b=Aoe2WioNV53p1dFKj6Zy5v458VxGWob6J8kvEj9N9A/mGom9sxhVkTp63qDwEe99Fg bF1TxUR1Xe2/jMDYVN890brUgXhAWax4WI//aOJyi5HPYoZYTSvcrKVMrohccqzXK3GS 74PQVNA4tkqdy5/Q0SEDI4BJXha92JAOqjyhnnr2M3/0Y2uyxwsPveJHa8sjatz+zruU bDFTYRTl0ZWb06PX2ctJ1/gosDKVXE3QQa3aEVOr6MkgnvGOWULO50dfDheBjdKjan56 K5QMdIQ0Fab93yQS+yuBHS64e1iExwOl8P8wo7NgMW3BTN6OMIO+HUCHfnRzOSr6LLRE rSgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PhJS8hGnS2Eii/k2XrXlRq8n5CmfHH4mNYz371VtBD0=; b=B/7+crFx2OkDT8l/i9v/x3eCTPPyHFawd5TuAQnPGVjidfm0gYdTqKzhLnODwi/m2s 9ZUGEccVUUkVdY7ltCCYCI8WhOMnOFL+KacjP5hb9/IVbK5UmcmoMllEHhpMbtutDGbP je9gEF3qNp7Lmr2IaC9gIl78/7ikEgYONB1N2VPkTV2Xn0XSAHO6Spxv1e/LBy7Rf0Fz 6NYRIZkBZSKh566naykchkb3zJGiaxkIumFXEcuNWRJuivzETudOuhCbasbh3asW4xxX OTUVaU1ubEZruFLV+RsuT6Wc8sxz4uqrWDVCAaVv1Lf2Lq26oLdnxs7oQ4ARduC0PqUc rHtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dk6eyK82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a170902ed8c00b0017f580f646fsi10869420plj.304.2022.11.15.05.08.33; Tue, 15 Nov 2022 05:08:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dk6eyK82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238366AbiKOMXO (ORCPT + 89 others); Tue, 15 Nov 2022 07:23:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236873AbiKOMWy (ORCPT ); Tue, 15 Nov 2022 07:22:54 -0500 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF83D2872C for ; Tue, 15 Nov 2022 04:22:25 -0800 (PST) Received: by mail-qk1-x72f.google.com with SMTP id z17so9297341qki.11 for ; Tue, 15 Nov 2022 04:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PhJS8hGnS2Eii/k2XrXlRq8n5CmfHH4mNYz371VtBD0=; b=dk6eyK82AphZctL7I56ME9lPsVOM/w4gKGWuvNNkze+N6/UwHqDeB0oalIljTX0Iqc YC/GBLgjf6HAMY99CG8zfpXzS1TWf6rCY1efPsDKeB8agUEdmAJ5boxsj//oIg9/1xMC f9lmOuW3Xd1pzp+vU6rV69ym2E7dontNYTwJNBRn2RUytZn50/EqJLEmlqP9rIWdeI2P CX956kLxm2vIhUbeB9btBrqU+DGSASkb8z6f5gzkx+L1Qq0d8qBXiwVekBmRWMOIT75l mVrmpq7e6P0PhEhgrNHsSjOZqF9iLhERcs413eyO7C3S9ao1W9A1YmYQwKwK+nIuZ4dO Ao4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PhJS8hGnS2Eii/k2XrXlRq8n5CmfHH4mNYz371VtBD0=; b=yD0eDXUwqWKQua7IenXODRR2V75jsRwmDsuFIGRZTELA6dfNCFIchrrXt+aR7wxUtV 9PVvEr7vdy8eHeV4OSktEwq+3HQL7bvKydXCTb1KZfWu1zWHKYmeiL0xfi0a+vTNAZbX wP2fmlSNGOfxL5X1Qemz96KEbbJ2Oxp7dDJRAZ0jhwB9t10ueUeDyRI/ZeOke8I0Qieq Y4RIEpOST+gJ043N7OJXpHJH520VCE3vZOFhMnhxeQ+ovx5h80Uu2kONtsJ0s6WJZkPP WWxhiKYjP7ofXGcfnIA+dkLainn3lalgtZ1B+D5aRL5aq1bPWZg4U1J5W3LkBHaNP5Qg Baqg== X-Gm-Message-State: ANoB5pljMI03Kjt3MsuzV/26UVAtyoSgJ6Z1BPQO1AiGhKHVqHRLYcIg mEWisXDomMOE1MYIaI1u1Xa/PJ745Eob7tjtSD/Ktg== X-Received: by 2002:a05:620a:4806:b0:6fa:da64:4879 with SMTP id eb6-20020a05620a480600b006fada644879mr14623726qkb.312.1668514944745; Tue, 15 Nov 2022 04:22:24 -0800 (PST) MIME-Version: 1.0 References: <99e5fcf2a7127347816982355fd4141ee1038a54.1667110240.git.isaku.yamahata@intel.com> <0feaa13fa5bf45258f2ebb8407eaefadf5c48976.camel@intel.com> <20221114231835.GA2350331@ls.amr.corp.intel.com> In-Reply-To: <20221114231835.GA2350331@ls.amr.corp.intel.com> From: Erdem Aktas Date: Tue, 15 Nov 2022 04:22:13 -0800 Message-ID: Subject: Re: [PATCH v10 005/108] KVM: TDX: Initialize the TDX module when loading the KVM intel kernel module To: Isaku Yamahata Cc: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "pbonzini@redhat.com" , "Shahar, Sagi" , "dmatlack@google.com" , "Christopherson,, Sean" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 3:18 PM Isaku Yamahata wrote: > > I think you should explain why MOVDIR64B is required, otherwise this just comes > > out of blue. > > > > Btw, is this absolutely required? TDX also supports Li-mode, which doesn't have > > integrity check. So theoretically with Li-mode, normal zeroing is also OK but > > doesn't need to use MOVDIR64B. > > > > That being said, do we have a way to tell whether TDX works in Ci or Li mode? > > As long as I don't know. When clearing page, we can use > if (featuremovdir64b) movdir64b else memset(0). -- sorry for resending the same email, for some reason my previous email was not in plain text mode-- As far as I know, Li mode and Ci mode both are working very similarly and require movdir64b to clear any poison bit previously set. Why would movdir64b is not supported in a tdx capable cpu? > -- > Isaku Yamahata