qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 1/7] virtio: Add shared memory capability


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [RFC PATCH 1/7] virtio: Add shared memory capability
Date: Tue, 11 Dec 2018 10:24:40 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

* Eric Blake (address@hidden) wrote:
> On 12/10/18 11:31 AM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> > 
> > Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG'
> > and the data structure 'virtio_pci_shm_cap' to go with it.
> > They allow defining shared memory regions with sizes and offsets
> > of 2^32 and more.
> > Multiple instances of the capability are allowed and distinguished
> > by a device-specific 'id'.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> > ---
> >   hw/virtio/virtio-pci.c                      | 20 ++++++++++++++++++++
> >   include/standard-headers/linux/virtio_pci.h |  9 +++++++++
> >   2 files changed, 29 insertions(+)
> > 
> 
> > +++ b/include/standard-headers/linux/virtio_pci.h
> > @@ -113,6 +113,8 @@
> >   #define VIRTIO_PCI_CAP_DEVICE_CFG 4
> >   /* PCI configuration access */
> >   #define VIRTIO_PCI_CAP_PCI_CFG            5
> > +/* Additional shared memory capability */
> > +#define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8
> >   /* This is the PCI capability header: */
> >   struct virtio_pci_cap {
> > @@ -163,6 +165,13 @@ struct virtio_pci_cfg_cap {
> >     uint8_t pci_cfg_data[4]; /* Data for BAR access. */
> >   };
> > +struct virtio_pci_shm_cap {
> > +   struct virtio_pci_cap cap;
> > +   uint32_t offset_hi;             /* Most sig 32 bits of offset */
> > +   uint32_t length_hi;             /* Most sig 32 bits of length */
> > +        uint8_t  id;                    /* To distinguish shm chunks */
> 
> TAB damage.

Thanks, fixed.

Dave

> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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