[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 09/29] postcopy: Allow registering of fd hand
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v3 09/29] postcopy: Allow registering of fd handler |
Date: |
Wed, 28 Feb 2018 16:38:26 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Feb 16, 2018 at 01:16:05PM +0000, Dr. David Alan Gilbert (git) wrote:
[...]
> diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
> index bee21d4401..4bda5aa509 100644
> --- a/migration/postcopy-ram.h
> +++ b/migration/postcopy-ram.h
> @@ -141,4 +141,25 @@ void postcopy_remove_notifier(NotifierWithReturn *n);
> /* Call the notifier list set by postcopy_add_start_notifier */
> int postcopy_notify(enum PostcopyNotifyReason reason, Error **errp);
>
> +struct PostCopyFD;
> +
> +/* ufd is a pointer to the struct uffd_msg *TODO: more Portable! */
> +typedef int (*pcfdhandler)(struct PostCopyFD *pcfd, void *ufd);
> +
> +struct PostCopyFD {
> + int fd;
> + /* Data to pass to handler */
> + void *data;
> + /* Handler to be called whenever we get a poll event */
> + pcfdhandler handler;
> + /* A string to use in error messages */
> + char *idstr;
This was changed to const char in next patch. We can move it here?
The patch is a big one, there are quite a lot of TODOs and I still
think there can be some helper functions shared between fd handling
for 0-1 and 2-N but it looks good to me for merging as a first version.
After we have confirmed the definition of PostCopyFD please add:
Reviewed-by: Peter Xu <address@hidden>
Thanks,
--
Peter Xu
- [Qemu-devel] [PATCH v3 02/29] qemu_ram_block_host_offset, (continued)
- [Qemu-devel] [PATCH v3 02/29] qemu_ram_block_host_offset, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 03/29] postcopy: use UFFDIO_ZEROPAGE only when available, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 04/29] postcopy: Add notifier chain, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 05/29] postcopy: Add vhost-user flag for postcopy and check it, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 08/29] libvhost-user: Open userfaultfd, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 07/29] libvhost-user: Support sending fds back to qemu, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 06/29] vhost-user: Add 'VHOST_USER_POSTCOPY_ADVISE' message, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 09/29] postcopy: Allow registering of fd handler, Dr. David Alan Gilbert (git), 2018/02/16
- Re: [Qemu-devel] [PATCH v3 09/29] postcopy: Allow registering of fd handler,
Peter Xu <=
- [Qemu-devel] [PATCH v3 10/29] vhost+postcopy: Register shared ufd with postcopy, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 11/29] vhost+postcopy: Transmit 'listen' to client, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 13/29] migration/ram: ramblock_recv_bitmap_test_byte_offset, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 12/29] postcopy+vhost-user: Split set_mem_table for postcopy, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 14/29] libvhost-user+postcopy: Register new regions with the ufd, Dr. David Alan Gilbert (git), 2018/02/16
- [Qemu-devel] [PATCH v3 15/29] vhost+postcopy: Send address back to qemu, Dr. David Alan Gilbert (git), 2018/02/16