Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5052765rwd; Sun, 4 Jun 2023 19:39:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7A1t1EIreiIuQmkJaZV1AvkhTR7I+zQ6bYD/x2Og6l2KOYxFaYCDSno/8t1DEu4vPBOC9t X-Received: by 2002:a05:620a:8797:b0:75b:23a1:35f5 with SMTP id py23-20020a05620a879700b0075b23a135f5mr19533270qkn.6.1685932782469; Sun, 04 Jun 2023 19:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685932782; cv=none; d=google.com; s=arc-20160816; b=heKd8efJfAUi79/SEafo6HIth3t/1D0qV9rlVPEghUlQkpb6Z2m79NcylclRNsoL/e 3Wlif+WeZ2FGSoCHIUH79cNEwZWamElakxYHS/L0T4+RZSv715K7oyA+P+Pq5BubJgmP 7azTB12ngt7AsgKDsn76r2L6ag3O3ey02sw7kGxa9O5GxFb0YwqMhnjfYuvQ6LEIjlnX zOHwhiSlC+0lZo9YLMnIoX2sxJ4X2aRRYclx3lGkdqnW9NwDLycOjiKnl5hYCW4J9WBc zw9uMUoVsyhkd9WYlPcXD7UhVu4ge0A0IgjPx3JJdWVggR0Q/jjJfwvaZTBQ8ds8ws3r urgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=WPPoZRE+MYIieWyTB3Wag8Y6Ukbg0SBczOLOaq2BWCQ=; b=nubxZ0Gfm0YYx0ZsGbM9jPf7OXuUYWkc7opki7dQwuykMm+21Ia49kvVmdHmN32TPy yjAChpLRF0PIkOESksxM3q4eGdBFXzUycFFPzfAnA8cJO0KMujtB7vdUP5BnedsHS4SB oMFjMDAnBRLARKLC/hOiFhLKisoczOkKNSXyFuSqPW204I++PObDNhF3yqP9ATsxsbuP iMyJgAEgiQmSUhpXqBmEtwWDRsXuL6Ve6zd7ipY6z6wXMYC6WzwhEHOZ0koEA/y7O1tj 0Mj64k6NuaCiSEl21EGDX0JrQQOXtzUESyp142qyGn4ufYD9xoc2acCokxkrGlKzNnjJ nlPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Jxbr21Ud; 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 b13-20020a17090aa58d00b0025337db9e19si4769053pjq.156.2023.06.04.19.39.19; Sun, 04 Jun 2023 19:39:42 -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=Jxbr21Ud; 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 S232527AbjFECNf (ORCPT + 99 others); Sun, 4 Jun 2023 22:13:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjFECNc (ORCPT ); Sun, 4 Jun 2023 22:13:32 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27BA8B1; Sun, 4 Jun 2023 19:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685931212; x=1717467212; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=l25PqmRhj6mGQ0+gMnNtHUBK6nJpcKBVAjCUOlZNLEg=; b=Jxbr21UdALVX9+E31731NtFEsdLpxn4vFnds1Gh69ZJQ/7LOU1EWNq7k Cu+ih8JLmYmuZTpczUHPouAqrr+77qi4mu2UWWbhK9Qijx4Y9EVPX6xQo +58jWPaUmDyJzC2heFq2ZfPcaCT2QbsFchOpidw5EAucaEQBCBR3VfSkX tVG+YJppwmM8gA24nBW5XwruqiXBt03RHNv9q1LcH97ci1yT2baSAaTUa p2mwzMap3+KUC3BOqPA2RtHmAWEjPp3qpI5UYXP3+nHGcILHIXqRp0z1T Qcch01T2/qjoxF3Y+/3ledjgmZN6XcMICIkhtszHGbwgCcxXb7+DfaZyE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="384557932" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="384557932" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2023 19:13:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="773545268" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="773545268" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.254.215.231]) ([10.254.215.231]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2023 19:13:25 -0700 Message-ID: <55e7b947-ca2f-c6a3-bb38-af4cd0ebc183@intel.com> Date: Mon, 5 Jun 2023 10:13:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.2 Subject: Re: [PATCH v11 19/20] x86/mce: Improve error log of kernel space TDX #MC due to erratum To: Kai Huang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: linux-mm@kvack.org, dave.hansen@intel.com, kirill.shutemov@linux.intel.com, tony.luck@intel.com, peterz@infradead.org, tglx@linutronix.de, seanjc@google.com, pbonzini@redhat.com, david@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, ying.huang@intel.com, reinette.chatre@intel.com, len.brown@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com References: <116cafb15625ac0bcda7b47143921d0c42061b69.1685887183.git.kai.huang@intel.com> Content-Language: en-US From: Xiaoyao Li In-Reply-To: <116cafb15625ac0bcda7b47143921d0c42061b69.1685887183.git.kai.huang@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 6/4/2023 10:27 PM, Kai Huang wrote: > == Problem == > > A partial write to a TDX private memory cacheline will silently "poison" > the line. Subsequent reads will consume the poison and generate a > machine check. According to the TDX hardware spec, neither of these > things should have happened. The expectation is that write to TDX private memory with HKID 0 doesn't poison the cache line. However, a partial write with HKID 0 does poison the cache line. This is the erratum, right? > To add insult to injury, the Linux machine code will present these as a > literal "Hardware error" when they were, in fact, a software-triggered > issue.