qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] NVMe: Initial commit


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] NVMe: Initial commit
Date: Fri, 19 Apr 2013 11:25:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Apr 10, 2013 at 02:16:34PM -0600, Keith Busch wrote:
> Initial commit for emulated nvme pci storage device. Implements the
> minimum from the specification to work with existing drivers.
> 
> Cc: Keith Busch <address@hidden>
> Signed-off-by: Keith Busch <address@hidden>
> 
> A lot of people are very interested in this, so I should have more time
> to dedicate working on submitting this upstream.  Thanks for the feedback
> on the last round. Only difference here besides the merge-up is making
> the serial option mandatory and a fix for > 4GB backing storage.
> ---
>  MAINTAINERS              |    5 +
>  default-configs/pci.mak  |    1 +
>  hw/block/Makefile.objs   |    1 +
>  hw/block/nvme.c          |  944 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  hw/block/nvme.h          |  712 ++++++++++++++++++++++++++++++++++
>  include/hw/pci/pci_ids.h |    1 +
>  6 files changed, 1664 insertions(+), 0 deletions(-)
>  create mode 100644 hw/block/nvme.c
>  create mode 100644 hw/block/nvme.h

I don't see bdrv_aio_flush() in this patch.  How does the guest ensure
that data is safely on persistent storage (e.g. protected against data
loss by power failure).

> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4dfd8bf..fbd973e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -609,6 +609,11 @@ S: Supported
>  F: hw/char/virtio-serial-bus.c
>  F: hw/char/virtio-console.c
>  
> +nvme
> +M: Keith Busch <address@hidden>
> +S: Supported
> +F: hw/nvme*

hw/block/nvme*

> +static void nvme_class_init(ObjectClass *oc, void *data)
> +{
> +    DeviceClass *dc = DEVICE_CLASS(oc);
> +    PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc);
> +
> +    pc->init = nvme_init;
> +    pc->exit = nvme_exit;
> +    pc->class_id = PCI_CLASS_STORAGE_EXPRESS;
> +    pc->vendor_id = PCI_VENDOR_ID_INTEL;
> +    pc->device_id = 0x5845;
> +    pc->subsystem_vendor_id = PCI_VENDOR_ID_INTEL;
> +    pc->subsystem_id = 0x1234;

0x1234?



reply via email to

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