[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] hw/nvme: add new never_ready parameter to test the DN
From: |
Klaus Jensen |
Subject: |
Re: [PATCH v2 4/4] hw/nvme: add new never_ready parameter to test the DNR bit |
Date: |
Tue, 28 Jun 2022 08:07:07 +0200 |
On Jun 27 13:47, Niklas Cassel wrote:
> Since we verify that "ready_delay" parameter has to be smaller than CRWMT,
> we know that the namespace will always become ready.
> Therefore the "Namespace Not Ready" status code will never have the DNR
> bit set.
>
> Add a new parameter "never_ready" that can be used to emulate a namespace
> that never gets ready, such that the DNR bit gets set after CRWMT amount
> of time.
>
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> ---
> hw/nvme/ctrl.c | 28 +++++++++++++++++++++++++++-
> hw/nvme/ns.c | 1 +
> hw/nvme/nvme.h | 2 ++
> 3 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index 5404f67480..5f98d4778d 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -6389,6 +6412,8 @@ static void nvme_ctrl_shutdown(NvmeCtrl *n)
>
> nvme_ns_shutdown(ns);
> }
> +
> + n->cc_enable_timestamp = 0;
A shutdown does not disable the controller (in the case of QEMU), so
isn't this wrong?
signature.asc
Description: PGP signature