From patchwork Thu Jan 5 23:37:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 3637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp545992wrt; Thu, 5 Jan 2023 15:38:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXsi4tcm3rQHEnwF8fjWoKr6Gi8CNGHVLm6riVGl8Iizv9zbVOccj+YajsWJDfiv9hbI2/j9 X-Received: by 2002:a17:90b:1bc2:b0:212:daa7:590 with SMTP id oa2-20020a17090b1bc200b00212daa70590mr72048729pjb.7.1672961938543; Thu, 05 Jan 2023 15:38:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672961938; cv=none; d=google.com; s=arc-20160816; b=prYlU8olVHIVjBiYj9IMVf7uWmJHyIa29bB323iyk5KwZvn3SuJE0u3Lgv3HuhnUAu UcULS1xw5MKODOTbD03QFFx1410LWUIFxGIi5watV/L02AsMsODTRDtB53s8oqSOSu8w hRb0shrItR32+kunJDH96sCgZ1wUMpJekZDDMqeywmVeF2bTbZVnmTqM5VW3NemXMlu7 wuSHYgy5vzRJo9Ia3gy98SLW0Fo8N28cvzS8rY4f2ihZMi8+rGrk59GAn+CrpkuoR9YL jlnVJdx57T5MRopFJuqjzUG5pX1zcuR5K5x+SpGwUBcaZXsOyBQOjrvUdBL9i4wNQvZ1 vJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=+d3GtLGquuijNp4VWEzzsIsd5NcAqzE7FlGdzeiO7oA=; b=yEpd0UmVFYzDzDbxV0MLk1GL8K0TuBVEmlLpRzv1LuogeF4RLfhTu/zQbhDP6d/A4t XkZ/PLQ2g6WGCr2PC5HWim5WhXx4sD7ofIPsSoeqd55zV171eEFaq6FjPXwe/1ZUrqLD c78SysbTS2KFKANXATNEUy1cWGPzrFS1AsYmGdd2dfnnrXbCHZPeOM/xnAzF2tdMkI8A OmJnY/2lfTMNpkqwbcivZmP4t7YGrFbPS78r/SWCHyfrT2R+8jyntMgf0VQZIzaeXuu7 XMzhhTqecg1b1HlaBwSIIYbqfDPxYIWDHEWbEtnSTRifIgTEol2g7OMJCwQ8gZvuLOIq we4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Twoc7Tlq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a17090aa01700b00213b01e42adsi3189751pjp.42.2023.01.05.15.38.46; Thu, 05 Jan 2023 15:38:58 -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=@intel.com header.s=Intel header.b=Twoc7Tlq; 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 S236408AbjAEXiS (ORCPT + 99 others); Thu, 5 Jan 2023 18:38:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236074AbjAEXiF (ORCPT ); Thu, 5 Jan 2023 18:38:05 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30E961A81D; Thu, 5 Jan 2023 15:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672961884; x=1704497884; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=ERsIP7LqaPV9arMxZigY0Ynxbbh/lqB5dmaVofVmm/U=; b=Twoc7TlqdxgnLJ8RAUqTtwTsbQqDkNeOjmrkZHmyTRtASJv+Nrln3TUV xJkTrn+B8HhUityzMVxJ9KQzcc49VRBTuNVt8jVUjudelqpljQT7FaX6g LOGALGVNewykaqteAO7w/buoBAf8K0vAmnWFywGDgMnZDKFBliFez4bZV B9QWvRQfIwxYrWC8UmwdmLJv0psN4OuFfEdhROCuf8/trjNbiPSqvqejT l4oV/Yyz1fdDOcHl1vCRlPF4sllT1b9aQGdtFU0UmRp47GiQDWkmYkZfu td3rskpd3/W9kjZUNUM5Dkno1wbQo5whV7f0QwpSCTx4/tGjOg/Cfe6o8 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="305871972" X-IronPort-AV: E=Sophos;i="5.96,303,1665471600"; d="scan'208";a="305871972" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2023 15:38:03 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="798093019" X-IronPort-AV: E=Sophos;i="5.96,303,1665471600"; d="scan'208";a="798093019" Received: from iweiny-mobl.amr.corp.intel.com (HELO localhost) ([10.212.87.74]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2023 15:38:02 -0800 From: Ira Weiny Subject: [PATCH v5 0/8] cxl: Process event logs Date: Thu, 05 Jan 2023 15:37:51 -0800 Message-Id: <20221216-cxl-ev-log-v5-0-180c618ed5d1@intel.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAE9ft2MC/zWNyw6CMBBFf4V07ZB2eKkr/8OwKHWASWprWkQI4 d+tJC7PSe49m4gUmKK4ZpsINHNk7xJUp0yYUbuBgB+JBUpEhaoGs1igGawfoJd1cS7UpalKJdKg 05GgC9qZMU3c29okX4F6Xo7CvU08cpx8WI/grH72/42ykTU2uSoaLCWCAg46/xC79cZuIpsb/xT tvu9fKz8gZbYAAAA= To: Dan Williams Cc: Bjorn Helgaas , Alison Schofield , Vishal Verma , Ira Weiny , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Ben Widawsky , Steven Rostedt , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Bjorn Helgaas X-Mailer: b4 0.12-dev-cc11a X-Developer-Signature: v=1; a=ed25519-sha256; t=1672961882; l=2364; i=ira.weiny@intel.com; s=20221211; h=from:subject:message-id; bh=ERsIP7LqaPV9arMxZigY0Ynxbbh/lqB5dmaVofVmm/U=; b=hrp8OO0tb6rLWEl+gAKRgXXBC4IvpDkNBJuBcTBXVZL1W7eo9HWjSXGzQqts95+xSVCj7JHnW39g BWG9JfSLBkZ1uDhelyQvN+VatXC7bfc/BaRRf4LL1ub1Q1kPt/RB X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=noldbkG+Wp1qXRrrkfY1QJpDf7QsOEthbOT7vm0PqsE= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754227738065648524?= X-GMAIL-MSGID: =?utf-8?q?1754227738065648524?= This code has been tested with a newer qemu which allows for more events to be returned at a time as well an additional QMP event and interrupt injection. Those patches will follow once they have been cleaned up. The series is now in 3 parts: 1) Base functionality including interrupts 2) Tracing specific events (Dynamic Capacity Event Record is defered) 3) cxl-test infrastructure for basic tests To: Dan Williams Cc: Bjorn Helgaas Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Davidlohr Bueso Cc: Jonathan Cameron Cc: Dave Jiang Cc: Ben Widawsky Cc: Steven Rostedt Cc: linux-kernel@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-cxl@vger.kernel.org Signed-off-by: Ira Weiny --- Changes in v5: - Drop patch 1/9 as it was already picked up in CXL next - Johnny/Jonathan - base clear event playload length on nr handles - Minor clean ups - Link to v4: https://lore.kernel.org/r/20221212070627.1372402-1-ira.weiny@intel.com --- Davidlohr Bueso (1): cxl/mem: Wire up event interrupts Ira Weiny (7): cxl/mem: Read, trace, and clear events on driver load cxl/mem: Trace General Media Event Record cxl/mem: Trace DRAM Event Record cxl/mem: Trace Memory Module Event Record cxl/test: Add generic mock events cxl/test: Add specific events cxl/test: Simulate event log overflow drivers/cxl/core/mbox.c | 187 +++++++++++++++++ drivers/cxl/core/trace.h | 479 ++++++++++++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 16 ++ drivers/cxl/cxlmem.h | 173 +++++++++++++++ drivers/cxl/cxlpci.h | 6 + drivers/cxl/pci.c | 237 +++++++++++++++++++++ tools/testing/cxl/test/Kbuild | 2 +- tools/testing/cxl/test/mem.c | 352 +++++++++++++++++++++++++++++++ 8 files changed, 1451 insertions(+), 1 deletion(-) --- base-commit: 589c3357370a596ef7c99c00baca8ac799fce531 change-id: 20221216-cxl-ev-log-f06383197541 Best regards,