[Qemu-devel] [PATCH v3 5/8] vhost: update_mem_cb implementation

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the meat of update_mem_cb; this is called for each region, to add a region to our temporary list. Our temporary list is in order we look to see if this region can be merged with the current head of list. Signed-off-by: Dr. David Alan

[Qemu-devel] [PATCH v3 0/8] Rework vhost memory region updates

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This patch set reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. Its intention is to simplify a lot of the update code, and to make it easier for the postcopy+shared

[Qemu-devel] [PATCH v3 1/8] memory: address_space_iterate

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Iterate through an address space calling a function for each section. The iteration is done in order. Signed-off-by: Dr. David Alan Gilbert --- include/exec/memory.h | 23 +++ memory.c |

[Qemu-devel] [PATCH v3 3/8] vhost: Simplify ring verification checks

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory

[Qemu-devel] [PATCH v3 4/8] vhost: New memory update functions

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_update_mem will replace the existing update mechanism. They make use of the Flatview we have now to make the update simpler. This commit just adds the basic structure. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH v3 2/8] vhost: Move log_dirty check

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 3 +++ hw/virtio/vhost.c | 20 +--- 2 files changed, 16 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v3 6/8] vhost: Compare and copy updated region data into device state

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Compare the temporary region data with the original, and if it's different update the original in the device state. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost.c | 19

[Qemu-devel] [PATCH v3 7/8] vhost: Remove old vhost_set_memory etc

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions it uses and the memory_changed flags we no longer use. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 254

[Qemu-devel] [PATCH v3 8/8] vhost: Move mem_sections maintenance into commit/update routines

2017-12-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the maintenance of mem_sections into the vhost_update_mem routines, this removes the need for the vhost_region_add/del callbacks. Suggested-by: Igor Mammedov (and mostly written by Igor!) Signed-off-by: Dr. David

[Qemu-devel] [PATCH] docs: Convert migration.txt to rst

2017-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Mostly just manual conversion with very minor fixes. Signed-off-by: Dr. David Alan Gilbert --- docs/devel/{migration.txt => migration.rst} | 326 +++- 1 file changed, 176 insertions(+), 150

[Qemu-devel] [RFC v2 1/8] memory: address_space_iterate

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Iterate through an address space calling a function for each section. The iteration is done in order. Signed-off-by: Dr. David Alan Gilbert --- include/exec/memory.h | 23 +++ memory.c |

[Qemu-devel] [RFC v2 2/8] vhost: Move log_dirty check

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 3 +++ hw/virtio/vhost.c | 20 +--- 2 files changed, 16 insertions(+), 7 deletions(-)

[Qemu-devel] [RFC v2 0/8] Rework vhost memory region updates

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is an experimental set that reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. It's intention is to simplify a lot of the update code, and to make it easier for the

[Qemu-devel] [RFC v2 5/8] vhost: update_mem_cb implementation

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the meat of update_mem_cb; this is called for each region, to add a region to our temporary list. Our temporary list is in order we look to see if this region can be merged with the current head of list. Signed-off-by: Dr. David Alan

[Qemu-devel] [RFC v2 4/8] vhost: New memory update functions

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_update_mem will replace the existing update mechanism. They make use of the Flatview we have now to make the update simpler. This commit just adds the basic structure. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [RFC v2 3/8] vhost: Simplify ring verification checks

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It were doing checks by mapping ring's GPA+len and checking that HVA hasn't changed with new

[Qemu-devel] [RFC v2 7/8] vhost: Remove old vhost_set_memory etc

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions it uses and the memory_changed flags we no longer use. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 254

[Qemu-devel] [RFC v2 6/8] vhost: Compare and copy updated region data into device state

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Compare the temporary region data with the original, and if it's different update the original in the device state. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost.c | 19

[Qemu-devel] [RFC v2 8/8] vhost: Move mem_sections maintenance into commit/update routines

2017-12-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Mvoe the maintenance of mem_sections into the vhost_update_mem routines, this removes the need for the vhost_region_add/del callbacks. Suggested-by: Igor Mammedov (and mostly written by Igor!) Signed-off-by: Dr. David

[Qemu-devel] [PULL 1/2] hmp: Replace error_report_err

2017-10-30 Thread Dr. David Alan Gilbert (git)
From: ZhiPeng Lu Use hmp_handle_error instend of error_report_err to set error. Signed-off-by: ZhiPeng Lu Reviewed-by: Jiyun Fan Message-Id: <1508411793-22868-1-git-send-email-lu.zhip...@zte.com.cn> Reviewed-by: Philippe

[Qemu-devel] [PULL 2/2] monitor: fix dangling CPU pointer

2017-10-30 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz If a CPU selected with the "cpu" command is hot-unplugged then "info cpus" causes QEMU to exit: (qemu) device_del cpu1 (qemu) info cpus qemu:qemu_cpu_kick_thread: No such process This happens because "cpu" stores the pointer to the selected CPU into the monitor

[Qemu-devel] [PULL 0/2] hmp queue

2017-10-30 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit abf6e752e55b2f5afb48303429dea2db7c3a62de: Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20171030' into staging (2017-10-30 13:02:45 +) are available in the Git repository at:

[Qemu-devel] [PATCH] libvhost-user: Send messages with no data

2018-05-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The response to a VHOST_USER_POSTCOPY_ADVISE contains a fd but doesn't actually contain any data. FIx vu_message_write so that it doesn't do a 0-byte write() call, since this was ending up with rc=0 that was confusing the error handling code.

[Qemu-devel] [PATCH] migration: Textual fixups for blocktime

2018-04-27 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Blank lines and comments as suggested by Eric. Signed-off-by: Dr. David Alan Gilbert --- qapi/migration.json | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qapi/migration.json

[Qemu-devel] [PATCH v2] migration: update docs

2018-04-27 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Update the migration docs: Among other changes: * Added a general list of advice for device authors * Reordered the section on conditional state (subsections etc) into the order we prefer. * Add a note about firmware Signed-off-by:

[Qemu-devel] [PATCH v4 4/7] qmp: Enable a few commands in preconfig state

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: Igor Mammedov Commands query-chardev, query-version, query-name, query-uuid, query-iothreads, query-memdev are informational and do not depend on the machine being initialized. Make them available in preconfig runstate to make the latter a little bit more useful. The generic qom commands

[Qemu-devel] [PATCH v4 2/7] hmp: Allow help on preconfig commands

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the 'help' command in preconfig state but make it only list the preconfig commands. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- hmp-commands.hx | 1 + monitor.c | 8 +++- 2 files changed, 8

[Qemu-devel] [PATCH v4 3/7] hmp: Restrict auto-complete in preconfig

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Don't show the commands that aren't available. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- monitor.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [PATCH v4 6/7] hmp: add exit_preconfig

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the exit_preconfig command to return to normality. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- hmp-commands.hx | 19 +++ hmp.c | 8 hmp.h | 1 + 3 files changed,

[Qemu-devel] [PATCH v4 0/7] Reenable hmp for preconfig mode

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Reenable HMP in preconfig mode; it's pretty easy and anyway I want to do a similar thing for OOB eventually. We'll want to enable more commands in preconfig mode to make it useful at some point. Dave v4 Fixes from Markus' review. Including enabling some

[Qemu-devel] [PATCH v4 1/7] hmp: Add flag for preconfig commands

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a flag to command definitions to allow them to be used in preconfig and check it. If users try to use commands that aren't available, tell them to use the exit_preconfig comand we're adding in a few patches. Signed-off-by: Dr. David Alan Gilbert Reviewed-by:

[Qemu-devel] [PATCH v4 5/7] hmp: Add commands for preconfig

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a bunch of the info commands to be used in preconfig. version, chardev, name, uuid,memdev, iothreads Were enabled in QMP in the previous patch from Igor status, hotpluggable_cpus Was enabled in the original allow-preconfig series history is HMP

[Qemu-devel] [PATCH v4 7/7] hmp: Allow HMP in preconfig state again

2018-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we can cope with preconfig in HMP, reenable by reverting commit 71dc578e116599ea73c8a2a4e693134702ec0e83. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- monitor.c | 6 -- 1 file changed, 6 deletions(-) diff

[Qemu-devel] [PATCH v3 6/7] hmp: add exit_preconfig

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the exit_preconfig command to return to normality. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- hmp-commands.hx | 15 +++ hmp.c | 7 +++ hmp.h | 1 + 3 files changed, 23

[Qemu-devel] [PATCH v3 3/7] hmp: Restrict auto-complete in preconfig

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Don't show the commands that aren't available. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- monitor.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [PATCH v3 4/7] qmp: enable query-[chardev|version|name|uuid|iothreads|memdev] commands in preconfig state

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: Igor Mammedov subj commands, are informational and do not depend on machine being initialized. Make them available early in preconfig runstate to make the later a little bit more useful. Signed-off-by: Igor Mammedov --- qapi/char.json | 3 ++- qapi/misc.json | 12 +++- 2 files

[Qemu-devel] [PATCH v3 7/7] hmp: Allow HMP in preconfig state again

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we can cope with preconfig in HMP, reenable by reverting commit 71dc578e116599ea73c8a2a4e693134702ec0e83. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- monitor.c | 6 -- 1 file changed, 6 deletions(-) diff

[Qemu-devel] [PATCH v3 2/7] hmp: Allow help on preconfig commands

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the 'help' command in preconfig state but make it only list the preconfig commands. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov --- hmp-commands.hx | 1 + monitor.c | 8 +++- 2 files changed, 8

[Qemu-devel] [PATCH v3 0/7] Reenable hmp for preconfig mode

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Reenable HMP in preconfig mode; it's pretty easy and anyway I want to do a similar thing for OOB eventually. We'll want to enable more commands in preconfig mode to make it useful at some point. Dave v3 Add Igor's patch to enable most of the same info commands

[Qemu-devel] [PATCH v3 5/7] hmp: Add info commands for preconfig

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a bunch of the info commands to be used in preconfig. version, chardev, name, uuid,memdev, iothreads Were enabled in QMP in the previous patch from Igor status, hotpluggable_cpus Was enabled in the original allow-preconfig series history is HMP

[Qemu-devel] [PATCH v3 1/7] hmp: Add flag for preconfig commands

2018-06-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a flag to command definitions to allow them to be used in preconfig and check it. If users try to use commands that aren't available, tell them to use the exit_preconfig comand we're adding in a few patches. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH 2/3] migration: Wake rate limiting for urgent requests

2018-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Rate limiting sleeps the migration thread for a while when it runs out of bandwidth; but sometimes we want to wake up to get on with something more urgent (like a postcopy request). Here we use a semaphore with a timedwait instead of a simple sleep; Incrementing

[Qemu-devel] [PATCH 1/3] migration/postcopy: Add max-postcopy-bandwidth parameter

2018-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Limit the background transfer bandwidth during the postcopy phase to the value set on this new parameter. The default, 0, corresponds to the existing behaviour which is unlimited bandwidth. Signed-off-by: Dr. David Alan Gilbert --- hmp.c | 7

[Qemu-devel] [PATCH 3/3] migration/postcopy: Wake rate limit sleep on postcopy request

2018-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the 'urgent request' mechanism added in the previous patch for entries added to the postcopy request queue for RAM. Ignore the rate limiting while we have requests. Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 9 - 1 file changed, 8

[Qemu-devel] [PATCH 0/3] Postcopy bandwidth limiting

2018-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, Postcopy currently turns off bandwidth limits during the postcopy phase to make sure the urgent postcopy requests aren't delayed. This causes problems for larger clusters which share networking between the migration stream and other critical services.

[Qemu-devel] [PULL 01/10] typedefs: add QJSON

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Since commit 83ee768d6247b, we now have two places that define the QJSON type: $ git grep 'typedef struct QJSON QJSON' include/migration/vmstate.h:typedef struct QJSON QJSON; migration/qjson.h:typedef struct QJSON QJSON; This breaks docker-test-build@centos6: In file included

[Qemu-devel] [PULL 09/10] migration/postcopy: Wake rate limit sleep on postcopy request

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the 'urgent request' mechanism added in the previous patch for entries added to the postcopy request queue for RAM. Ignore the rate limiting while we have requests. Signed-off-by: Dr. David Alan Gilbert Message-Id:

[Qemu-devel] [PULL 08/10] migration: Wake rate limiting for urgent requests

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Rate limiting sleeps the migration thread for a while when it runs out of bandwidth; but sometimes we want to wake up to get on with something more urgent (like a postcopy request). Here we use a semaphore with a timedwait instead of a simple sleep; Incrementing

[Qemu-devel] [PULL 07/10] migration/postcopy: Add max-postcopy-bandwidth parameter

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Limit the background transfer bandwidth during the postcopy phase to the value set on this new parameter. The default, 0, corresponds to the existing behaviour which is unlimited bandwidth. Signed-off-by: Dr. David Alan Gilbert Message-Id:

[Qemu-devel] [PULL 05/10] migration: fix counting xbzrle cache_miss_rate

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: Xiao Guangrong Sync up xbzrle_cache_miss_prev only after migration iteration goes forward Signed-off-by: Xiao Guangrong Message-Id: <20180604095520.8563-4-xiaoguangr...@tencent.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 2 +- 1

[Qemu-devel] [PULL 10/10] migration: calculate expected_downtime with ram_bytes_remaining()

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: Balamuruhan S expected_downtime value is not accurate with dirty_pages_rate * page_size, using ram_bytes_remaining() would yeild it resonable. consider to read the remaining ram just after having updated the dirty pages count later migration_bitmap_sync_range() in migration_bitmap_sync()

[Qemu-devel] [PULL 04/10] migration/block-dirty-bitmap: fix dirty_bitmap_load

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: Vladimir Sementsov-Ogievskiy dirty_bitmap_load_header return code is obtained but not handled. Fix this. Bug was introduced in b35ebdf076d697bc "migration: add postcopy migration of dirty bitmaps" with the whole function. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id:

[Qemu-devel] [PULL 02/10] migration: Fixes for non-migratable RAMBlocks

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There are still a few cases where migration code is using the macros and functions that do all RAMBlocks rather than just the migratable blocks; fix those up. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20180605162545.80778-2-dgilb...@redhat.com>

[Qemu-devel] [PULL 00/10] migration queue

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 2702c2d3eb74e3908c0c5dbf3a71c8987595a86e: Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-140618-1' into staging (2018-06-15 12:49:36 +0100) are available in the Git repository at:

[Qemu-devel] [PULL 06/10] migration: introduce migration_update_rates

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: Xiao Guangrong It is used to slightly clean the code up, no logic is changed Signed-off-by: Xiao Guangrong Message-Id: <20180604095520.8563-5-xiaoguangr...@tencent.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 35

[Qemu-devel] [PULL 03/10] migration: Poison ramblock loops in migration

2018-06-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The migration code should be using the RAMBLOCK_FOREACH_MIGRATABLE and qemu_ram_foreach_block_migratable not the all-block versions; poison them so that we can't accidentally use them. Signed-off-by: Dr. David Alan Gilbert Message-Id:

[Qemu-devel] [PATCH 4/6] hmp: Add info commands for preconfig

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a bunch of the info commands to be used in preconfig. Could probably add most of them. Signed-off-by: Dr. David Alan Gilbert --- hmp-commands-info.hx | 9 + hmp-commands.hx | 1 + 2 files changed, 10 insertions(+) diff --git

[Qemu-devel] [PATCH 1/6] hmp: Add flag for preconfig commands

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a flag to command definitions to allow them to be used in preconfig and check it. Signed-off-by: Dr. David Alan Gilbert --- monitor.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/monitor.c b/monitor.c index 6d0cec552e..50b95f41db

[Qemu-devel] [PATCH 5/6] hmp: add exit_preconfig

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the exit_preconfig command to return to normality. Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 15 +++ hmp.c | 7 +++ hmp.h | 1 + 3 files changed, 23 insertions(+) diff --git a/hmp-commands.hx

[Qemu-devel] [PATCH 2/6] hmp: Allow help on preconfig commands

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the 'help' command in preconfig state but make it only list the preconfig commands. Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 1 + monitor.c | 8 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx

[Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Reenable HMP in preconfig mode; it's pretty easy and anyway I want to do a similar thing for OOB eventually. We'll want to enable more commands in preconfig mode to make it useful at some point. Dave Dr. David Alan Gilbert (6): hmp: Add flag for preconfig

[Qemu-devel] [PATCH 6/6] hmp: Allow HMP in preconfig state again

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we can cope with preconfig in HMP, reenable by reverting commit 71dc578e116599ea73c8a2a4e693134702ec0e83. Signed-off-by: Dr. David Alan Gilbert --- monitor.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [PATCH 3/6] hmp: Restrict auto-complete in preconfig

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Don't show the commands that aren't available. Signed-off-by: Dr. David Alan Gilbert --- monitor.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 7d1709c225..9b29787a52 100644 --- a/monitor.c +++

[Qemu-devel] [PATCH 1/2] migration: Fixes for non-migratable RAMBlocks

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There are still a few cases where migration code is using the macros and functions that do all RAMBlocks rather than just the migratable blocks; fix those up. Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 4 ++-- migration/rdma.c | 2 +- 2 files

[Qemu-devel] [PATCH 2/2] migration: Poison ramblock loops in migration

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The migration code should be using the RAMBLOCK_FOREACH_MIGRATABLE and qemu_ram_foreach_block_migratable not the all-block versions; poison them so that we can't accidentally use them. Signed-off-by: Dr. David Alan Gilbert --- include/exec/ramlist.h | 4 +++-

[Qemu-devel] [PATCH 0/2] Fixups for non-migratable RAMBlocks

2018-06-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, Cédric's b895de50 got merged at about the same time as some of Peter's changes and there's a rdma case as well; so tidy up those cases that were looping over all (rather than just migratable) RAMBlocks and poison it so we don't end up doing the same thing

[Qemu-devel] [PATCH v2 4/6] hmp: Add info commands for preconfig

2018-06-07 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a bunch of the info commands to be used in preconfig. Could probably add most of them. Signed-off-by: Dr. David Alan Gilbert --- hmp-commands-info.hx | 12 hmp-commands.hx | 1 + 2 files changed, 13 insertions(+) diff --git

[Qemu-devel] [PATCH] tests/migration: Skip tests for ppc tcg

2018-06-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" PPC tcg seems to be failing migration tests quite regularly; we believe this is TCG bugs in dirty bit updating; it's not clear why PPC fails more but lets skip for the moment. $ ./tests/migration-test /ppc64/migration/deprecated: OK /ppc64/migration/bad_dest: SKIP

[Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock

2018-05-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use qemu_set_nonblock rather than a simple fcntl; cleaner and I have no reason to change other flags. Reported-by: Peter Maydell Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user.c

[Qemu-devel] [PATCH] Migration+TLS: Fix crash due to double cleanup

2018-04-30 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" During a TLS connect we see: migration_channel_connect calls migration_tls_channel_connect (calls after TLS setup) migration_channel_connect My previous error handling fix made migration_channel_connect call migrate_fd_connect in all

[Qemu-devel] [PATCH v3] migration: update docs

2018-05-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Update the migration docs: Among other changes: * Added a general list of advice for device authors * Reordered the section on conditional state (subsections etc) into the order we prefer. * Add a note about firmware Signed-off-by:

[Qemu-devel] [PATCH v4 3/7] migration: Wait for semaphore before completing migration

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wait for a semaphore before completing the migration, if the previously added capability was enabled. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/migration.c | 38

[Qemu-devel] [PATCH v4 1/7] migration: Add 'pause-before-switchover' capability

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When 'pause-before-switchover' is enabled, the outgoing migration will pause before invalidating the block devices and serializing the device state. At this point the management layer gets the chance to clean up any device jobs or other device

[Qemu-devel] [PATCH v4 0/7] migration: pause-before-switchover

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This set attempts to make a race condition between migration and drive-mirror (and other block users) soluble by allowing the migration to be paused after the source qemu releases the block devices but before the serialisation of the

[Qemu-devel] [PATCH v4 2/7] migration: Add 'pre-switchover' and 'device' statuses

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add two statuses for use when the 'pause-before-switchover' capability is enabled. 'pre-switchover' is the state that we wait in for management to allow us to continue. 'device' is the state we enter while serialising the devices after

[Qemu-devel] [PATCH v4 6/7] migration: allow cancel to unpause

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" If a migration_cancel is issued during the new paused state, kick the pause_sem to get to unpause so it can cancel. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu ---

[Qemu-devel] [PATCH v4 5/7] migrate: HMP migate_continue

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" HMP equivalent to the just added migrate-continue Unpause a migrate paused at a given state. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- hmp-commands.hx | 12 hmp.c

[Qemu-devel] [PATCH v4 4/7] migration: migrate-continue

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" A new qmp command allows the caller to continue from a given paused state. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/migration.c | 11 +++ qapi/migration.json

[Qemu-devel] [PATCH v4 7/7] migration: pause-before-switchover for postcopy

2017-10-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add pause-before-switchover support for postcopy. After starting postcopy it will transition active->pre-switchover->postcopy_active Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu ---

[Qemu-devel] [PATCH 0/2] find_ram_offset cleanups and alignment

2018-01-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is mainly the alignment change that Paolo asked for in the 2nd commit, but while I was there I added some comments and tracing that I've split out. Dave Dr. David Alan Gilbert (2): find_ram_offset: Add comments and tracing

[Qemu-devel] [PATCH 2/2] find_ram_offset: Align ram_addr_t allocation on long boundaries

2018-01-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The dirty bitmaps are built from 'long'sand there is fast-path code for synchronising the case where the RAMBlock is aligned to the start of a long boundary. Align the allocation to this boundary to cause the fast path to be used. Offsets

[Qemu-devel] [PATCH 1/2] find_ram_offset: Add comments and tracing

2018-01-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add some comments so I can understand the various nested loops. Add some tracing so I can see what they're doing. Signed-off-by: Dr. David Alan Gilbert --- exec.c | 17 - trace-events | 3 +++ 2

[Qemu-devel] [PATCH v6 5/7] vhost: Clean out old vhost_set_memory and friends

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions and flags it used. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 251 --

[Qemu-devel] [PATCH v6 1/7] vhost: Build temporary section list and deref after commit

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Igor spotted that there's a race, where a region that's unref'd in a _del callback might be free'd before the set_mem_table call in the _commit callback, and thus the vhost might end up using free memory. Fix this by building a complete

[Qemu-devel] [PATCH v6 2/7] vhost: Simplify ring verification checks

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory

[Qemu-devel] [PATCH v6 6/7] vhost: Merge and delete unused callbacks

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now that the olf vhost_set_memory code is gone, the _nop and _add callbacks are identical and can be merged. The _del callback is no longer needed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov

[Qemu-devel] [PATCH v6 7/7] vhost: Move log_dirty check

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 20 +--- 2 files changed, 14 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v6 0/7] Rework vhost memory region updates

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This patch set reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. Its intention is to simplify a lot of the update code, and to make it easier for the postcopy+shared

[Qemu-devel] [PATCH v7 2/7] vhost: Simplify ring verification checks

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory

[Qemu-devel] [PATCH v7 0/7] Rework vhost memory region updates

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This patch set reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. Its intention is to simplify a lot of the update code, and to make it easier for the postcopy+shared

[Qemu-devel] [PATCH v7 6/7] vhost: Merge and delete unused callbacks

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now that the olf vhost_set_memory code is gone, the _nop and _add callbacks are identical and can be merged. The _del callback is no longer needed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov

[Qemu-devel] [PATCH v7 7/7] vhost: Move log_dirty check

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 20 +--- 2 files changed, 14 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v7 1/7] vhost: Build temporary section list and deref after commit

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Igor spotted that there's a race, where a region that's unref'd in a _del callback might be free'd before the set_mem_table call in the _commit callback, and thus the vhost might end up using free memory. Fix this by building a complete

[Qemu-devel] [PATCH v7 5/7] vhost: Clean out old vhost_set_memory and friends

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions and flags it used. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 251 --

[Qemu-devel] [PATCH v7 4/7] vhost: Regenerate region list from changed sections list

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Compare the sections list that's just been generated, and if it's different from the old one regenerate the region list. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c |

[Qemu-devel] [PATCH v7 3/7] vhost: Merge sections added to temporary list

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" As sections are reported by the listener to the _nop and _add methods, add them to the temporary section list but now merge them with the previous section if the new one abuts and the backend allows. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH] tests/migration: Add source to PC boot block

2018-01-31 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The boot block used in the migration test is currently only shipped as a hex (with the source in the git commit message), change this to actually include the source. A makefile rule is added, but the expectation is that the generated hex is

[Qemu-devel] [PATCH] migration: Recover block devices if failure in device state

2018-02-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In e91d895 I added the new pause-before-switchover mechanism to allow migration completion to be delayed; this changes the last state prior to completion to MIGRATE_STATUS_DEVICE rather than MIGRATE_STATUS_ACTIVE. Fix the failure path in

[Qemu-devel] [PULL 09/14] tests: Add deprecated commands migration test

2018-02-06 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela We add deprecated commands on a new test, so we don't have to add it on normal tests. Signed-off-by: Juan Quintela Reviewed-by: Peter Xu Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PULL 00/14] migration queue

2018-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 2b3805f370521deacab974b9c9ca07d2319a8890: Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-02-03-1' into staging (2018-02-05 09:31:37 +) are available in the Git repository at:

<    9   10   11   12   13   14   15   16   17   18   >