Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5431752rwl; Tue, 21 Mar 2023 19:15:28 -0700 (PDT) X-Google-Smtp-Source: AK7set8iHj3LUGyDciEqlWxzfPoQUe/3XhFW3ll3/+qGwD2IH0+6J9xqER0/Hw/cJyy6bZKWOjVU X-Received: by 2002:a17:906:105c:b0:92f:ceed:ab35 with SMTP id j28-20020a170906105c00b0092fceedab35mr4494041ejj.5.1679451328667; Tue, 21 Mar 2023 19:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679451328; cv=none; d=google.com; s=arc-20160816; b=EGli8UI7ZL5abxNdKCv3/xACRppQueNuFUXsNGGKvf14u8lQ3lCMiGAHvbhTIWxTOx pltSANWC+6/JpAXoSYQrvBcfsfn5vO6Mui7EfZ005bgkYPnIuEKRYJMHaeA0pLKBbg90 jHzX4Z7yBYrAeczOor/Yw6/oM76pC2CJDJVAQ3VzN3Ce12NITr8Pok+bR1tvYTAyWJQv r6mz8PqWf/x6m2rQCoNnBprzAaZgzEKojdJtMORZdOdM2aaW8JMl9LSj4LoEskX8wl+5 wtjA4lwtUaVci3jRGAgODKdKdmqk96vUps9v625biqjjozjIVMVk0C2O+5SXNFdGLmOl qWjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cSo2Myao52pDKJ3klZZvb1WRSxq9FEUcfqZOAfpC/u0=; b=0i/RDVy57JPZfNXjmkrvzBNVbdlNt9IrsJwuNVkoqMwHJrD1z7lMQcIjdh3gjS29/k mBeSH7dcMEZdZymXBGjzYiY5Ow0Ir3AuEZYkewSrv+cElB5sitYi2eQMMkbA4Mam0hxX AYHHFUfxR6UJvST+N1IXULdiyFojLkJiJ0Ruos4BRqvRbcqo2JHZYYoVcwELnChpYRxU Ap+uthlZSv9vlPgqm0pFFVKokBiykb8PBg6gg+PP6Nqe0jCMdMy9FKSjc/k7120qCy2C otTuP4b1BASx+sYatVtvnp7+O35adzHYyUTnZXJS2lk6Gkxn718AMKbMCTPkdWClJysd c3CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UzVtzCid; 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 hq14-20020a1709073f0e00b0092f1d91787esi18976001ejc.299.2023.03.21.19.15.04; Tue, 21 Mar 2023 19:15:28 -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=UzVtzCid; 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 S229876AbjCVCMZ (ORCPT + 99 others); Tue, 21 Mar 2023 22:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjCVCMY (ORCPT ); Tue, 21 Mar 2023 22:12:24 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7394257D1E; Tue, 21 Mar 2023 19:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679451143; x=1710987143; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tgknFT5svxoytfFvukmFEVzxzYULnJSsbUdnExl6zDM=; b=UzVtzCid35WNheIlpkTKMCjx64eNpES39tYqdb0fM/jIx5OAsyGwNZsU DHkObj2YOBRIu41r4T79WI9WgGrcj2TOaxjVGbQhgKloa02oS1NNU6J2o oGRS89Cr+BjypMJCKDcfJGX6VvEBRJMOfemTldbzMDRcbbQgqoc5VdT+L tM4G3hb3SaS1LOE4sxjLZdFqRUqk5CdyrYuMfy8O9xHcDNzCJw/nW9hCg ooiX52AQZxAfG4fDs77v4R/HLQCfFfRc1spv63bvOHlkAh+BHqsqXnPUD iw+JXBI8Lsy1i7T6b5Glfr7tMEfoBRgloZzW/q34M+ewm95L7dci/N8pH A==; X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="401677429" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="401677429" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 19:12:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="746126819" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="746126819" Received: from aschofie-mobl2.amr.corp.intel.com (HELO localhost) ([10.251.21.85]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 19:12:21 -0700 From: alison.schofield@intel.com To: Dan Williams , Ira Weiny , Vishal Verma , Dave Jiang , Ben Widawsky , Steven Rostedt Cc: Alison Schofield , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v10 0/6] CXL Poison List Retrieval & Tracing Date: Tue, 21 Mar 2023 19:12:13 -0700 Message-Id: X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=unavailable 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 From: Alison Schofield Changes in v10: Patch 2/6 cxl/trace: Add TRACE support for CXL media-error records - Rename the cxl_poison trace event field 'length' to 'dpa_length' (Jonathan) The dpa_length here is the dpa length as reported by the device. - Add a 'type' field to the cxl_poison TRACE_EVENT and define and use type 'CXL_POISON_TRACE_LIST'. This is in preparation for adding more cxl_poison_trace_type's like CXL_POISON_TRACE_(INJECT | CLEAR) - Use continuations in TP_printk to match the file convention. Patch 4/6 cxl/region: Provide region info to the cxl_poison trace event - Add Jonathan Reviewed-by (for real) and Tested-by Tags (Jonathan) - Tidy blank line at return in trigger_poison_list_store() (Jonathan) Patches 1,3,5,6: no changes. Cover Letter: - Updated the example cxl_poison TRACE_EVENTs to show type=LIST Link to v9: https://lore.kernel.org/linux-cxl/cover.1679284567.git.alison.schofield@intel.com/ End Changelog Add support for retrieving device poison lists and store the returned error records as kernel trace events. The handling of the poison list is guided by the CXL 3.0 Specification Section 8.2.9.8.4.1. [1] Example trigger: $ echo 1 > /sys/bus/cxl/devices/mem0/trigger_poison_list Example Trace Events: Poison found in a PMEM Region: cxl_poison: memdev=mem0 host=cxl_mem.0 serial=0 type=LIST region=region11 region_uuid=d96e67ec-76b0-406f-8c35-5b52630dcad1 hpa=0xf100000000 dpa=0x70000000 dpa_length=0x40 source=Injected flags= overflow_time=0 Poison found in RAM Region: cxl_poison: memdev=mem0 host=cxl_mem.0 serial=0 type=LIST region=region2 region_uuid=00000000-0000-0000-0000-000000000000 hpa=0xf010000000 dpa=0x0 dpa_length=0x40 source=Injected flags= overflow_time=0 Poison found in an unmapped DPA resource: cxl_poison: memdev=mem3 host=cxl_mem.3 serial=3 type=LIST region= region_uuid=00000000-0000-0000-0000-000000000000 hpa=0xffffffffffffffff dpa=0x40000000 dpa_length=0x40 source=Injected flags= overflow_time=0 [1]: https://www.computeexpresslink.org/download-the-specification Alison Schofield (6): cxl/mbox: Add GET_POISON_LIST mailbox command cxl/trace: Add TRACE support for CXL media-error records cxl/memdev: Add trigger_poison_list sysfs attribute cxl/region: Provide region info to the cxl_poison trace event cxl/trace: Add an HPA to cxl_poison trace events tools/testing/cxl: Mock support for Get Poison List Documentation/ABI/testing/sysfs-bus-cxl | 14 +++ drivers/cxl/core/core.h | 15 ++++ drivers/cxl/core/mbox.c | 75 ++++++++++++++++ drivers/cxl/core/memdev.c | 108 ++++++++++++++++++++++++ drivers/cxl/core/region.c | 63 ++++++++++++++ drivers/cxl/core/trace.c | 94 +++++++++++++++++++++ drivers/cxl/core/trace.h | 101 ++++++++++++++++++++++ drivers/cxl/cxlmem.h | 72 +++++++++++++++- drivers/cxl/mem.c | 36 ++++++++ drivers/cxl/pci.c | 4 + tools/testing/cxl/test/mem.c | 42 +++++++++ 11 files changed, 623 insertions(+), 1 deletion(-) base-commit: e686c32590f40bffc45f105c04c836ffad3e531a -- 2.37.3