From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: jasowang@redhat.com, akpm@linux-foundation.org,
linux-mm@kvack.org, virtualization@lists.linux-foundation.org
Subject: Re: [RFC 2/4] vduse: Introduce VDUSE - vDPA Device in Userspace
Date: Mon, 19 Oct 2020 11:08:53 -0400 [thread overview]
Message-ID: <20201019110740-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20201019145623.671-3-xieyongji@bytedance.com>
On Mon, Oct 19, 2020 at 10:56:21PM +0800, Xie Yongji wrote:
> diff --git a/include/uapi/linux/vduse.h b/include/uapi/linux/vduse.h
> new file mode 100644
> index 000000000000..855d2116b3a6
> --- /dev/null
> +++ b/include/uapi/linux/vduse.h
> @@ -0,0 +1,85 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _UAPI_VDUSE_H_
> +#define _UAPI_VDUSE_H_
> +
> +#include <linux/types.h>
> +
> +#define VDUSE_CONFIG_DATA_LEN 8
> +
> +enum vduse_req_type {
> + VDUSE_SET_VQ_STATE,
> + VDUSE_SET_FEATURES,
> + VDUSE_GET_FEATURES,
> + VDUSE_SET_STATUS,
> + VDUSE_GET_STATUS,
> + VDUSE_SET_CONFIG,
> + VDUSE_GET_CONFIG,
> +};
> +
> +struct vduse_vq_state {
> + __u32 index;
> + __u32 num;
> + __u64 desc_addr;
> + __u64 driver_addr;
> + __u64 device_addr;
> + __u8 ready;
> +};
> +
> +struct vduse_dev_config_data {
> + __u32 offset;
> + __u32 len;
> + __u8 data[VDUSE_CONFIG_DATA_LEN];
> +};
> +
> +struct vduse_dev_request {
> + __u32 type;
> + __u32 unique;
> + __u32 flags;
> + __u32 size;
> + union {
> + struct vduse_vq_state vq_state;
> + struct vduse_dev_config_data config;
> + __u64 features;
> + __u8 status;
> + };
> +};
> +
> +struct vduse_dev_response {
> + __u32 unique;
> + __s32 result;
> + union {
> + struct vduse_dev_config_data config;
> + __u64 features;
> + __u8 status;
> + };
> +};
> +
> +/* ioctl */
> +
> +struct vduse_dev_config {
> + __u32 id;
> + __u32 vendor_id;
> + __u32 device_id;
> + __u64 iova_size;
> + __u16 vq_num;
> + __u16 vq_size_max;
> + __u32 vq_align;
> +};
> +
> +struct vduse_vq_eventfd {
> + __u32 index;
> + __u32 fd;
> +};
> +
> +#define VDUSE_BASE 'V'
> +
> +#define VDUSE_CREATE_DEV _IOW(VDUSE_BASE, 0x01, struct vduse_dev_config)
> +#define VDUSE_GET_DEV _IO(VDUSE_BASE, 0x02)
> +#define VDUSE_DESTROY_DEV _IO(VDUSE_BASE, 0x03)
> +
> +#define VDUSE_DEV_START _IO(VDUSE_BASE, 0x04)
> +#define VDUSE_DEV_STOP _IO(VDUSE_BASE, 0x05)
> +#define VDUSE_VQ_SETUP_KICKFD _IOW(VDUSE_BASE, 0x06, struct vduse_vq_eventfd)
> +#define VDUSE_VQ_SETUP_IRQFD _IOW(VDUSE_BASE, 0x07, struct vduse_vq_eventfd)
> +
> +#endif /* _UAPI_VDUSE_H_ */
Could we see some documentation about the user interface of this module please?
> --
> 2.25.1
next prev parent reply other threads:[~2020-10-19 15:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 14:56 [RFC 0/4] Introduce VDUSE - vDPA Device in Userspace Xie Yongji
2020-10-19 14:56 ` [RFC 1/4] mm: export zap_page_range() for driver use Xie Yongji
2020-10-19 15:14 ` Matthew Wilcox
2020-10-19 15:36 ` [External] " 谢永吉
2020-10-19 14:56 ` [RFC 2/4] vduse: Introduce VDUSE - vDPA Device in Userspace Xie Yongji
2020-10-19 15:08 ` Michael S. Tsirkin [this message]
2020-10-19 15:24 ` Randy Dunlap
2020-10-19 15:46 ` [External] " 谢永吉
2020-10-19 15:48 ` 谢永吉
2020-10-19 14:56 ` [RFC 3/4] vduse: grab the module's references until there is no vduse device Xie Yongji
2020-10-19 15:05 ` Michael S. Tsirkin
2020-10-19 15:44 ` [External] " 谢永吉
2020-10-19 15:47 ` Michael S. Tsirkin
2020-10-19 15:56 ` 谢永吉
2020-10-19 16:41 ` Michael S. Tsirkin
2020-10-20 7:42 ` Yongji Xie
2020-10-19 14:56 ` [RFC 4/4] vduse: Add memory shrinker to reclaim bounce pages Xie Yongji
2020-10-19 17:16 ` [RFC 0/4] Introduce VDUSE - vDPA Device in Userspace Michael S. Tsirkin
2020-10-20 2:18 ` [External] " 谢永吉
2020-10-20 2:20 ` Jason Wang
2020-10-20 2:28 ` 谢永吉
2020-10-20 3:20 ` Jason Wang
2020-10-20 7:39 ` [External] " Yongji Xie
2020-10-20 8:01 ` Jason Wang
2020-10-20 8:35 ` Yongji Xie
2020-10-20 9:12 ` Jason Wang
2020-10-23 2:55 ` Yongji Xie
2020-10-23 8:44 ` Jason Wang
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=20201019110740-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jasowang@redhat.com \
--cc=linux-mm@kvack.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xieyongji@bytedance.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).