qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] hw/nvme: 64-bit pi support


From: Keith Busch
Subject: Re: [PATCH 6/6] hw/nvme: 64-bit pi support
Date: Wed, 16 Feb 2022 13:20:43 -0800

On Mon, Feb 14, 2022 at 01:30:29PM +0100, Klaus Jensen wrote:
> @@ -384,6 +389,12 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns, 
> Error **errp)
>          return -1;
>      }
>  
> +    if (ns->params.pif != NVME_PI_GUARD_16 &&
> +        ns->params.pif != NVME_PI_GUARD_64) {
> +        error_setg(errp, "invalid 'pif'");
> +        return -1;
> +    }

In addition, the requested metadata size ('params.ms') should be checked
against the requested PI option. The function currently just checks
against 8 bytes, but the 64b guard requires at least 16 bytes.

Otherwise, looks great.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]