From nobody Mon Nov 25 04:56:31 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1717528108; cv=none; d=zohomail.com; s=zohoarc; b=J8i4rWuPNQsD2UqIlJNzKFwCLxtGipey3/VYOe7V6PyseBV19FBeSFdvlmg0U/JBpaiTDrN9fjxUt7m6N7iJChgUFD4Zh5wT2HCmaBLmuZh7rFz7RKlOjcekvrUA0zwmGue+g0eiIojR/ukfnm0a64bTiAGrdr3bts6seMhAXFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717528108; h=Content-Type: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=R2rkXgOWy7oaxjC82Fwhko4ewIXnfZhtW9KkNOPqa7A=; b=ix16aEDAo/z1IQFy200m/Up16kE3IOqW2cNhyQku6QTtSFRndWJB1YF7pNf7WifhGry1TAUjy0dTHKHJMiP8tYRFEmq94UFPl3mtbjaz/PQqpkblYY9nx4shniCg7ZYzqcnbjAui7oA6XKFXeyssqbGRUKfSHWRz6lgLkdHNoJs= 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 1717528108098592.0184073211499; Tue, 4 Jun 2024 12:08:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEZV4-0007Pv-8d; Tue, 04 Jun 2024 15:07:14 -0400 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 1sEZV3-0007HG-6S for qemu-devel@nongnu.org; Tue, 04 Jun 2024 15:07:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEZV0-0000sB-UJ for qemu-devel@nongnu.org; Tue, 04 Jun 2024 15:07:12 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-316-RK54PfahOryfk7mbDNq1sA-1; Tue, 04 Jun 2024 15:07:08 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4215604d4a2so1746245e9.1 for ; Tue, 04 Jun 2024 12:07:07 -0700 (PDT) Received: from redhat.com ([2a0d:6fc7:552:cf5c:2b13:215c:b9df:f231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42129de0cf9sm181448665e9.13.2024.06.04.12.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717528029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R2rkXgOWy7oaxjC82Fwhko4ewIXnfZhtW9KkNOPqa7A=; b=QoFfV9FrM3w9Ykd5AjfWHtpqnS6XpdmpC7HCDYvv47Ec+xI6myuton9MvStKJaC14dmUgl LZEt+Yf7za8h7UifFaWWuZoROS+JZBbgWdFO7IuQy0b2gtxWa0pqOdenr1poZ04+ipGti+ 1QgK/Xn4pEnN1+uulz1/YalBrc5boZE= X-MC-Unique: RK54PfahOryfk7mbDNq1sA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717528026; x=1718132826; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R2rkXgOWy7oaxjC82Fwhko4ewIXnfZhtW9KkNOPqa7A=; b=o1P0AYshxy4Vg7CV2jrO0akWT8lDNtB4nBUcxf32Hts0caJ18Bgwrvs5Yn8jtRuzIL HwhQN29FxTlMM5ZRW5nyVcFZiKluXKmjTvkqVdjFO9stLrY7JptPH2VUf8rzjFkcsaIr UiZOx7iRklWk/QXK0wVkfDep2QdB/8udKsUJWYdKD2gH0QEKZhuDsSmxdPFWyESEiENd HyIxzmpL2BIczuWN0/z4JaYrG9Q4nWt1KrTn6UnxH+poOF0lp+hTeUpXmuygXJNLXtX5 8Tu1vq8W0vpo1jJE+tPhl0qZ8EBcItLe8Xbpo4PndGvzCB2XPoquetKHp5cZqVkn3dip l1TQ== X-Gm-Message-State: AOJu0Yym6sWvnbdU/3+GOmdWm1X8ginOl8MPS+9xSwRM5GxPkDGaiPW1 UiM+BTDDLErgA9101w3JlHYsbVeHISO8HSzVP1zLzzDId1ZV562CXCtJP7mWtUeSbo6YSuF3gDF 98d620XEN228QkUt9F190oXYCEzT/1Zz3ahfWc5of/ThluJ2cr0PsFI/whhcQTVFjY0bnEXXk8I zxQYnf8urD97YiyG24N5obcFhb6yVpsA== X-Received: by 2002:a05:600c:3155:b0:41f:fca0:8c09 with SMTP id 5b1f17b1804b1-421563393d0mr3267595e9.40.1717528026381; Tue, 04 Jun 2024 12:07:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiv50TYIbSEk0CYNaTOAwM6d///BS30WglIOV4ybTJnZgzqoePnakqaMFWz6uEcARDTjHKXA== X-Received: by 2002:a05:600c:3155:b0:41f:fca0:8c09 with SMTP id 5b1f17b1804b1-421563393d0mr3267355e9.40.1717528025778; Tue, 04 Jun 2024 12:07:05 -0700 (PDT) Date: Tue, 4 Jun 2024 15:07:02 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Fan Ni , Gregory Price , Jonathan Cameron Subject: [PULL 19/46] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent 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=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1717528110099100007 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fan Ni Based on CXL spec r3.1 Table 8-127 (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. Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Signed-off-by: Fan Ni Message-Id: <20240523174651.1089554-4-nifan.cxl@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 2a64c58e2f..626acc1d0d 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. @@ -780,8 +781,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; @@ -807,6 +809,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 MST