qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature
@ 2015-04-30  9:44 Christoph Hellwig
  2015-04-30 14:03 ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2015-04-30  9:44 UTC (permalink / raw)
  To: Keith Busch, qemu-devel

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.

Signed-off-by: Christoph Hellwig <hch@lst.de>

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;
     }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature
  2015-04-30  9:44 [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature Christoph Hellwig
@ 2015-04-30 14:03 ` Keith Busch
  2015-05-07 13:51   ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2015-04-30 14:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Keith Busch, qemu-devel

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 <keith.busch@intel.com>

> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> 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;
>     }
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature
  2015-04-30 14:03 ` Keith Busch
@ 2015-05-07 13:51   ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2015-05-07 13:51 UTC (permalink / raw)
  To: Keith Busch; +Cc: Christoph Hellwig, qemu-block, qemu-devel

[ Cc: qemu-block ]

Am 30.04.2015 um 16:03 hat Keith Busch geschrieben:
> 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 <keith.busch@intel.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-07 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30  9:44 [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature Christoph Hellwig
2015-04-30 14:03 ` Keith Busch
2015-05-07 13:51   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).