qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature


From: Keith Busch
Subject: Re: [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature
Date: Thu, 30 Apr 2015 14:03:56 +0000 (UTC)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Thu, 30 Apr 2015, Christoph Hellwig wrote:
The SCSI emulation in the Linux NVMe driver really wants to know
if a device has a volatile write cache.  Given that qemu has moved
away from a model where we report the backing store WCE bit to
one where the WCE bit is supposed to be part of the migratable
guest-visible state we always return 1 here.

Thanks, this fix was long overdue and already incorporated in my tree. I
really need to get my act together for a legit pull request with all the
other 1.0, 1.1 and 1.2 features.

Acked-by: Keith Busch <address@hidden>

Signed-off-by: Christoph Hellwig <address@hidden>

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 1e07166..50d76f1 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -479,6 +479,9 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeCmd *cmd, 
NvmeRequest *req)
        req->cqe.result =
            cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));
        break;
+    case NVME_VOLATILE_WRITE_CACHE:
+        req->cqe.result = cpu_to_le32(1);
+        break;
    default:
        return NVME_INVALID_FIELD | NVME_DNR;
    }




reply via email to

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