* [PATCH] hw/nvme: Return error for fused operations
[not found] <CGME20210910145020eucas1p223f51e73b525fc3c592f994416b57167@eucas1p2.samsung.com>
@ 2021-09-10 14:50 ` Pankaj Raghav
2021-09-13 5:32 ` Klaus Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Pankaj Raghav @ 2021-09-10 14:50 UTC (permalink / raw)
To: kbusch, its; +Cc: qemu-devel, qemu-block
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.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
hw/nvme/ctrl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index dc0e7b0030..d15a80a054 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -3893,6 +3893,10 @@ static uint16_t nvme_io_cmd(NvmeCtrl *n, NvmeRequest *req)
return ns->status;
}
+ if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) {
+ return NVME_INVALID_FIELD;
+ }
+
req->ns = ns;
switch (req->cmd.opcode) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hw/nvme: Return error for fused operations
2021-09-10 14:50 ` [PATCH] hw/nvme: Return error for fused operations Pankaj Raghav
@ 2021-09-13 5:32 ` Klaus Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Klaus Jensen @ 2021-09-13 5:32 UTC (permalink / raw)
To: Pankaj Raghav; +Cc: kbusch, qemu-devel, qemu-block
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Sep 10 16:50, 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.
>
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> ---
> hw/nvme/ctrl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index dc0e7b0030..d15a80a054 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -3893,6 +3893,10 @@ static uint16_t nvme_io_cmd(NvmeCtrl *n, NvmeRequest *req)
> return ns->status;
> }
>
> + if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) {
> + return NVME_INVALID_FIELD;
> + }
> +
> req->ns = ns;
>
> switch (req->cmd.opcode) {
> --
> 2.25.1
>
I think this should be done in nvme_admin_cmd() as well?
You could hoist this to nvme_process_sq(), but I don't think it belongs
there. So better to just copy it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-13 5:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210910145020eucas1p223f51e73b525fc3c592f994416b57167@eucas1p2.samsung.com>
2021-09-10 14:50 ` [PATCH] hw/nvme: Return error for fused operations Pankaj Raghav
2021-09-13 5:32 ` Klaus Jensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.