[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.
- [PATCH 0/6] hw/nvme: enhanced protection information (64-bit guard), Klaus Jensen, 2022/02/14
- [PATCH 1/6] hw/nvme: move dif/pi prototypes into dif.h, Klaus Jensen, 2022/02/14
- [PATCH 5/6] hw/nvme: add pi tuple size helper, Klaus Jensen, 2022/02/14
- [PATCH 2/6] hw/nvme: add host behavior support feature, Klaus Jensen, 2022/02/14
- [PATCH 3/6] hw/nvme: move format parameter parsing, Klaus Jensen, 2022/02/14
- [PATCH 6/6] hw/nvme: 64-bit pi support, Klaus Jensen, 2022/02/14
- Re: [PATCH 6/6] hw/nvme: 64-bit pi support,
Keith Busch <=
- [PATCH 4/6] hw/nvme: add support for the lbafee hbs feature, Klaus Jensen, 2022/02/14
- Re: [PATCH 0/6] hw/nvme: enhanced protection information (64-bit guard), Keith Busch, 2022/02/16