From: Klaus Jensen <[email protected]> nvme_do_write_fdp falls back to placement handle zero for a write that has no Data Placement directive or where the placement identifier is invalid. However, it then passes the invalid placement identifier to nvme_update_ruh which results in no update to RUAMW for placement handle zero.
Reset the placement identifier along with the handle in the fallback. Cc: [email protected] Link: https://gitlab.com/qemu-project/qemu/-/work_items/4520 Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation") Reviewed-by: Jesper Wendel Devantier <[email protected]> Signed-off-by: Klaus Jensen <[email protected]> --- hw/nvme/ctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 685cbc2f340c..a0d22dacedfa 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -3754,6 +3754,7 @@ static void nvme_do_write_fdp(NvmeCtrl *n, NvmeRequest *req, uint64_t slba, !nvme_parse_pid(ns, pid, &ph, &rg)) { ph = 0; rg = 0; + pid = 0; } ruhid = ns->fdp.phs[ph]; -- 2.53.0
