From patchwork Wed Jun 14 17:17:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 108072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp129001vqr; Wed, 14 Jun 2023 10:57:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qrn609rz79oBp5dP65D8r1/JCsaeE2XOCj01qOOSymD0GH9HiwQ3pJCHli6QE4t4bKUGH X-Received: by 2002:a17:907:971d:b0:966:61b3:f630 with SMTP id jg29-20020a170907971d00b0096661b3f630mr14800778ejc.9.1686765439829; Wed, 14 Jun 2023 10:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686765439; cv=none; d=google.com; s=arc-20160816; b=eE0sODQqGkReRBFT/flUZ5VKt6MOew8vYE3MJeGS94SyLM9Xy4NlFp0QMBgnFy8JHq K0ykjbUBWH377ZKcYry0U9x7w8AQbJ94WHCFlLcRsDNEq/tgZoteyZGC4dHtm5V5TUPY 8B2bLhR02rTLLUbWGKk9IPapXEIziTc0Zf37Iq2a1sylKxYkV7Ai5lHb8uMP/q30V8AZ H2fJY709nx+0PVTrmzYaTLOvkBKMnG4sk7dXbfUcOPPcnRlxbvmYvUYAz3m3noTaKeVF bc30TcFdmaPzdPyqlS/qc5BG69B63XEXpm8GluTP1ZeDSnE9d3UBUff/oKJh/d22Ryyt DTwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=fby3RUTNZncP8CCJAz+FJUYi787uAcgRdAHow+jg4E0=; b=pF9l0D5n4GWhEpE4YZ/PtrYfl5WAHaaggdkBK2UDNq/0WvRW1Ru0hLg89Po9ZTX17m En/XBJokTSMjIFk6xWXqWI6kNVLGeYljvIUUsaEugMpilanXAHA9+qg7eXKvr5YE5rGQ rPhrBRHBTbEq6gTEoCpkMh/7xI1KhYLt1ralPNLm6GzpxSl/Rack2I1GqLwJwecDjdXH RHllDC4PubAheXiCGzPxSVbb9xfJLZAMO7iywVQwAUBfUr3UgABYBmk+1qE7Blzv9F2t 9+MGZNNI1dMRT/2/6Z/lthM6KnBQq0gfcg4wY1j3Hf/RRAHA7brL8/vnLYlmd8dSHO0T 1aIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cXnYKcD8; 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 gf21-20020a170906e21500b0094a6863fddfsi8153361ejb.430.2023.06.14.10.56.55; Wed, 14 Jun 2023 10:57:19 -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=cXnYKcD8; 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 S237048AbjFNRS2 (ORCPT + 99 others); Wed, 14 Jun 2023 13:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236740AbjFNRSP (ORCPT ); Wed, 14 Jun 2023 13:18:15 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22A61270F; Wed, 14 Jun 2023 10:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686763092; x=1718299092; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=/AmoSSmYynJbMOebYCDV5FrFBblS9nyHhJ1GF9w1uYM=; b=cXnYKcD8tG00/f8BTPqoVaIcXTqWpRis8U/e3b8Af8GgrjBQwsFv7Dot zFVQN5BTnlYgO5SPDoIvIV4rqsmo+5xwQ4NM/2k6rF4HNMgjstjHut04i qmYPIeocNjT1TXAHt99YVEdbNH1otVZ8hqDcl3Z1CtKt24iiS5aUrt/sf L9jJWLSLCTPZAIl/l5Kk4ry/iufqitz1nrCVWIYoQZS0lEE0nSuX3/f+6 /yob5jHt9qH7SP+FSKbUeA7Do96JxxRSoXsKEsZn8KAW24BbvfnbtTc09 OvSdMWKrQ4LHCGoIr5XFPW+Ttof1cePTKB+1H4lt9JC6T9WXRbtczeZgW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="362054371" X-IronPort-AV: E=Sophos;i="6.00,243,1681196400"; d="scan'208";a="362054371" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 10:18:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="662470736" X-IronPort-AV: E=Sophos;i="6.00,243,1681196400"; d="scan'208";a="662470736" Received: from mahbubu1-mobl.amr.corp.intel.com (HELO [192.168.1.200]) ([10.209.44.245]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 10:18:08 -0700 From: Vishal Verma Date: Wed, 14 Jun 2023 11:17:41 -0600 Subject: [PATCH v4 2/4] tools/testing/cxl: Fix command effects for inject/clear poison MIME-Version: 1.0 Message-Id: <20230602-vv-fw_update-v4-2-c6265bd7343b@intel.com> References: <20230602-vv-fw_update-v4-0-c6265bd7343b@intel.com> In-Reply-To: <20230602-vv-fw_update-v4-0-c6265bd7343b@intel.com> To: Alison Schofield , Ira Weiny , Dave Jiang , Ben Widawsky , Dan Williams Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso , Jonathan Cameron , Russ Weight , Vishal Verma , Jonathan Cameron X-Mailer: b4 0.13-dev-02a79 X-Developer-Signature: v=1; a=openpgp-sha256; l=1259; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=/AmoSSmYynJbMOebYCDV5FrFBblS9nyHhJ1GF9w1uYM=; b=owGbwMvMwCXGf25diOft7jLG02pJDCmd3/xZfsQkvj39/KBnxglTMZ13OnU1V1uLz5mwuW7Z+ 1yz7YF7RykLgxgXg6yYIsvfPR8Zj8ltz+cJTHCEmcPKBDKEgYtTACZyMZWRYY5dkvK1hMQnu8S0 6zwnn2t/dfvTVt7bRldsCnSNTxstZGJk2L9x36/uNTfW7f4iuvUpD/PTf7e+tG4wv/nh7qPoVXx /OjkB X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768701757781424469?= X-GMAIL-MSGID: =?utf-8?q?1768701757781424469?= The CXL spec (3.0, section 8.2.9.8.4) Lists Inject Poison and Clear Poison as having the effects of "Immediate Data Change". Fix this in the mock driver so that the command effect log is populated correctly. Fixes: 371c16101ee8 ("tools/testing/cxl: Mock the Inject Poison mailbox command") Cc: Alison Schofield Cc: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Vishal Verma --- tools/testing/cxl/test/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c index 34b48027b3de..403cd3608772 100644 --- a/tools/testing/cxl/test/mem.c +++ b/tools/testing/cxl/test/mem.c @@ -52,11 +52,11 @@ static struct cxl_cel_entry mock_cel[] = { }, { .opcode = cpu_to_le16(CXL_MBOX_OP_INJECT_POISON), - .effect = cpu_to_le16(0), + .effect = cpu_to_le16(EFFECT(2)), }, { .opcode = cpu_to_le16(CXL_MBOX_OP_CLEAR_POISON), - .effect = cpu_to_le16(0), + .effect = cpu_to_le16(EFFECT(2)), }, };