On Wed, Sep 15, 2021 at 05:43:30PM +0200, Pankaj Raghav wrote:
> Currently, FUSED operations are not supported by QEMU. As per the 1.4 SPEC,
> controller should abort the command that requested a fused operation with 
> an INVALID FIELD error code if they are not supported.
> 
> Changes from v1:
> Added FUSE flag check also to the admin cmd processing as the FUSED 
> operations are mentioned in the general SQE section in the SPEC. 

Just for future reference, the changes from previous versions should go
below the "---" line so that they don't get included in the official
changelog.

> +    if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) {
> +        return NVME_INVALID_FIELD;
> +    }
> +
>      req->ns = ns;
>  
>      switch (req->cmd.opcode) {
> @@ -5475,6 +5479,10 @@ static uint16_t nvme_admin_cmd(NvmeCtrl *n, 
> NvmeRequest *req)
>          return NVME_INVALID_FIELD | NVME_DNR;
>      }
>  
> +    if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) {
> +        return NVME_INVALID_FIELD;
> +    }

I'm a little surprised this macro exists considering this is the first
time it's used! But this looks fine, I really hope hosts weren't
actually trying fused commands on this target, but it's good to confirm.

Reviewed-by: Keith Busch <kbu...@kernel.org>

Reply via email to