[PATCH V2 1/4] hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality

2022-10-21 Thread clay.mayers
From: Clay Mayers Adds ns.param.zoned.finish_time, which sets the number of seconds a zone can remain active before the zone attribute ZONE_FINISH_RECOMMENDED is set. This requires scanning the exp open, imp open and closed lists of zones whenever a zone is marked as requiring finishing. The ex

[PATCH V2 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-21 Thread clay.mayers
From: Clay Mayers If a namespace's param.zoned.finish_time is non-zero, controllers register with the namespace to be notified when entries are added to its zone-descriptor-changed log page. If the zone-descriptor-changed aen is enabled, this will cause an AEN to be sent from that controller. S

[PATCH V2 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN

2022-10-21 Thread clay.mayers
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 namespa

[PATCH V2 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-21 Thread clay.mayers
From: Clay Mayers cqe.dw1 AEN is sometimes required to convey the NSID of the log page to read. This is the case for the zone descriptor changed log page. Signed-off-by: Clay Mayers --- hw/nvme/ctrl.c | 19 +++ hw/nvme/trace-events | 2 +- include/block/nvme.h | 4 +++-

[PATCH V2 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-21 Thread clay.mayers
From: Clay Mayers Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone descriptor changed log page. Once read with RAE cleared, they are removed from the list. Zones stay in the list regardless of what other states the zones may go through so applications must be aware of ABA issues

[PATCH 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN

2022-10-20 Thread clay.mayers
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 namespa

[PATCH 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-20 Thread clay.mayers
From: Clay Mayers Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone descriptor changed log page. Once read with RAE cleared, they are removed from the list. Zones stay in the list regardless of what other states the zones may go through so applications must be aware of ABA issues

[PATCH 1/4] hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality

2022-10-20 Thread clay.mayers
From: Clay Mayers Adds ns.param.zoned.finish_time, which sets the number of seconds a zone can remain active before the zone attribute ZONE_FINISH_RECOMMENDED is set. This requires scanning the exp open, imp open and closed lists of zones whenever a zone is marked as requiring finishing. The ex

[PATCH 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-20 Thread clay.mayers
From: Clay Mayers If a namespace's param.zoned.finish_time is non-zero, controllers register with the namespace to be notified when entries are added to its zone-descriptor-changed log page. If the zone-descriptor-changed aen is enabled, this will cause an AEN to be sent from that controller. S

[PATCH 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-20 Thread clay.mayers
From: Clay Mayers cqe.dw1 AEN is sometimes required to convey the NSID of the log page to read. This is the case for the zone descriptor changed log page. Signed-off-by: Clay Mayers --- hw/nvme/ctrl.c | 19 +++ hw/nvme/nvme.h | 2 ++ hw/nvme/trace-events | 2 +-