All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Gupta <pagupta@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: kwolf@redhat.com, aarcange@redhat.com, cohuck@redhat.com,
	xiaoguangrong eric <xiaoguangrong.eric@gmail.com>,
	mst@redhat.com, armbru@redhat.com, riel@surriel.com,
	david@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com,
	lcapitulino@redhat.com, stefanha@redhat.com, pbonzini@redhat.com,
	imammedo@redhat.com, dan j williams <dan.j.williams@intel.com>,
	nilal@redhat.com, dgilbert@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH 1/7] virtio-pmem: add virtio device
Date: Fri, 24 May 2019 02:01:12 -0400 (EDT)	[thread overview]
Message-ID: <1169789759.30828172.1558677672163.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <cf892fc7-37f8-5819-eba7-dd007ed4f2c5@redhat.com>


> 
> On 5/23/19 5:24 AM, Pankaj Gupta wrote:
> > This is the implementation of virtio-pmem device. Support will require
> > machine changes for the architectures that will support it, so it will
> > not yet be compiled. It can be unlocked with VIRTIO_PMEM_SUPPORTED per
> > machine and disabled globally via VIRTIO_PMEM.
> > 
> > We cannot use the "addr" property as that is already used e.g. for
> > virtio-pci/pci devices. And we will have e.g. virtio-pmem-pci as a proxy.
> > So we have to choose a different one (unfortunately). "memaddr" it is.
> > That name should ideally be used by all other virtio-* based memory
> > devices in the future.
> >     -device virtio-pmem-pci,id=p0,bus=bux0,addr=0x01,memaddr=0x1000000...
> > 
> > Acked-by: Markus Armbruster <armbru@redhat.com>
> > [ QAPI bits ]
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > [ MemoryDevice/MemoryRegion changes, cleanups, addr property "memaddr",
> >   split up patches, unplug handler ]
> > Signed-off-by: David Hildenbrand <david@redhat.com>
> > ---
> 
> > +++ b/qapi/misc.json
> > @@ -2742,16 +2742,42 @@
> >            }
> >  }
> >  
> > +##
> > +# @VirtioPMEMDeviceInfo:
> > +#
> > +# VirtioPMEM state information
> > +#
> > +# @id: device's ID
> > +#
> > +# @memaddr: physical address in memory, where device is mapped
> > +#
> > +# @size: size of memory that the device provides
> > +#
> > +# @memdev: memory backend linked with device
> > +#
> > +# Since: 4.0
> 
> You've missed 4.0; this should be 4.1.

Yes. Will update.

> 
> > +##
> > +{ 'struct': 'VirtioPMEMDeviceInfo',
> > +  'data': { '*id': 'str',
> 
> Why is id optional? Does it make sense to have a device without an id?

I think that's how it has been for both NVDIMM and DIMM. And it works
fine with optional 'id', but requires unique 'id' for underlying memory device. 
That means its okay to keep 'id' optional for root dimm/nvdimm/virtio-pmem 
devices. 

Thanks,
Pankaj

> 
> > +            'memaddr': 'size',
> > +            'size': 'size',
> > +            'memdev': 'str'
> > +          }
> > +}
> > +
> >  ##
> >  # @MemoryDeviceInfo:
> >  #
> >  # Union containing information about a memory device
> >  #
> > +# nvdimm is included since 2.12. virtio-pmem is included since 4.0.
> 
> 4.1

o.k

> 
> > +#
> >  # Since: 2.1
> >  ##
> >  { 'union': 'MemoryDeviceInfo',
> >    'data': { 'dimm': 'PCDIMMDeviceInfo',
> > -            'nvdimm': 'PCDIMMDeviceInfo'
> > +            'nvdimm': 'PCDIMMDeviceInfo',
> > +            'virtio-pmem': 'VirtioPMEMDeviceInfo'
> >            }
> >  }
> >  
> > 
> 
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3226
> Virtualization:  qemu.org | libvirt.org
> 
> 


  reply	other threads:[~2019-05-24  6:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 10:24 [Qemu-devel] [PATCH 0/7] Qemu virtio pmem device Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 1/7] virtio-pmem: add virtio device Pankaj Gupta
2019-05-23 13:21   ` Eric Blake
2019-05-24  6:01     ` Pankaj Gupta [this message]
2019-06-04 13:15   ` Cornelia Huck
2019-06-10  5:09     ` Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 2/7] virtio-pci: Allow to specify additional interfaces for the base type Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 3/7] virtio-pmem: sync linux headers Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 4/7] virtio-pci: Proxy for virtio-pmem Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 5/7] hmp: Handle virtio-pmem when printing memory device infos Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 6/7] numa: Handle virtio-pmem in NUMA stats Pankaj Gupta
2019-05-23 10:24 ` [Qemu-devel] [PATCH 7/7] pc: Support for virtio-pmem-pci Pankaj Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1169789759.30828172.1558677672163.JavaMail.zimbra@redhat.com \
    --to=pagupta@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=nilal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riel@surriel.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.