From nobody Wed Nov 27 11:48:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1699380639; cv=none; d=zohomail.com; s=zohoarc; b=JIG2140EyL3Nphy1p/zrWyfCrE30t8w2wCvyXlZ1k5EIh38Rs/08j+tyBE4SPXRhNeTtw/XyNeGDZnITkrSCcohgRMpk2miYIVI1TjlTC8GmfcO7mwEC34r9Fs5bwaeXLYclj7Dwzzb4fExenvqMFLrJNY49NO7S7VPCvHKhm8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699380639; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ogYJbqlkzS2Yd8saws9Occt0F7m6RWm2l0bkCCgcR3U=; b=OSmnbiwUT6w3DDXCAGi9CXso7lnN4kryR2mct0tnhpRenYlt08PGSEDCkr6mlIUucmMDqf9s/oXsMOPTqn6fxVBUHt+/mZPJfqSYBkFxseyXuURrTFWwMt3vwwUMUq6vtUBycs6KBi9ReMyzAkEs/C+fyyPod/heP1ajJb44E+8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699380639268312.3079544762189; Tue, 7 Nov 2023 10:10:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QX1-0003WO-UN; Tue, 07 Nov 2023 13:10:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0QX0-0003UM-BV for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:10:30 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0QWr-0002ix-2P for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:10:30 -0500 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5aa481d53e5so4080429a12.1 for ; Tue, 07 Nov 2023 10:10:20 -0800 (PST) Received: from DT.local (c-71-202-158-162.hsd1.ca.comcast.net. [71.202.158.162]) by smtp.gmail.com with ESMTPSA id az10-20020a170902a58a00b001cc615e6850sm131924plb.90.2023.11.07.10.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 10:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699380617; x=1699985417; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ogYJbqlkzS2Yd8saws9Occt0F7m6RWm2l0bkCCgcR3U=; b=F62o9/q2Mqu8GS0dfhOZyso7RT6hASuHOCoSBfoWochdmUNnR43aULGM+0aEMMVaZP wVd4+lz3sLFyilY67L46o3+lYvnDCV4Sc5Et5sR/8hniMvQsup2jMGkkqPNKOOt2P5ni GGeZunmaCbYrtmbI3pp5BXqHrSbVtbHqNIA8ymR34U1SQ9tCT6rk4OMZC7Pz6/Xz2k89 II/kekCTdAE8QCwcYX+mJgCgV84ZcTov7eaEM7EqUM/Sh387MPpisSEvQRmpFbg+bsg0 nkK1GMx2+QbSMxxHO99ujFur4uY7FPIu0kFQOIDkmgtr0wbX7xnK1yyJgvZPBxJb1FCZ p5Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699380617; x=1699985417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ogYJbqlkzS2Yd8saws9Occt0F7m6RWm2l0bkCCgcR3U=; b=BAz1oXcxEHD5gS81mkTkOEeA/MeZQpZMja/7oaAnVCn/kUSDxD+KM/KeSG4DSMjyKF hyAksOwA4WqWczyxsN0fZxhUwe7yTcQyJWRxy0ccnqmLTvOrI+xnsAyiiPmRQgI9CBuS P256TvsOMUsMDATUTIv5sL+ioWilO7qlOMQDuXbffLbcRJafPL3bBP+I95azxbvQN8Y/ wcB17Ny+PMNSLiY0puwxu0UZua1wI+Ww9icqULAQDosJGh+c9yuVqp8MxPlLVliFlh7C bllIqtYm58UwGiIi2X61/CwOGRn4vZbX4YnJMi39vktiw5K0neILkHewNhBWAEpaePPo WgoQ== X-Gm-Message-State: AOJu0Yz+hqxJpG6/pW9gJE/liyz9oWHgwotsEW1l73X8biRyUKOV/11N bH2Wrb6FGlokIPv/3WZWU/ArrWJx6B8= X-Google-Smtp-Source: AGHT+IFWm9kgjVGfWor3OqA8aZVUBtUhbkrx5BtmA6zSu7sqrwDUHquMPZD7UdUq5z+wxXKrUcUVUg== X-Received: by 2002:a17:90b:4acb:b0:280:3650:382a with SMTP id mh11-20020a17090b4acb00b002803650382amr22482838pjb.16.1699380617158; Tue, 07 Nov 2023 10:10:17 -0800 (PST) From: nifan.cxl@gmail.com To: qemu-devel@nongnu.org Cc: jonathan.cameron@huawei.com, linux-cxl@vger.kernel.org, ira.weiny@intel.com, dan.j.williams@intel.com, a.manzanares@samsung.com, dave@stgolabs.net, nmtadam.samsung@gmail.com, nifan@outlook.com, jim.harris@samsung.com, Fan Ni Subject: [PATCH v3 1/9] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command Date: Tue, 7 Nov 2023 10:07:05 -0800 Message-ID: <20231107180907.553451-2-nifan.cxl@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107180907.553451-1-nifan.cxl@gmail.com> References: <20231107180907.553451-1-nifan.cxl@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=nifan.cxl@gmail.com; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1699380639994100001 Content-Type: text/plain; charset="utf-8" From: Fan Ni Based on CXL spec 3.0 Table 8-94 (Identify Memory Device Output Payload), dynamic capacity event log size should be part of output of the Identify command. Add dc_event_log_size to the output payload for the host to get the info. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c index f1145e9671..8eceedfa87 100644 --- a/hw/cxl/cxl-mailbox-utils.c +++ b/hw/cxl/cxl-mailbox-utils.c @@ -21,6 +21,7 @@ #include "sysemu/hostmem.h" =20 #define CXL_CAPACITY_MULTIPLIER (256 * MiB) +#define CXL_DC_EVENT_LOG_SIZE 8 =20 /* * How to add a new command, example. The command set FOO, with cmd BAR. @@ -753,8 +754,9 @@ static CXLRetCode cmd_identify_memory_device(const stru= ct cxl_cmd *cmd, uint16_t inject_poison_limit; uint8_t poison_caps; uint8_t qos_telemetry_caps; + uint16_t dc_event_log_size; } QEMU_PACKED *id; - QEMU_BUILD_BUG_ON(sizeof(*id) !=3D 0x43); + QEMU_BUILD_BUG_ON(sizeof(*id) !=3D 0x45); CXLType3Dev *ct3d =3D CXL_TYPE3(cci->d); CXLType3Class *cvc =3D CXL_TYPE3_GET_CLASS(ct3d); CXLDeviceState *cxl_dstate =3D &ct3d->cxl_dstate; @@ -780,6 +782,7 @@ static CXLRetCode cmd_identify_memory_device(const stru= ct cxl_cmd *cmd, st24_le_p(id->poison_list_max_mer, 256); /* No limit - so limited by main poison record limit */ stw_le_p(&id->inject_poison_limit, 0); + stw_le_p(&id->dc_event_log_size, CXL_DC_EVENT_LOG_SIZE); =20 *len_out =3D sizeof(*id); return CXL_MBOX_SUCCESS; --=20 2.42.0