Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-06-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Hey, Dave! Hey! > On Wed, Jun 05, 2024 at 12:31:56AM +0000, Dr. David Alan Gilbert wrote: > > * Michael Galaxy (mgal...@akamai.com) wrote: > > > One thing to keep in mind here (despite me not having any hardware to > > > t

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-06-04 Thread Dr. David Alan Gilbert
provide good support and work together. > > > > > > > > > We are happy to provide the necessary review and maintenance work for > > > > RDMA > > > > if the community needs it. > > > > > > > > CC'ing Chuan Zheng.

Re: [PATCH 2/3] hmp: Remove deprecated 'singlestep' command

2024-01-17 Thread Dr. David Alan Gilbert
14..fc5f5c57ad 100644 > --- a/hmp-commands.hx > +++ b/hmp-commands.hx > @@ -398,19 +398,6 @@ SRST >If called with option off, the emulation returns to normal mode. > ERST > > -{ > -.name = "singlestep", > -.args_type = "option:s?&quo

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-18 Thread Dr. David Alan Gilbert
d usage of QMP features, or > triaging bug reports that include examples of usage, and in both > cases it is pretty relevant to make unstable features stand out to > the human via the x- prefix IMHO. Using x- for events makes sense to me; the semantics of events can be quite su

Re: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-20 Thread Dr. David Alan Gilbert
er the ifdef includes the SRST/ERST doc section; some ifdef do and some don't; and thus it depends whether or not you want the command documented even though it's compiled out. I think it's probably OK, but maybe worth reconsidering: Acked-by: Dr. David Alan Gilbert > SRST >

Re: [PATCH 13/13] aio: remove aio_disable_external() API

2023-04-04 Thread Dr. David Alan Gilbert
ULL, NULL, opaque); > > +aio_set_fd_handler(ctx, rioc->rdmaout->recv_comp_channel->fd, > > io_read, > > + io_write, NULL, NULL, opaque); > > +aio_set_fd_handler(ctx, rioc->rdmaout->send_comp_channel->fd, > >

Re: [PATCH 03/43] migration: Create migration_cap_set()

2023-03-08 Thread Dr. David Alan Gilbert
"current migration capabilities"); > return false; > } > -migrate_set_block_enabled(true, &local_err); > -if (local_err) { > +if (!migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, true, &local_err)) { > error_propagate(errp, local_err); > return false; > } > -- > 2.39.2 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 04/43] migration: create options.c

2023-03-08 Thread Dr. David Alan Gilbert
he top-level directory. > + * > + * Contributions after 2012-01-13 are licensed under the terms of the > + * GNU GPL, version 2 or (at your option) any later version. I don't think any of these functions were written by Anthony, and I think they're all after 2012 aren't they?

Re: [PATCH v4 10/19] migration: Clean up includes

2023-01-19 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Clean up includes so that osdep.h is included first and headers > >> which it implies are not included manually. &

Re: [PATCH v4 19/19] Drop duplicate #include

2023-01-19 Thread Dr. David Alan Gilbert
gt; +++ b/hw/remote/machine.c > @@ -22,7 +22,6 @@ > #include "hw/remote/iohub.h" > #include "hw/remote/iommu.h" > #include "hw/qdev-core.h" > -#include "hw/remote/iommu.h" > #include "hw/remote/vfio-user-obj.h" > #include "

Re: [PATCH v4 10/19] migration: Clean up includes

2023-01-19 Thread Dr. David Alan Gilbert
e/qemu/userfaultfd.h > +++ b/include/qemu/userfaultfd.h > @@ -13,7 +13,6 @@ > #ifndef USERFAULTFD_H > #define USERFAULTFD_H > > -#include "qemu/osdep.h" > #include "exec/hwaddr.h" > #include > > -- > 2.39.0 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: QEMU iotest 267 failure / assertion in migration code

2023-01-18 Thread Dr. David Alan Gilbert
{VALGRIND_LOGFILE}" $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@" ) > > > Looks like this test does not work if the main machine > of the selected QEMU binary does not support migration? Why doesn't it support migration? > Should we remove this test from the "auto" group? > > Anyway, QEMU should also not trigger an assertion, so this > sounds like another bug? Yeh; that's a weird failure. (Alpha page size seems to be 8k from what I can tell; which should be fine, if you're running on an x86 host) Dave > Thomas > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 3/6] tools/virtiofsd: add G_GNUC_PRINTF for logging functions

2023-01-04 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > Signed-off-by: Daniel P. Berrangé Yes, although I'm a little surprised this hasn't thrown up any warnings. Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_log.c | 1 + > tools/virtiofs

Re: [PATCH v5 04/14] vfio/migration: Fix NULL pointer dereference bug

2023-01-03 Thread Dr. David Alan Gilbert
) | value); > -qemu_file_set_error(migrate_get_current()->to_dst_file, ret); > +if (migrate_get_current()->to_dst_file) { > +qemu_file_set_error(migrate_get_current()->to_dst_file, ret); > +} > } > vbasedev->migration->vm_running = running; > trace_vfio_vmstate_change(vbasedev->name, running, RunState_str(state), > -- > 2.26.3 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-24 Thread Dr. David Alan Gilbert
* Avihai Horon (avih...@nvidia.com) wrote: > > On 23/11/2022 20:59, Dr. David Alan Gilbert wrote: > > External email: Use caution opening links or attachments > > > > > > * Avihai Horon (avih...@nvidia.com) wrote: > > > > > > > >

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-23 Thread Dr. David Alan Gilbert
t; > > # migration.c > vfio_migration_probe(const char *name) " (%s)" > +vfio_migration_set_state(const char *name, const char *state) " (%s) state > %s" > vfio_migration_v1_set_state(const char *name, uint32_t state) " (%s) state > %d" >

Re: [PATCH v3 01/17] migration: Remove res_compatible parameter

2022-11-23 Thread Dr. David Alan Gilbert
ot; into "postcopy" just because in the > > logic of migration_iteration_run() we don't actually distinguish > > "compat" and "post". The logic only depends on "total" and "pre". > > > > So, if we want to combine "compat" into "post", we should redefine > > "post" in the comment in include/migration/register.h, something like > > this: > > > > - res_precopy is for data which MUST be migrated in precopy > >   phase or in stopped state, in other words - before target > >   vm start > > > > - res_postcopy is for all data except for declared in res_precopy. > >   res_postcopy data CAN be migrated in postcopy, i.e. after target > >   vm start. > > > > > You are right, the definition of res_postcopy should be changed. > > Yet, I am not sure if this patch really makes things more clear/simple. > Juan, what do you think? > > Thanks! > > >   } else { > > > -    *res_precopy_only += remaining_size; > > > +    *res_precopy += remaining_size; > > >   } > > >   } > > > > > > > > > -- > > Best regards, > > Vladimir > > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [RFC 6/7] migration: simplify migration_iteration_run()

2022-11-23 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/migration/migration.c b/mig

Re: [RFC 5/7] migration: Remove unused threshold_size parameter

2022-11-23 Thread Dr. David Alan Gilbert
= vbasedev->migration; > @@ -511,7 +511,7 @@ static int vfio_save_iterate(QEMUFile *f, void *opaque) > } > > /* > - * Reset pending_bytes as .save_live_pending is not called during savevm > or > + * Reset pending_bytes as .state_pending_* is not called during sav

Re: [RFC 4/7] migration: Split save_live_pending() into state_pending_*

2022-11-22 Thread Dr. David Alan Gilbert
> The only "device" that implements different functions for _estimate() > and _exact() is ram. > > Signed-off-by: Juan Quintela Yeh I think that's OK; I'm a little worried whether you end up calling the two functions in migration_iteration_run a lot, but still R

Re: [RFC 2/7] migration: No save_live_pending() method uses the QEMUFile parameter

2022-11-22 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > So remove it everywhere. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > include/migration/register.h | 6 ++ > migration/savevm.h | 2 +- > hw/s390x/s390-stattrib.c

Re: [RFC 1/7] migration: Remove res_compatible parameter

2022-11-22 Thread Dr. David Alan Gilbert
;" > migrate_fd_error(const char *error_desc) "error=%s" > migrate_fd_cancel(void) "" > migrate_handle_rp_req_pages(const char *rbname, size_t start, size_t len) > "in %s at 0x%zx len 0x%zx" > -migrate_pending(uint64_t size, uint64_t max, uint64_t pre, uint64_t compat, > uint64_t post) "pending size %" PRIu64 " max %" PRIu64 " (pre = %" PRIu64 " > compat=%" PRIu64 " post=%" PRIu64 ")" > +migrate_pending(uint64_t size, uint64_t max, uint64_t pre, uint64_t post) > "pending size %" PRIu64 " max %" PRIu64 " (pre = %" PRIu64 " post=%" PRIu64 > ")" > migrate_send_rp_message(int msg_type, uint16_t len) "%d: len %d" > migrate_send_rp_recv_bitmap(char *name, int64_t size) "block '%s' size > 0x%"PRIi64 > migration_completion_file_err(void) "" > -- > 2.37.2 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-10-20 Thread Dr. David Alan Gilbert
ds on behalf of the main loop, which means pool->head could be > > modified (iothread calls thread_pool_submit_aio) while being read by the > > main loop (another worker thread schedules thread_pool_completion_bh). > > > > What are the performance implications? I mean, if the aiocontext lock in > > the bh is actually useful and the bh really has to wait to take it, > > being taken in much more places throughout the block layer won't be > > better than extending the poll->lock I guess. > > thread_pool_submit_aio() is missing documentation on how it is supposed > to be called. > > Taking pool->lock is conservative and fine in the short-term. > > In the longer term we need to clarify how thread_pool_submit_aio() is > supposed to be used and remove locking to protect pool->head if > possible. > > A bunch of the event loop APIs are thread-safe (aio_set_fd_handler(), > qemu_schedule_bh(), etc) so it's somewhat natural to make > thread_pool_submit_aio() thread-safe too. However, it would be nice to > avoid synchronization and existing callers mostly call it from the same > event loop thread that runs the BH and we can avoid locking in that > case. > > Stefan -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v2] nbd/client: Use smarter assert

2022-10-18 Thread Dr. David Alan Gilbert
r inadvertent wraparound is > possible. > > Fixes: 93676c88 ("nbd: Don't send oversize strings", v4.2.0) > Reported-by: Dr. David Alan Gilbert > Signed-off-by: Eric Blake Reviewed-by: Dr. David Alan Gilbert > --- > > v2: update subject line and commit mess

Re: [PATCH] nbd/server: Use smarter assert

2022-10-17 Thread Dr. David Alan Gilbert
SIZE. Still, it doesn't hurt to be more explicit in > how we write our assertion that we are aware that no wraparound is > possible. > > Fixes: 93676c88 ("nbd: Don't send oversize strings", v4.2.0) > Reported-by: Dr. David Alan Gilbert > Signed-off-by: Eric Blake

Re: Question regarding live-migration with drive-mirror

2022-09-28 Thread Dr. David Alan Gilbert
80 > > #9 blk_co_pwritev (blk=0x5595f91db8c0, offset=, > > bytes=, qiov=qiov@entry=0x5595f9030d58, flags=flags@entry=0) > > at ../block/block-backend.c:1391 > > #10 0x5595f8328a59 in mirror_read_complete (ret=0, op=0x5595f9030d50) > > at ../block/mirror.c:260 > > #11 mirror_co_read (opaque=0x5595f9030d50) at ../block/mirror.c:400 > > #12 0x5595f843a39b in coroutine_trampoline (i0=, > > i1=) at ../util/coroutine-ucontext.c:177 > > #13 0x7f33948b8d40 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 > > #14 0x7f324a3ea6e0 in ?? () > > #15 0x in ?? () > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 07/51] tests: Avoid using hardcoded /tmp in test cases

2022-08-24 Thread Dr. David Alan Gilbert
-git a/tests/unit/test-image-locking.c b/tests/unit/test-image-locking.c > index ba057bd66c..795c602ff6 100644 > --- a/tests/unit/test-image-locking.c > +++ b/tests/unit/test-image-locking.c > @@ -76,7 +76,7 @@ static void check_locked_bytes(int fd, uint64_t perm_locks, > static void test_image_locking_basic(void) > { > BlockBackend *blk1, *blk2, *blk3; > -char img_path[] = "/tmp/qtest.XX"; > +char *img_path = g_strdup_printf("%s/qtest.XX", g_get_tmp_dir()); > uint64_t perm, shared_perm; > > int fd = mkstemp(img_path); > @@ -112,12 +112,13 @@ static void test_image_locking_basic(void) > blk_unref(blk3); > close(fd); > unlink(img_path); > +g_free(img_path); > } > > static void test_set_perm_abort(void) > { > BlockBackend *blk1, *blk2; > -char img_path[] = "/tmp/qtest.XX"; > +char *img_path = g_strdup_printf("%s/qtest.XX", g_get_tmp_dir()); > uint64_t perm, shared_perm; > int r; > int fd = mkstemp(img_path); > @@ -140,6 +141,7 @@ static void test_set_perm_abort(void) > check_locked_bytes(fd, perm, ~shared_perm); > blk_unref(blk1); > blk_unref(blk2); > +g_free(img_path); > } > > int main(int argc, char **argv) > diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c > index a05a4628ed..b73d231cd5 100644 > --- a/tests/unit/test-qga.c > +++ b/tests/unit/test-qga.c > @@ -59,7 +59,7 @@ fixture_setup(TestFixture *fixture, gconstpointer data, > gchar **envp) > > fixture->loop = g_main_loop_new(NULL, FALSE); > > -fixture->test_dir = g_strdup("/tmp/qgatest.XX"); > +fixture->test_dir = g_strdup_printf("%s/qgatest.XX", > g_get_tmp_dir()); > g_assert_nonnull(g_mkdtemp(fixture->test_dir)); > > path = g_build_filename(fixture->test_dir, "sock", NULL); > diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c > index 9b1dab2f28..0da6a6157f 100644 > --- a/tests/vhost-user-bridge.c > +++ b/tests/vhost-user-bridge.c > @@ -631,7 +631,7 @@ static void *notifier_thread(void *arg) > static void > vubr_host_notifier_setup(VubrDev *dev) > { > -char template[] = "/tmp/vubr-XX"; > +char *template = g_strdup_printf("%s/vubr-XX", g_get_tmp_dir()); > pthread_t thread; > size_t length; > void *addr; > @@ -640,6 +640,7 @@ vubr_host_notifier_setup(VubrDev *dev) > length = qemu_real_host_page_size() * VHOST_USER_BRIDGE_MAX_QUEUES; > > fd = mkstemp(template); > +g_free(template); > if (fd < 0) { > vubr_die("mkstemp()"); > } > -- > 2.34.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Dr. David Alan Gilbert
**errp) > } > } > > -ret = migrate_caps_check(cap_list, head, errp); > +migrate_caps_check(cap_list, head, errp); > > /* It works with head == NULL */ > qapi_free_MigrationCapabilityStatusList(head); > - > -return ret; > } -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 0/2] migration: fix coverity nits

2022-08-02 Thread Dr. David Alan Gilbert
> migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long > > Ping? This series got reviewed but doesn't seem to have > made it into a migration pullreq yet. Queued > thanks > -- PMM > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 21 Jul 2022 at 13:07, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > When we use BLK_MIG_BLOCK_SIZE in expressions like > > > block_mig_state.

Re: [PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Dr. David Alan Gilbert
to bdrv_create_dirty_bitmap that takes a uint32_t ? Dave > #define BDRV_SECTORS_PER_DIRTY_CHUNK (BLK_MIG_BLOCK_SIZE >> BDRV_SECTOR_BITS) > > #define BLK_MIG_FLAG_DEVICE_BLOCK 0x01 > -- > 2.25.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-21 Thread Dr. David Alan Gilbert
to return is within range. > > Resolves: Coverity CID 1487239, 1487254 > Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/migration/migration.c b/migration/migration.c

Re: [PATCH v2 18/21] migration: remove the QEMUFileOps 'get_buffer' callback

2022-06-27 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the get_buffer logic using QIOChannel APIs. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrangé Coverity is pointing out a fun deadcode path from this: > diff --git a/migratio

Re: [PULL 00/25] Migration 20220621 patches

2022-06-22 Thread Dr. David Alan Gilbert
07863 > https://gitlab.com/qemu-project/qemu/-/jobs/2622407862 > https://gitlab.com/qemu-project/qemu/-/jobs/2622407860 > https://gitlab.com/qemu-project/qemu/-/jobs/2622407811 > > ../io/channel-socket.c:589:9: error: implicit declaration of function > 'g_assert_unreachable' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > g_assert_unreachable(); > ^ Again, non Linux; and should be g_assert_not_reached I'll fix this up. Dave > > r~ > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v2 08/21] migration: rename qemu_file_update_transfer to qemu_file_acct_rate_limit

2022-06-20 Thread Dr. David Alan Gilbert
ile the former is specifically for accounting in thue rate > limit calculations. The new name give better guidance on its usage. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/multifd.c | 4 ++-- > migration/qemu-file.c

[PATCH 2/2] trivial typos: namesapce

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" 'namespace' is misspelled in a bunch of places. Signed-off-by: Dr. David Alan Gilbert --- hw/9pfs/9p-xattr-user.c | 8 hw/acpi/nvdimm.c| 2 +- hw/nvme/ctrl.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)

[PATCH 1/2] Trivial: 3 char repeat typos

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert --- hw/intc/openpic.c| 2 +- hw/net/imx_fec.c | 2 +- hw

[PATCH 0/2] Two sets of trivials

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I've sent the 3 char set last month, but have updated it a little; I cleaned up a comment style that was already broken so checkpatch is happy. The 'namesapce' is a new patch; it's amazing how many places make the same typo! D

Re: [PATCH 19/20] migration: remove the QEMUFileOps 'get_return_path' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the get_return_path logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 16 > mig

Re: [PATCH 20/20] migration: remove the QEMUFileOps abstraction

2022-06-09 Thread Dr. David Alan Gilbert
probably belongs in an earlier patch. Other than that, Reviewed-by: Dr. David Alan Gilbert > --- > migration/channel.c | 4 +-- > migration/colo.c | 5 ++-- > migration/meson.build | 1 - > migration/migration.c | 7 ++---

Re: [PATCH 18/20] migration: remove the QEMUFileOps 'writev_buffer' callback

2022-06-09 Thread Dr. David Alan Gilbert
it(ioc, G_IO_OUT); > -} > - continue; I wondered where that code went, but it turns out it's already copied into qio_channel_writev_full_all, so: Reviewed-by: Dr. David Alan Gilbert > -} > -if (len < 0) { > -done = -EIO; > -

Re: [PATCH 13/20] migration: remove unused QEMUFileGetFD typedef

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file.h | 4 > 1 file changed, 4 deletions(-) > > diff --git a/migration/qemu-file.h b/migration/qemu-file.h > index 0

Re: [PATCH 16/20] migration: remove the QEMUFileOps 'close' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the close logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 12 > migration/qemu-f

Re: [PATCH 14/20] migration: remove the QEMUFileOps 'shut_down' callback

2022-06-09 Thread Dr. David Alan Gilbert
NOSYS; > } > - ret = f->ops->shut_down(f->ioc, true, true, NULL); > + > +if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) { > +ret = -EIO; > +} OK, so this is following the code you're flattening; so: Revi

Re: [PATCH 17/20] migration: remove the QEMUFileOps 'get_buffer' callback

2022-06-09 Thread Dr. David Alan Gilbert
(f->ioc, f->buf + pending, f->total_transferred, > - IO_BUF_SIZE - pending, &local_error); > +do { > +len = qio_channel_read(f->ioc, Yes, I think that's OK - not that 'len' is an int where 'ret' was a ssize_t;

Re: [PATCH 12/20] migration: introduce new constructors for QEMUFile

2022-06-09 Thread Dr. David Alan Gilbert
-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 4 ++-- > migration/qemu-file.c | 18 -- > migration/qemu-file.h | 3 ++- > 3 files changed, 20 insertions(+), 5 deletions(-) > > diff -

Re: [PATCH 15/20] migration: remove the QEMUFileOps 'set_blocking' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the set_blocking logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 14 -- > migration/qemu-f

Re: [PATCH 14/20] migration: remove the QEMUFileOps 'shut_down' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > This directly implements the shutdown logic using QIOChannel APIs. > > > > > &g

Re: [PATCH 11/20] migration: hardcode assumption that QEMUFile is backed with QIOChannel

2022-06-09 Thread Dr. David Alan Gilbert
* Get the ioc object for the file, without incrementing > + * the reference count. > + * > + * Returns: the ioc object > */ > QIOChannel *qemu_file_get_ioc(QEMUFile *file) > { > - return file->has_ioc ? QIO_CHANNEL(file->opaque) : NULL; > +return file->ioc; > } > diff --git a/migration/qemu-file.h b/migration/qemu-file.h > index 6310071f90..0458b1d3b6 100644 > --- a/migration/qemu-file.h > +++ b/migration/qemu-file.h > @@ -118,7 +118,7 @@ typedef struct QEMUFileHooks { > QEMURamSaveFunc *save_page; > } QEMUFileHooks; > > -QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops, bool has_ioc); > +QEMUFile *qemu_fopen_ops(QIOChannel *ioc, const QEMUFileOps *ops); > void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks *hooks); > int qemu_get_fd(QEMUFile *f); > int qemu_fclose(QEMUFile *f); > -- > 2.36.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 10/20] migration: stop passing 'opaque' parameter to QEMUFile hooks

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > The only user of the hooks is RDMA which provides a QIOChannel backed > impl of QEMUFile. It can thus use the qemu_file_get_ioc() method. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- &g

Re: [PATCH 09/20] migration: convert savevm to use QIOChannelBlock for VMState

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > With this change, all QEMUFile usage is backed by QIOChannel at > last. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/savevm.c | 42 --

Re: [PATCH 07/20] migration: rename qemu_update_position to qemu_file_credit_transfer

2022-06-09 Thread Dr. David Alan Gilbert
ingle fd. (But now doesn't make any sense any more with these changes either) Dave > With regards, > Daniel > -- > |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o-https://fstop138.berrange.com :| > |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 07/20] migration: rename qemu_update_position to qemu_file_credit_transfer

2022-06-09 Thread Dr. David Alan Gilbert
> What this method is actually used for is to report on the number of > bytes that have been transferred out of band from the main I/O methods. > This new name better reflects this purpose. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert

Re: [PATCH 06/20] migration: rename qemu_ftell to qemu_file_total_transferred

2022-06-09 Thread Dr. David Alan Gilbert
bytes processed. This switches to a new name that > reflects the intended usage. > > Signed-off-by: Daniel P. Berrangé Mostly, Reviewed-by: Dr. David Alan Gilbert Two nits below: > --- > migration/block.c | 10 +- > migration/migration.c | 2 +- > migration/qem

Re: [PATCH 04/20] migration: rename rate limiting fields in QEMUFile

2022-06-09 Thread Dr. David Alan Gilbert
ng of data and applies to data queued, which need not have > been transferred on the wire yet if a flush hasn't taken place. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file.c | 30 +++--- >

Re: [PATCH 05/20] migration: rename 'pos' field in QEMUFile to 'bytes_processed'

2022-06-09 Thread Dr. David Alan Gilbert
tion(QEMUFile *f, size_t size) > { > -f->pos += size; > +f->total_transferred += size; > } > > /** Closes the file > @@ -658,7 +659,7 @@ int qemu_get_byte(QEMUFile *f) > > int64_t qemu_ftell_fast(QEMUFile *f) > { > -int64_t ret = f->pos; > +

Re: [PATCH 05/20] migration: rename 'pos' field in QEMUFile to 'bytes_processed'

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > This makes the field name align with the newly introduced method > > > names in the

Re: [PATCH 03/20] migration: remove unreachble RDMA code in save_hook impl

2022-06-08 Thread Dr. David Alan Gilbert
e > has been unreachable since RDMA support was first introduced > 9 years ago. > > Signed-off-by: Daniel P. Berrangé Ah good; less rdma code! Reviewed-by: Dr. David Alan Gilbert > --- > migration/rdma.c | 120 +-- > 1 file cha

Re: [PATCH v13 1/8] meson.build: Fix docker-test-build@alpine when including linux/errqueue.h

2022-05-16 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 16, 2022 at 12:30:15PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Mon, May 16, 2022 at 12:13:16PM +0100, Dr. David Alan Gilbert wrote: > > &

Re: [PATCH v13 1/8] meson.build: Fix docker-test-build@alpine when including linux/errqueue.h

2022-05-16 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 16, 2022 at 12:13:16PM +0100, Dr. David Alan Gilbert wrote: > > * Leonardo Bras (leob...@redhat.com) wrote: > > > A build error happens in alpine CI when linux/errqueue.h is included > > > in io/channel-soc

Re: [PATCH v13 1/8] meson.build: Fix docker-test-build@alpine when including linux/errqueue.h

2022-05-16 Thread Dr. David Alan Gilbert
* Leonardo Bras (leob...@redhat.com) wrote: > A build error happens in alpine CI when linux/errqueue.h is included > in io/channel-socket.c, due to redefining of 'struct __kernel_timespec': OK, looks to be same mechanism as other meson tests. Reviewed-by: Dr. David Alan Gilbert

Re: [PATCH v12 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-09 Thread Dr. David Alan Gilbert
& defined(SO_ZEROCOPY)) > > +#define QEMU_MSG_ZEROCOPY > > +#endif > > +#endif > > > > #define SOCKET_MAX_FDS 16 > > > > + > > This line can be dropped when merge. Done > > SocketAddress * > > qio_channel_socket_get_local_address(Q

Re: [PATCH v10 0/7] MSG_ZEROCOPY + multifd

2022-04-28 Thread Dr. David Alan Gilbert
t; migration/rdma.c| 1 + > migration/socket.c | 12 ++- > monitor/hmp-cmds.c | 6 ++ > scsi/pr-manager-helper.c | 2 +- > tests/unit/test-io-channel-socket.c | 1 + > 23 files changed, 379 insertions(+), 44

Re: [PATCH v10 6/7] multifd: Send header packet without flags if zero-copy-send is enabled

2022-04-28 Thread Dr. David Alan Gilbert
gt; > +break; > > +} > > + > > Extra but useless newline.. but not worth a repost. Looks good here: I removed that. > Reviewed-by: Peter Xu > > Thanks, > > > +} else { > > +/* Send header using the same writev call */ > > +p->iov[0].iov_len = p->packet_len; > > +p->iov[0].iov_base = p->packet; > > +} > > > > ret = qio_channel_writev_all(p->c, p->iov, p->iovs_num, > > &local_err); > > -- > > 2.36.0 > > > > -- > Peter Xu > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v14 1/8] virtio: drop name parameter for virtio_init()

2022-04-21 Thread Dr. David Alan Gilbert
lude/hw/virtio/vhost-vsock-common.h > index d8b565b4da..076b7ab779 100644 > --- a/include/hw/virtio/vhost-vsock-common.h > +++ b/include/hw/virtio/vhost-vsock-common.h > @@ -44,7 +44,7 @@ int vhost_vsock_common_start(VirtIODevice *vdev); > void vhost_vsock_common_stop(VirtIODevice *vdev); > int vhost_vsock_common_pre_save(void *opaque); > int vhost_vsock_common_post_load(void *opaque, int version_id); > -void vhost_vsock_common_realize(VirtIODevice *vdev, const char *name); > +void vhost_vsock_common_realize(VirtIODevice *vdev); > void vhost_vsock_common_unrealize(VirtIODevice *vdev); > uint64_t vhost_vsock_common_get_features(VirtIODevice *vdev, uint64_t > features, > Error **errp); > diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h > index 2179b75703..afff9e158e 100644 > --- a/include/hw/virtio/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -22,6 +22,7 @@ > #include "sysemu/vhost-user-backend.h" > > #include "standard-headers/linux/virtio_gpu.h" > +#include "standard-headers/linux/virtio_ids.h" > #include "qom/object.h" > > #define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base" > @@ -37,8 +38,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUGL, VIRTIO_GPU_GL) > #define TYPE_VHOST_USER_GPU "vhost-user-gpu" > OBJECT_DECLARE_SIMPLE_TYPE(VhostUserGPU, VHOST_USER_GPU) > > -#define VIRTIO_ID_GPU 16 > - > struct virtio_gpu_simple_resource { > uint32_t resource_id; > uint32_t width; > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index b31c4507f5..5d774684b1 100644 > --- a/include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -165,8 +165,8 @@ struct VirtioDeviceClass { > void virtio_instance_init_common(Object *proxy_obj, void *data, > size_t vdev_size, const char *vdev_name); > > -void virtio_init(VirtIODevice *vdev, const char *name, > - uint16_t device_id, size_t config_size); > +void virtio_init(VirtIODevice *vdev, uint16_t device_id, size_t config_size); > + > void virtio_cleanup(VirtIODevice *vdev); > > void virtio_error(VirtIODevice *vdev, const char *fmt, ...) G_GNUC_PRINTF(2, > 3); > -- > 2.35.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v2 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Dr. David Alan Gilbert
ot specified, > wait for tray to open and try again. > > This situation is could be resolved 'blockdev-open-tray' by passing > flag 'force' inside. Thus is seems reasonable to add the same > capability for 'blockdev-change-medium' too. For HMP: A

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-17 Thread Dr. David Alan Gilbert
oexistence of Rust and C code within a > subsystem > > - whether maintainers would be on board with adopting a completely different > language, and who in the community has enough Rust experience to shepherd us > through the learning experience > > The first two questions have answers in the other message if s/Rust/C++/, > and as to the last I think we're already further in the discussion. > > Thanks, > > Paolo > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Dr. David Alan Gilbert
t > start, ram_addr_t len) > } > > struct RAMSrcPageRequest *new_entry = > - g_malloc0(sizeof(struct RAMSrcPageRequest)); > +g_new0(struct RAMSrcPageRequest, 1); > new_entry->rb = ramblock; > new_entry->offset = start; > new_entry->len = len; For migration: Acked-by: Dr. David Alan Gilbert -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v8 0/8] hmp, qmp: Add commands to introspect virtio devices

2021-10-28 Thread Dr. David Alan Gilbert
there's no need for the extra level; however you could do it all in one HMP command I think: info virtio -- list all available virtio devices info virtio path -- Display status of a given virtio device info virtio path queue -- Display status of a given virtio queue info virtio -h path queue -- Display status of a given vhost queue info virtio -e path queue [index] -- Display element of a given virtio queue It wouldn't need to change the qmp commands underneath unless it made sense. Dave > Jonah -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 9/9] qapi: Extend -compat to set policy for unstable interfaces

2021-10-26 Thread Dr. David Alan Gilbert
c0ce4 100644 > --- a/scripts/qapi/schema.py > +++ b/scripts/qapi/schema.py > @@ -254,9 +254,11 @@ def doc_type(self): > > def check(self, schema): > QAPISchemaEntity.check(self, schema) > -if 'deprecated' in [f.name for f in self.features]: > -raise QAPISemError( > -self.info, "feature 'deprecated' is not supported for types") > +for feat in self.features: > +if feat.is_special(): > +raise QAPISemError( > +self.info, > +f"feature '{feat.name}' is not supported for types") > > def describe(self): > assert self.meta > @@ -726,7 +728,7 @@ class QAPISchemaFeature(QAPISchemaMember): > role = 'feature' > > def is_special(self): > -return self.name in ('deprecated') > +return self.name in ('deprecated', 'unstable') > > > class QAPISchemaObjectTypeMember(QAPISchemaMember): > -- > 2.31.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Dr. David Alan Gilbert
of the old drawbacks, > but adds a new one: While using x- makes it very obvious for a human > user that this is an unstable feature, a feature flag in the schema will > almost certainly go unnoticed in manual use. Agreed, I'd keep the x- as well. Having said that, the x- represents a few different things (that we don't currently distinguish): - experimental - for internal use - for debugging/human use Dave > Kevin > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [RFC PATCH 2/4] hw/scsi/scsi-disk: Use automatic AIO context lock

2021-10-06 Thread Dr. David Alan Gilbert
t;); > -goto out; > +return; > } > > /* Make a guess for the block size, we'll fix it when the guest sends. > @@ -2661,9 +2659,6 @@ static void scsi_block_realize(SCSIDevice *dev, Error > **errp) > > scsi_realize(&s->qdev, errp); > scsi_generic_read_device_inquiry(&s->qdev); > - > -out: > -aio_context_release(ctx); > } > > typedef struct SCSIBlockReq { > -- > 2.31.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-06 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Oct 06, 2021 at 02:29:37PM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Wed, Oct 06, 2021 at 09:43:52AM +0100, Dr. David Alan Gilbert wrote: > > > > * Micha

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-06 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Oct 06, 2021 at 09:43:52AM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Wed, Oct 06, 2021 at 09:28:50AM +0100, Dr. David Alan Gilbert wrote: > > > > To me it fee

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-06 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Oct 06, 2021 at 09:28:50AM +0100, Dr. David Alan Gilbert wrote: > > To me it feels the same as the distinction between vhost-kernel and qemu > > backended virtio that we get in net and others - in principal it'

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-06 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Oct 06, 2021 at 09:09:30AM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Oct 05, 2021 at 12:10:08PM -0400, Eduardo Habkost wrote: > > > > On Tue, Oct 05

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-06 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Oct 05, 2021 at 12:10:08PM -0400, Eduardo Habkost wrote: > > On Tue, Oct 05, 2021 at 03:01:05PM +0100, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Oct 05, 2

Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-05 Thread Dr. David Alan Gilbert
class > > properties. > > > > Thanks, > > Roman. > > So the question is how to make vmsd depend on machine type. > CC Eduardo who poked at this kind of compat stuff recently, > paolo who looked at qom things most recently and dgilbert > for advice on migration. I don't think I've seen anyone change vmsd name dependent on machine type; making fields appear/disappear is easy - that just ends up as a property on the device that's checked; I guess if that property is global (rather than per instance) then you can check it in vhost_user_blk_class_init and swing the dc->vmsd pointer? Dave > -- > MST > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v1 2/2] migration: add missing qemu_mutex_lock_iothread in migration_completion

2021-10-05 Thread Dr. David Alan Gilbert
n missing it from the start. Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/migration/migration.c b/migration/migration.c > index 041b8451a6..215d5281f2 100644 > --- a/migration/migration.c >

Re: [PATCH v1 2/3] io: Add zerocopy and errqueue

2021-09-09 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Sep 08, 2021 at 09:30:58AM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Tue, Sep 07, 2021 at 12:06:15PM +0100, Dr. David Alan Gilbert wrote: > > > > > > What if we do the

Re: [PATCH v1 2/3] io: Add zerocopy and errqueue

2021-09-08 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Sep 07, 2021 at 12:06:15PM +0100, Dr. David Alan Gilbert wrote: > > > > What if we do the 'flush()' before we start post-copy, instead of after > > > > each > > > > iteration? would that be enough? &

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-08 Thread Dr. David Alan Gilbert
t; __zerocopy_sg_from_iter() -> iov_iter_get_pages(). > > It happens probably here: > > E.g > > __ip_append_data() > msg_zerocopy_realloc() > mm_account_pinned_pages() When do they get uncounted? i.e. is it just the data that's in flight that's marked as pinned? Dave > Thanks > > > > > Say, I think there're plenty of iov_iter_get_pages() callers and normal > > GUPs, I > > think most of them do no need such accountings. > > > > -- > > Peter Xu > > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Dr. David Alan Gilbert
to > assume the worst case possible, given the process ulimits. We already have the same problem for RDMA; (Although it has some options for doing rolling locking in chunks and recently there's code for use with new cards that don't need locking). I think the thing here is to offer zerocopy as an option; then people can decide on the costs etc. Dave > > > > Overall the memory locking needs look like a significant constraint that > > > will affect ability to use this feature. > > > > > > > I Agree, there is a lot to take in account. > > In any way, those constraints could be checked at the same function as > > the setsockopt() right? > > QEMU could possibly check its ulimits to see if it is possible, but it > would be safer to require a migration capability to be explicitly set > by the mgmt app to opt-in to zerocopy. > > > (Setting up configs to improve the chance of zerocopy would probably only > > happen at/before qemu starting, right?) > > Usually, but you can change ulimits on the fly for a process. I'm just > not sure of semantics if you reduce limits and existing usage exceeds > the reduced value. > > Regards, > Daniel > -- > |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o-https://fstop138.berrange.com :| > |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Dr. David Alan Gilbert
res on kernel > > side > > and whether they can be enabled together (MSG_ZEROCOPY, mptcp, kTLS). > > > > From the safe side we may want to only enable one of them until we prove > > they'll work together I guess.. > > MPTCP is good when we're network limited f

Re: [PATCH v1 2/3] io: Add zerocopy and errqueue

2021-09-07 Thread Dr. David Alan Gilbert
ough, would ensure > > > the semantics similar to current semantics, reducing risk of unexpected > > > problems. > > > > > > > What if we do the 'flush()' before we start post-copy, instead of after each > > iteration? would that be enough? > > Possibly, yes. This really need David G's input since he understands > the code in way more detail than me. Hmm I'm not entirely sure why we have the sync after each iteration; the case I can think of is if we're doing async sending, we could have two versions of the same page in flight (one from each iteration) - you'd want those to get there in the right order. Dave > > Regards, > Daniel > -- > |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o-https://fstop138.berrange.com :| > |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH v4 00/34] modules: add meta-data database

2021-06-24 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > On Thu, Jun 24, 2021 at 04:01:25PM +0100, Dr. David Alan Gilbert wrote: > > * Gerd Hoffmann (kra...@redhat.com) wrote: > > > This patch series adds support for module meta-data. Today this is > > > eit

Re: [PATCH v4 00/34] modules: add meta-data database

2021-06-24 Thread Dr. David Alan Gilbert
stem.rst | 17 +++ > docs/devel/index.rst| 1 + > docs/devel/modules.rst | 5 + > docs/devel/qom.rst | 8 ++ > hmp-commands-info.hx| 3 - > hw/usb/meson.build | 10 +- > meson.build | 82

Re: [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically

2021-06-24 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > One more little step towards modular tcg ... > > Signed-off-by: Gerd Hoffmann Acked-by: Dr. David Alan Gilbert > --- > accel/tcg/hmp.c | 29 + > monitor/misc.c| 18 -

Re: [PATCH v4 30/34] monitor: allow register hmp commands

2021-06-24 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > Allow commands having a NULL cmd pointer, add a function to set the > pointer later. Use case: allow modules implement hmp commands. > > Signed-off-by: Gerd Hoffmann So this is OK, so Acked-by: Dr. David Alan Gilbert however, I can

Re: [PATCH 5/7] io: use GDateTime for formatting timestamp for websock headers

2021-06-14 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > ping: anyone willing to review this > Reviewed-by: Dr. David Alan Gilbert > On Wed, May 05, 2021 at 11:37:00AM +0100, Daniel P. Berrangé wrote: > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > &

Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-06-02 Thread Dr. David Alan Gilbert
* Jonah Palmer (jonah.pal...@oracle.com) wrote: > > On 3/24/21 2:31 PM, Dr. David Alan Gilbert wrote: > > * Jonah Palmer (jonah.pal...@oracle.com) wrote: > > > From: Laurent Vivier > > > > > > > > > > --- /dev/nu

Re: [PATCH] hmp: Fix loadvm to resume the VM on success instead of failure

2021-05-25 Thread Dr. David Alan Gilbert
M); > > -if (!load_snapshot(name, NULL, false, NULL, &err) && saved_vm_running) { > +if (load_snapshot(name, NULL, false, NULL, &err) && saved_vm_running) { > vm_start(); > } > hmp_handle_error(mon, err); > -- > 2.30.2 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH] hmp: Fix loadvm to resume the VM on success instead of failure

2021-05-12 Thread Dr. David Alan Gilbert
;m reading htat right, that gets you it restarting it if load_snapshot returns true, and it returns true if the load_snapshot worked; i.e. if we were running and we succesfully load a snasphot then we carry on running. Other than the commit message, it makes sense tome: Reviewed-by: Dr. David A

Re: [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > > > as some platforms where &#

Re: [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > > as some platforms where 'struct timeval.tv_sec' field is still 'long' > >

Re: [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-05 Thread Dr. David Alan Gilbert
ateTime > often results in simpler code too. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/passthrough_ll.c | 25 - > 1 file changed, 4 insertions(+), 21 deletions(-) > > diff --git a/tools/v

Re: [PATCH 1/7] migration: use GDateTime for formatting timestamp in snapshot names

2021-05-05 Thread Dr. David Alan Gilbert
ateTime > often results in simpler code too. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/savevm.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/migration/savevm.c b/migration/s

Re: [PATCH] virtio-blk: drop deprecated scsi=on|off property

2021-05-04 Thread Dr. David Alan Gilbert
, Dec 2019), dropped in 6.0 (commit > > f862ddbb1, just weeks ago). pc-1.3 was a bit over seven years old when > > we released 5.0. pc-2.4 will be six years old by the time we release > > 6.1. Fair game? > > As a data-point, libvirt will be dropping support for (release, not the machine type) in the upcomming release. I'm not sure > whether that justifies more deprecation though. What qemu features will you then be relying on? Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [PATCH 4/5] block: add trace point when fdatasync fails

2021-04-15 Thread Dr. David Alan Gilbert
or debugging. > > Signed-off-by: Daniel P. Berrangé I'd have had to admit to not having thought that would fail; the fact we're debugging something where it does, suggests it's a good idea! Reviewed-by: Dr. David Alan Gilbert > --- > block/file-posix.c | 2 ++ > bloc

Re: [PATCH 5/5] block: remove duplicate trace.h include

2021-04-15 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > block/file-posix.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/block/file-posix.c b/block/file-posix.c > index 6aafeda44f..2538

  1   2   3   4   5   6   >