Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2527225rwd; Wed, 14 Jun 2023 04:17:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YEVQXGGTD0pIbFGI7WzYExRgX5nkSj+MYCB3ZrGens5HSmfoXLrPnfWz630ZTptXABXO2 X-Received: by 2002:a05:651c:201:b0:2b1:b7a1:fee with SMTP id y1-20020a05651c020100b002b1b7a10feemr5920095ljn.14.1686741435680; Wed, 14 Jun 2023 04:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686741435; cv=none; d=google.com; s=arc-20160816; b=tIPM4+iMW6tjAyfLu3nPy8eMO72erlG1TqjxerJYA+5OK2seG2qp2CtQbDSiNxz/xw x5VeLmJwKsTSkPknx6L3LUlI0xNR7TvtDpC5wg6TzDxPBr96+bL7lUJOA6Ck0yyWhrhJ JyoR05Pqpv1CiZcMdLDreDg5gzZ3C9odkjgg5vWkn1PS4Wx+8ZM8tM+Hgd00+EQLMBY4 L/W9d5nJDJaJWaTsKCZrkO2JbZAM474U2EvkpReFbiQol0b3fDPxMbqOImSNmOexF8d/ Y/Ht2HmR/hOuHl9dc+5bqAo71t6A/VF+hK47HisA98zHUF5c+HUKXQfaJTTI1Yemtipm e7NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZgA4IBbJY2LfhRCTHq7uBY4trb5CXVwwo/E5KZVNFDg=; b=bqo/JwPG6m26mUdNQtnQu8e4UTMAejb1pKwUuJMmsPrykiK66f3tzBtvs/mrqmyyJI Ugoh3tBePLNJWQrqsC889gIW58IuQlctzVkRfau8z1FOChBc5qOxv+mC2y6irxwWoqTQ YWPFgUfkaBPp4mkogLO33+PGdsoKC0NeuYS1xMNT6k8/fAZ6PFt9+t4J4+e1EmDdk6nf xzGa3itY+mR/Nt1fG7K4/CmwIkCrL6/S/k6uFyEVOWT7XK6SJ7E2V7lvWtv4ZprgFy6J /JD3sf9AC/4VEgb0bUJ7z92qDZDc1/ozAX4qKokezInAqRHjSf0Whns2a6vRb6plTRwm 6pwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eOstIn05; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a05640214d500b00514a45f1ef0si8895007edx.391.2023.06.14.04.16.51; Wed, 14 Jun 2023 04:17:15 -0700 (PDT) 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=@intel.com header.s=Intel header.b=eOstIn05; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235607AbjFNLJG (ORCPT + 99 others); Wed, 14 Jun 2023 07:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233170AbjFNLIv (ORCPT ); Wed, 14 Jun 2023 07:08:51 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C66FDDF; Wed, 14 Jun 2023 04:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686740930; x=1718276930; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Mm79erLzfDU1g9VPH5nKFTr67LEN6rYuyJAuFo/ZDXU=; b=eOstIn05Qcbx8d6mDDVtRvz11YWnxoCAuh3K8/HrzpT2f2XnnA0iRS3r ImepqkZzd2KuX2nQ5OHb5ck8vO64bEkoUCO0WUBMnrGYIg+T+MOiwwGgw JlRb7qhDuPJWCefzqOmGS/VxmtsI5E4fqhbfD3cjlpVXrOi0I3aQQyEi6 NfFsvYwvY1ZS10Sl2e8Sook+oD7MMObDQdHA4h+E9uZ7oh9LFakD1Q5+5 2PB3bA7GHx8qolYq0f/nByqxw+B3wp/TpU9DCVi5UjkzpeR6URjB89GIs l4NOTBYwwWzeglKrjLZV8Rkt65hZVg6fTUXoSmlH85rPye0tdc6gc3wkt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="386993008" X-IronPort-AV: E=Sophos;i="6.00,242,1681196400"; d="scan'208";a="386993008" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 04:08:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="741798491" X-IronPort-AV: E=Sophos;i="6.00,242,1681196400"; d="scan'208";a="741798491" Received: from wlwpo-8.amr.corp.intel.com (HELO box.shutemov.name) ([10.251.211.89]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 04:08:38 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 7AC2910A069; Wed, 14 Jun 2023 14:08:21 +0300 (+03) Date: Wed, 14 Jun 2023 14:08:21 +0300 From: "kirill.shutemov@linux.intel.com" To: "Huang, Kai" Cc: "kvm@vger.kernel.org" , "Hansen, Dave" , "david@redhat.com" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "Luck, Tony" , "Chatre, Reinette" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "tglx@linutronix.de" , "Yamahata, Isaku" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Shahar, Sagi" , "peterz@infradead.org" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" Subject: Re: [PATCH v11 18/20] x86: Handle TDX erratum to reset TDX private memory during kexec() and reboot Message-ID: <20230614110821.pf35kxd4vcwjjpb5@box> References: <5aa7506d4fedbf625e3fe8ceeb88af3be1ce97ea.1685887183.git.kai.huang@intel.com> <20230614100245.3vehux365zou3ze6@box> <84dcc5ff896f487c95dc1602b627abef8d48432f.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84dcc5ff896f487c95dc1602b627abef8d48432f.camel@intel.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, Jun 14, 2023 at 10:58:13AM +0000, Huang, Kai wrote: > > And the platform has to > > handle erratum in BIOS to reset memory status on reboot anyway. > > So "handle erratum in BIOS" I think you mean "warm reset" doesn't reset TDX > private pages, and the BIOS needs to disable "warm reset". > > IIUC this means the kernel needs to depend on specific BIOS setting to work > normally, and IIUC the kernel even cannot be aware of this setting? > > Should the kernel just reset all TDX private pages when erratum is present > during reboot so the kernel doesn't depend on BIOS? Kernel cannot really function if we don't trust BIOS to do its job. Kernel depends on BIOS services anyway. We cannot try to handle everything in kernel just in case BIOS drops the ball. -- Kiryl Shutsemau / Kirill A. Shutemov