From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35E4FC4332F for ; Fri, 21 Oct 2022 00:44:04 +0000 (UTC) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olg8p-0005Pl-7v for qemu-devel@archiver.kernel.org; Thu, 20 Oct 2022 20:44:03 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olg53-0004eB-MS for qemu-devel@archiver.kernel.org; Thu, 20 Oct 2022 20:40:09 -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 1olg4y-0004Vh-SR for qemu-devel@nongnu.org; Thu, 20 Oct 2022 20:40:04 -0400 Received: from usmailhost21.kioxia.com ([12.0.68.226] helo=SJSMAIL01.us.kioxia.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olg4w-0005qh-7M for qemu-devel@nongnu.org; Thu, 20 Oct 2022 20:40:04 -0400 Received: from localhost.localdomain (10.93.83.20) by SJSMAIL01.us.kioxia.com (10.90.133.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Thu, 20 Oct 2022 17:18:52 -0700 From: To: CC: Keith Busch , Klaus Jensen , Fam Zheng , =?UTF-8?q?Phlippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN Date: Thu, 20 Oct 2022 17:18:31 -0700 Message-ID: <20221021001835.942642-1-clay.mayers@kioxia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.93.83.20] X-ClientProxiedBy: SJSMAIL01.us.kioxia.com (10.90.133.90) To SJSMAIL01.us.kioxia.com (10.90.133.90) Received-SPF: pass client-ip=12.0.68.226; envelope-from=Clay.Mayers@kioxia.com; helo=SJSMAIL01.us.kioxia.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Clay Mayers ZNS controllers have the option to limit the time a zone can remain in the active state. It begins with a background process in the controller setting the finish-zone-recommended FZR attribute for a zone. As part of setting this attribute, the zone's id is added to the namespace's zone-descriptor-changed (ZDC) log page. If enabled, items added to the ZDC log page generate a ZDC "asynchronous event notification" AEN. Optionally, the control can induce a "zone excursion" forcing the zone into the finished state that also generates a ZDC event. Zone enabled applications need to properly handle ZDC events. In a real device, the timeout is many hours making testing an application difficult. Implemented is the generation of FZR ZDC events to speed up O/S and application testing. Added to the zoned NVMe command set is an optional, per-namespace timer (zoned.finish_time) to set the FZR attr for long-lived active zones; A per namespace ZDC log page; AEN results to including CQE.DW1 (the NSID of the ZDC AEN) and generating a ZDC AEN if it's been enabled. Zone excursions are not modeled. See section 5.5 of the NVMe Zoned Namespace Command Set Specification v1.1 for more details. Clay Mayers (4): hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality hw/block/nvme: add zone descriptor changed log page hw/block/nvme: supply dw1 for aen result hw/block/nvme: add zone descriptor changed AEN docs/system/devices/nvme.rst | 5 ++ hw/nvme/ctrl.c | 166 +++++++++++++++++++++++++++++++++-- hw/nvme/ns.c | 15 ++++ hw/nvme/nvme.h | 37 +++++++- hw/nvme/trace-events | 3 +- include/block/nvme.h | 14 ++- 6 files changed, 225 insertions(+), 15 deletions(-) -- 2.27.0