From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 281E9C433E7 for ; Mon, 19 Oct 2020 15:09:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FDBA2231B for ; Mon, 19 Oct 2020 15:09:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gmUP3qEO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FDBA2231B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E2F2F6B007D; Mon, 19 Oct 2020 11:09:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DDE8E6B007E; Mon, 19 Oct 2020 11:09:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA7116B0080; Mon, 19 Oct 2020 11:09:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 9C8F76B007D for ; Mon, 19 Oct 2020 11:09:03 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1AE50829C985 for ; Mon, 19 Oct 2020 15:09:03 +0000 (UTC) X-FDA: 77389007766.23.tank39_320eba127238 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id C39CA37604 for ; Mon, 19 Oct 2020 15:09:02 +0000 (UTC) X-HE-Tag: tank39_320eba127238 X-Filterd-Recvd-Size: 5755 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Mon, 19 Oct 2020 15:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603120141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3Quj0p/pFwEfJeGG4Twcf2zA6haX4tZXg4zcm/JGZqU=; b=gmUP3qEOUDF4Tk1IBGrkn0nJU8wBhTmZy0NEsafxwdpoCd9xAz4hDlgYTou6doVytcEVFu a0dsMAtChpVz+rc7kILKT19kX+cdeTSb9CrIauRI0E9MctHbDJ5KOHcaglsawOvJikXhzK yb+mZoSKj9NmeJEvgANXF+Wnqu98ovM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-420-esnU9EjaMU-afEm48eswSA-1; Mon, 19 Oct 2020 11:08:59 -0400 X-MC-Unique: esnU9EjaMU-afEm48eswSA-1 Received: by mail-wm1-f71.google.com with SMTP id z7so58168wmi.3 for ; Mon, 19 Oct 2020 08:08:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3Quj0p/pFwEfJeGG4Twcf2zA6haX4tZXg4zcm/JGZqU=; b=LVf3utLeoBFYEuY7JzlOq2LyThwIjDXwgpc/RJvsUu72o5u/xXdsPXVwHG+vmeESiR 0MXfkqn+vZfUgV41N/rViVy24/HcG9TYePmwxR57svKtjyeiZ3r6/gr8fYOS9YC0PDjO 47WxysZiODmYChz31/13rn37eqVAEL50YAT0ipyU5HXMFmSB4VrwXsjLaw0kZ1c1BKC/ s/YS9W4W1swlycq7mVY6bJ1asLKBiQuaSZ809wkZhwFosUUzfSEOqrOqDpmn7ufvFuPW CiMLV7wYw/6vLcvkjoTpYnMnsXPCOtd1km9KgjblfCVVO9LJB8yktCmDWdrQSNFaMmM+ oPLw== X-Gm-Message-State: AOAM531CckDsDfws/FWACr1qxO9XtWDLp2929fhj0K4EapfFdaZKkua9 ByFVLHgW5iw9UI0TrR1eeO8ky/hQmkApOV2okQngM54IZZiYqsUMwdzx+9i0Jv8iTmp0omE+lVM UsGNehorDPxY= X-Received: by 2002:adf:e94b:: with SMTP id m11mr20058757wrn.35.1603120138562; Mon, 19 Oct 2020 08:08:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsCVgyeKRoQU6Fj0S1z8nRkIR3+g7FcgqFJ58jP3zzzgmCjy8qRBBanwGkffcJmZ3YMi9feQ== X-Received: by 2002:adf:e94b:: with SMTP id m11mr20058721wrn.35.1603120138315; Mon, 19 Oct 2020 08:08:58 -0700 (PDT) Received: from redhat.com (bzq-79-176-118-93.red.bezeqint.net. [79.176.118.93]) by smtp.gmail.com with ESMTPSA id j101sm52479wrj.9.2020.10.19.08.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 08:08:56 -0700 (PDT) Date: Mon, 19 Oct 2020 11:08:53 -0400 From: "Michael S. Tsirkin" To: Xie Yongji 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 Message-ID: <20201019110740-mutt-send-email-mst@kernel.org> References: <20201019145623.671-1-xieyongji@bytedance.com> <20201019145623.671-3-xieyongji@bytedance.com> MIME-Version: 1.0 In-Reply-To: <20201019145623.671-3-xieyongji@bytedance.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > + > +#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