Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-28 Thread Pankaj Gupta
> > > > +int err; > > > > + > > > > +sg_init_one(&sg, buf, sizeof(buf)); > > > > + > > > > +err = virtqueue_add_outbuf(vpmem->req_vq, &sg, 1, buf, > > > > GFP_KERNEL); > > > > + > > > > +if (err) { > > > > +dev_err(&vdev->dev, "failed to send comman

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-26 Thread Jeff Moyer
Pankaj Gupta writes: >> Ideally, qemu (seabios?) would advertise a platform capabilities >> sub-table that doesn't fill in the flush bits. > > Could you please elaborate on this, how its related to disabling > MAP_SYNC? We are not doing entire nvdimm device emulation. My mistake. If you're not

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-26 Thread Pankaj Gupta
> > Dan Williams writes: > > > [ adding Jeff directly since he has also been looking at > > infrastructure to track when MAP_SYNC should be disabled ] > > > > On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams > > wrote: > >> On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: > >>> This patch ad

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-26 Thread Pankaj Gupta
> > This patch adds virtio-pmem driver for KVM > > guest. > > > > Guest reads the persistent memory range > > information from Qemu over VIRTIO and registers > > it on nvdimm_bus. It also creates a nd_region > > object with the persistent memory range > > information so that existing 'nvdimm/pmem

Re: [RFC v2 1/2] virtio: add pmem driver

2018-04-26 Thread Jeff Moyer
Dan Williams writes: > [ adding Jeff directly since he has also been looking at > infrastructure to track when MAP_SYNC should be disabled ] > > On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams > wrote: >> On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: >>> This patch adds virtio-pmem driver

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Pankaj Gupta
> > On Wed, Apr 25, 2018 at 04:54:13PM +0530, Pankaj Gupta wrote: > > diff --git a/include/uapi/linux/virtio_ids.h > > b/include/uapi/linux/virtio_ids.h > > index 6d5c3b2..5ebd049 100644 > > --- a/include/uapi/linux/virtio_ids.h > > +++ b/include/uapi/linux/virtio_ids.h > > @@ -43,5 +43,6 @@ > >

Re: [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Michael S. Tsirkin
On Wed, Apr 25, 2018 at 04:54:13PM +0530, Pankaj Gupta wrote: > diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h > index 6d5c3b2..5ebd049 100644 > --- a/include/uapi/linux/virtio_ids.h > +++ b/include/uapi/linux/virtio_ids.h > @@ -43,5 +43,6 @@ > #define VIRTIO_ID_INP

Re: [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Dan Williams
[ adding Jeff directly since he has also been looking at infrastructure to track when MAP_SYNC should be disabled ] On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams wrote: > On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: >> This patch adds virtio-pmem driver for KVM >> guest. > > Minor nit, p

Re: [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Dan Williams
On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM > guest. Minor nit, please expand your changelog line wrapping to 72 columns. > > Guest reads the persistent memory range > information from Qemu over VIRTIO and registers > it on nvdimm_bus. It als

[RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this