[Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers

Pankaj Gupta posted 7 patches 6 years, 7 months ago
Maintainers: Eric Blake <eblake@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>, Markus Armbruster <armbru@redhat.com>
[Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Pankaj Gupta 6 years, 7 months ago
Sync linux headers for virtio pmem.

Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
---
 include/standard-headers/linux/virtio_ids.h  |  1 +
 include/standard-headers/linux/virtio_pmem.h | 35 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 include/standard-headers/linux/virtio_pmem.h

diff --git a/include/standard-headers/linux/virtio_ids.h b/include/standard-headers/linux/virtio_ids.h
index 6d5c3b2d4f..32b2f94d1f 100644
--- a/include/standard-headers/linux/virtio_ids.h
+++ b/include/standard-headers/linux/virtio_ids.h
@@ -43,5 +43,6 @@
 #define VIRTIO_ID_INPUT        18 /* virtio input */
 #define VIRTIO_ID_VSOCK        19 /* virtio vsock transport */
 #define VIRTIO_ID_CRYPTO       20 /* virtio crypto */
+#define VIRTIO_ID_PMEM         27 /* virtio pmem */
 
 #endif /* _LINUX_VIRTIO_IDS_H */
diff --git a/include/standard-headers/linux/virtio_pmem.h b/include/standard-headers/linux/virtio_pmem.h
new file mode 100644
index 0000000000..7a3e2fe524
--- /dev/null
+++ b/include/standard-headers/linux/virtio_pmem.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
+/*
+ * Definitions for virtio-pmem devices.
+ *
+ * Copyright (C) 2019 Red Hat, Inc.
+ *
+ * Author(s): Pankaj Gupta <pagupta@redhat.com>
+ */
+
+#ifndef _UAPI_LINUX_VIRTIO_PMEM_H
+#define _UAPI_LINUX_VIRTIO_PMEM_H
+
+#include <linux/types.h>
+#include <linux/virtio_types.h>
+#include <linux/virtio_ids.h>
+#include <linux/virtio_config.h>
+
+struct virtio_pmem_config {
+	__le64 start;
+	__le64 size;
+};
+
+#define VIRTIO_PMEM_REQ_TYPE_FLUSH      0
+
+struct virtio_pmem_resp {
+	/* Host return status corresponding to flush request */
+	__virtio32 ret;
+};
+
+struct virtio_pmem_req {
+	/* command type */
+	__virtio32 type;
+};
+
+#endif
-- 
2.14.5


Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Cornelia Huck 6 years, 7 months ago
On Wed, 19 Jun 2019 15:19:03 +0530
Pankaj Gupta <pagupta@redhat.com> wrote:

> Sync linux headers for virtio pmem.
> 
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
>  include/standard-headers/linux/virtio_ids.h  |  1 +
>  include/standard-headers/linux/virtio_pmem.h | 35 ++++++++++++++++++++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 include/standard-headers/linux/virtio_pmem.h

That's not yet upstream, right?

If so, I fear this feature won't make 4.1, as the merge window for
Linux only opens in one or two weeks :(

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Pankaj Gupta 6 years, 7 months ago
> 
> On Wed, 19 Jun 2019 15:19:03 +0530
> Pankaj Gupta <pagupta@redhat.com> wrote:
> 
> > Sync linux headers for virtio pmem.
> > 
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> >  include/standard-headers/linux/virtio_ids.h  |  1 +
> >  include/standard-headers/linux/virtio_pmem.h | 35
> >  ++++++++++++++++++++++++++++
> >  2 files changed, 36 insertions(+)
> >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> 
> That's not yet upstream, right?

right.

> 
> If so, I fear this feature won't make 4.1, as the merge window for
> Linux only opens in one or two weeks :(

Looks so. Its lined up for 5.3 merge window.

Waiting for the kernel patch series to be merged and send an updated version
of qemu series with review suggestion if any :)  

Thanks,
Pankaj 

> 

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Michael S. Tsirkin 6 years, 7 months ago
On Tue, Jul 02, 2019 at 07:59:17AM -0400, Pankaj Gupta wrote:
> 
> > 
> > On Wed, 19 Jun 2019 15:19:03 +0530
> > Pankaj Gupta <pagupta@redhat.com> wrote:
> > 
> > > Sync linux headers for virtio pmem.
> > > 
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > ---
> > >  include/standard-headers/linux/virtio_ids.h  |  1 +
> > >  include/standard-headers/linux/virtio_pmem.h | 35
> > >  ++++++++++++++++++++++++++++
> > >  2 files changed, 36 insertions(+)
> > >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> > 
> > That's not yet upstream, right?
> 
> right.
> 
> > 
> > If so, I fear this feature won't make 4.1, as the merge window for
> > Linux only opens in one or two weeks :(
> 
> Looks so. Its lined up for 5.3 merge window.

In which tree is it?

> Waiting for the kernel patch series to be merged and send an updated version
> of qemu series with review suggestion if any :)  
> 
> Thanks,
> Pankaj 
> 
> > 

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Pankaj Gupta 6 years, 7 months ago

----- Original Message -----
> 
> On Tue, Jul 02, 2019 at 07:59:17AM -0400, Pankaj Gupta wrote:
> > 
> > > 
> > > On Wed, 19 Jun 2019 15:19:03 +0530
> > > Pankaj Gupta <pagupta@redhat.com> wrote:
> > > 
> > > > Sync linux headers for virtio pmem.
> > > > 
> > > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > > ---
> > > >  include/standard-headers/linux/virtio_ids.h  |  1 +
> > > >  include/standard-headers/linux/virtio_pmem.h | 35
> > > >  ++++++++++++++++++++++++++++
> > > >  2 files changed, 36 insertions(+)
> > > >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> > > 
> > > That's not yet upstream, right?
> > 
> > right.
> > 
> > > 
> > > If so, I fear this feature won't make 4.1, as the merge window for
> > > Linux only opens in one or two weeks :(
> > 
> > Looks so. Its lined up for 5.3 merge window.
> 
> In which tree is it?

Patches are in Dan's tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/log/?h=libnvdimm-pending

Thanks,
Pankaj
> 
> > Waiting for the kernel patch series to be merged and send an updated
> > version
> > of qemu series with review suggestion if any :)
> > 
> > Thanks,
> > Pankaj
> > 
> > > 
> 

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Michael S. Tsirkin 6 years, 7 months ago
On Tue, Jul 02, 2019 at 01:09:41PM -0400, Pankaj Gupta wrote:
> 
> 
> ----- Original Message -----
> > 
> > On Tue, Jul 02, 2019 at 07:59:17AM -0400, Pankaj Gupta wrote:
> > > 
> > > > 
> > > > On Wed, 19 Jun 2019 15:19:03 +0530
> > > > Pankaj Gupta <pagupta@redhat.com> wrote:
> > > > 
> > > > > Sync linux headers for virtio pmem.
> > > > > 
> > > > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > > > ---
> > > > >  include/standard-headers/linux/virtio_ids.h  |  1 +
> > > > >  include/standard-headers/linux/virtio_pmem.h | 35
> > > > >  ++++++++++++++++++++++++++++
> > > > >  2 files changed, 36 insertions(+)
> > > > >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> > > > 
> > > > That's not yet upstream, right?
> > > 
> > > right.
> > > 
> > > > 
> > > > If so, I fear this feature won't make 4.1, as the merge window for
> > > > Linux only opens in one or two weeks :(
> > > 
> > > Looks so. Its lined up for 5.3 merge window.
> > 
> > In which tree is it?
> 
> Patches are in Dan's tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/log/?h=libnvdimm-pending
> 
> Thanks,
> Pankaj

Hmm ok, but that isn't part of linux-next. Do you know why?

> > 
> > > Waiting for the kernel patch series to be merged and send an updated
> > > version
> > > of qemu series with review suggestion if any :)
> > > 
> > > Thanks,
> > > Pankaj
> > > 
> > > > 
> > 

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Pankaj Gupta 6 years, 7 months ago
> > > > 
> > > > > 
> > > > > On Wed, 19 Jun 2019 15:19:03 +0530
> > > > > Pankaj Gupta <pagupta@redhat.com> wrote:
> > > > > 
> > > > > > Sync linux headers for virtio pmem.
> > > > > > 
> > > > > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > > > > ---
> > > > > >  include/standard-headers/linux/virtio_ids.h  |  1 +
> > > > > >  include/standard-headers/linux/virtio_pmem.h | 35
> > > > > >  ++++++++++++++++++++++++++++
> > > > > >  2 files changed, 36 insertions(+)
> > > > > >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> > > > > 
> > > > > That's not yet upstream, right?
> > > > 
> > > > right.
> > > > 
> > > > > 
> > > > > If so, I fear this feature won't make 4.1, as the merge window for
> > > > > Linux only opens in one or two weeks :(
> > > > 
> > > > Looks so. Its lined up for 5.3 merge window.
> > > 
> > > In which tree is it?
> > 
> > Patches are in Dan's tree:
> > https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/log/?h=libnvdimm-pending
> > 
> > Thanks,
> > Pankaj
> 
> Hmm ok, but that isn't part of linux-next. Do you know why?

Dan suggested to first apply in libnvdimm-pending tree to check for any zero day test bot 
warnings and then apply in linux-next. So, I think next step is to merge in linux-next.  

Thanks,
Pankaj

> 
> > > 
> > > > Waiting for the kernel patch series to be merged and send an updated
> > > > version
> > > > of qemu series with review suggestion if any :)
> > > > 
> > > > Thanks,
> > > > Pankaj
> > > > 
> > > > > 
> > > 
> 

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers
Posted by Michael S. Tsirkin 6 years, 7 months ago
On Tue, Jul 02, 2019 at 01:50:30PM +0200, Cornelia Huck wrote:
> On Wed, 19 Jun 2019 15:19:03 +0530
> Pankaj Gupta <pagupta@redhat.com> wrote:
> 
> > Sync linux headers for virtio pmem.
> > 
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> >  include/standard-headers/linux/virtio_ids.h  |  1 +
> >  include/standard-headers/linux/virtio_pmem.h | 35 ++++++++++++++++++++++++++++
> >  2 files changed, 36 insertions(+)
> >  create mode 100644 include/standard-headers/linux/virtio_pmem.h
> 
> That's not yet upstream, right?
> 
> If so, I fear this feature won't make 4.1, as the merge window for
> Linux only opens in one or two weeks :(

I think it's ok from that POV, I put the driver in my tree
to break the deadlock for now.

-- 
MST