From: Jason Wang <jasowang@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: virtualization@lists.linux-foundation.org,
Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
eperezma@redhat.com, stefanha@redhat.com, netdev@vger.kernel.org
Subject: Re: [RFC PATCH 1/6] vdpa: add bind_mm callback
Date: Thu, 22 Dec 2022 12:18:15 +0800 [thread overview]
Message-ID: <bd1c0fea-9934-1956-b3fe-0442d90b0477@redhat.com> (raw)
In-Reply-To: <20221216081738.wlhevfmvzfs3rsrg@sgarzare-redhat>
在 2022/12/16 16:17, Stefano Garzarella 写道:
> On Fri, Dec 16, 2022 at 02:37:45PM +0800, Jason Wang wrote:
>> On Thu, Dec 15, 2022 at 12:30 AM Stefano Garzarella
>> <sgarzare@redhat.com> wrote:
>>>
>>> This new optional callback is used to bind the device to a specific
>>> address space so the vDPA framework can use VA when this callback
>>> is implemented.
>>>
>>> Suggested-by: Jason Wang <jasowang@redhat.com>
>>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>>> ---
>>> include/linux/vdpa.h | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
>>> index 6d0f5e4e82c2..34388e21ef3f 100644
>>> --- a/include/linux/vdpa.h
>>> +++ b/include/linux/vdpa.h
>>> @@ -282,6 +282,12 @@ struct vdpa_map_file {
>>> * @iova: iova to be unmapped
>>> * @size: size of the area
>>> * Returns integer: success (0) or
>>> error (< 0)
>>> + * @bind_mm: Bind the device to a specific
>>> address space
>>> + * so the vDPA framework can use VA
>>> when this
>>> + * callback is implemented. (optional)
>>> + * @vdev: vdpa device
>>> + * @mm: address space to bind
>>
>> Do we need an unbind or did a NULL mm mean unbind?
>
> Yep, your comment in patch 6 makes it necessary. I will add it!
>
>>
>>> + * @owner: process that owns the
>>> address space
>>
>> Any reason we need the task_struct here?
>
> Mainly to attach to kthread to the process cgroups, but that part is
> still in TODO since I need to understand it better.
Ok I see.
>
> Maybe we can remove the task_struct here and use `current` directly in
> the callback.
Yes, it's easier to start without cgroup and we can add it on top.
Thanks
>
> Thanks,
> Stefano
>
next prev parent reply other threads:[~2022-12-22 4:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 16:30 [RFC PATCH 0/6] vdpa_sim: add support for user VA Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 1/6] vdpa: add bind_mm callback Stefano Garzarella
2022-12-16 6:37 ` Jason Wang
2022-12-16 8:17 ` Stefano Garzarella
2022-12-22 4:18 ` Jason Wang [this message]
2022-12-14 16:30 ` [RFC PATCH 2/6] vhost-vdpa: use bind_mm device callback Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 3/6] vringh: support VA with iotlb Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 4/6] vdpa_sim: make devices agnostic for work management Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 5/6] vdpa_sim: use kthread worker Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 6/6] vdpa_sim: add support for user VA Stefano Garzarella
2022-12-16 7:26 ` Jason Wang
2022-12-16 8:13 ` Stefano Garzarella
2022-12-21 7:17 ` Eugenio Perez Martin
2022-12-21 9:50 ` Stefano Garzarella
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=bd1c0fea-9934-1956-b3fe-0442d90b0477@redhat.com \
--to=jasowang@redhat.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=eperezma@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®