From: Vivek Goyal <vgoyal@redhat.com>
To: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: virtio-dev@lists.oasis-open.org,
Miklos Szeredi <miklos@szeredi.hu>,
mst@redhat.com, dri-devel@lists.freedesktop.org,
sebastien.boeuf@intel.com, kraxel@redhat.com
Subject: Re: [PATCH v2 04/23] virtio: Add get_shm_region method
Date: Wed, 2 Sep 2020 18:15:14 -0400 [thread overview]
Message-ID: <20200902221514.GE1263242@redhat.com> (raw)
In-Reply-To: <20200902210847.2689-5-gurchetansingh@chromium.org>
Hi Gurchetan,
Now Miklos has queued, these tree virtio patches for shared memory
region in his tree as part of virtiofs dax patch series.
I am hoping this will get merged in 5.10 through his tree.
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/log/?h=dax
Thanks
Vivek
On Wed, Sep 02, 2020 at 02:08:28PM -0700, Gurchetan Singh wrote:
> From: Sebastien Boeuf <sebastien.boeuf@intel.com>
>
> Virtio defines 'shared memory regions' that provide a continuously
> shared region between the host and guest.
>
> Provide a method to find a particular region on a device.
>
> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> ---
> include/linux/virtio_config.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index 8fe857e27ef32..4b8e38c5c4d8c 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -11,6 +11,11 @@
>
> struct irq_affinity;
>
> +struct virtio_shm_region {
> + u64 addr;
> + u64 len;
> +};
> +
> /**
> * virtio_config_ops - operations for configuring a virtio device
> * Note: Do not assume that a transport implements all of the operations
> @@ -66,6 +71,7 @@ struct irq_affinity;
> * the caller can then copy.
> * @set_vq_affinity: set the affinity for a virtqueue (optional).
> * @get_vq_affinity: get the affinity for a virtqueue (optional).
> + * @get_shm_region: get a shared memory region based on the index.
> */
> typedef void vq_callback_t(struct virtqueue *);
> struct virtio_config_ops {
> @@ -89,6 +95,8 @@ struct virtio_config_ops {
> const struct cpumask *cpu_mask);
> const struct cpumask *(*get_vq_affinity)(struct virtio_device *vdev,
> int index);
> + bool (*get_shm_region)(struct virtio_device *vdev,
> + struct virtio_shm_region *region, u8 id);
> };
>
> /* If driver didn't advertise the feature, it will never appear. */
> @@ -251,6 +259,15 @@ int virtqueue_set_affinity(struct virtqueue *vq, const struct cpumask *cpu_mask)
> return 0;
> }
>
> +static inline
> +bool virtio_get_shm_region(struct virtio_device *vdev,
> + struct virtio_shm_region *region, u8 id)
> +{
> + if (!vdev->config->get_shm_region)
> + return false;
> + return vdev->config->get_shm_region(vdev, region, id);
> +}
> +
> static inline bool virtio_is_little_endian(struct virtio_device *vdev)
> {
> return virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
> --
> 2.26.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-09-02 22:15 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 21:08 [virtio-dev] [PATCH v2 00/23] Blob prerequisites + blob resources Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 01/23] Fix use after free in get_capset_info callback Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 02/23] drm/virtio: fix uninitialized variable Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 03/23] drm/virtio: report uuid in debugfs Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 04/23] virtio: Add get_shm_region method Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 22:15 ` Vivek Goyal [this message]
2020-09-03 0:00 ` [virtio-dev] " Gurchetan Singh
2020-09-03 0:00 ` Gurchetan Singh
2020-09-09 7:03 ` [virtio-dev] " Gerd Hoffmann
2020-09-09 7:03 ` Gerd Hoffmann
2020-09-09 7:13 ` Miklos Szeredi
2020-09-09 9:26 ` Daniel Vetter
2020-09-09 9:28 ` Daniel Vetter
2020-09-10 0:28 ` [virtio-dev] " Gurchetan Singh
2020-09-10 0:28 ` Gurchetan Singh
2020-09-10 9:56 ` Miklos Szeredi
2020-09-14 23:44 ` [virtio-dev] " Gurchetan Singh
2020-09-14 23:44 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 05/23] virtio: Implement get_shm_region for PCI transport Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 06/23] virtio: Implement get_shm_region for MMIO transport Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 07/23] drm/virtio: blob prep: refactor getting pages and attaching backing Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 08/23] drm/virtio: blob prep: make CPU responses more generic Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 09/23] virtio-gpu api: blob resources Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-09 6:55 ` [virtio-dev] " Gerd Hoffmann
2020-09-09 6:55 ` Gerd Hoffmann
2020-09-17 0:16 ` [virtio-dev] " Gurchetan Singh
2020-09-17 0:16 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 10/23] virtio-gpu api: host visible feature Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-09 7:05 ` [virtio-dev] " Gerd Hoffmann
2020-09-09 7:05 ` Gerd Hoffmann
2020-09-09 7:09 ` [virtio-dev] " Gerd Hoffmann
2020-09-09 7:09 ` Gerd Hoffmann
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 11/23] virtio-gpu api: cross-device feature Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 12/23] drm/virtio: implement blob resources: probe for the feature Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 13/23] drm/virtio: implement blob resources: probe for host visible region Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 14/23] drm/virtio: implement blob resources: expose virtio_gpu_resource_id_get Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 15/23] drm/virtio: implement blob resources: add new fields to internal structs Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 16/23] drm/virtio: implement blob resources: implement vram object Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 17/23] drm/virtio: implement blob resources: hypercall interface Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 18/23] drm/virtio: implement blob resources: blob display integration Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 19/23] drm/virtio: implement blob resources: refactor UUID code somewhat Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 20/23] drm/virtio: implement blob resources: fix stride discrepancy Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 21/23] drm/virtio: implement blob resources: report blob mem to userspace Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 22/23] drm/virtio: implement blob resources: resource create blob ioctl Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
2020-09-03 21:11 ` [virtio-dev] " Chia-I Wu
2020-09-03 21:11 ` Chia-I Wu
2020-09-03 22:12 ` [virtio-dev] " Gurchetan Singh
2020-09-03 22:12 ` Gurchetan Singh
2020-09-02 21:08 ` [virtio-dev] [PATCH v2 23/23] drm/virtio: advertise features to userspace Gurchetan Singh
2020-09-02 21:08 ` Gurchetan Singh
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=20200902221514.GE1263242@redhat.com \
--to=vgoyal@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=miklos@szeredi.hu \
--cc=mst@redhat.com \
--cc=sebastien.boeuf@intel.com \
--cc=virtio-dev@lists.oasis-open.org \
/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.