[Qemu-devel] [PATCH v2 10/16] postcopy: Load huge pages in one go

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The existing postcopy RAM load loop already ensures that it glues together whole host-pages from the target page size chunks sent over the wire. Modify the definition of host page that it uses to be the RAM block page size and thus be huge

[Qemu-devel] [PATCH v2 11/16] postcopy: Mask fault addresses to huge page boundary

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently the fault address received by userfault is rounded to the host page boundary and a host page is requested from the source. Use the current RAMBlock page size instead of the general host page size so that for RAMBlocks backed by huge

[Qemu-devel] [PATCH v2 09/16] postcopy: Use temporary for placing zero huge pages

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The kernel can't do UFFDIO_ZEROPAGE for huge pages, so we have to allocate a temporary (always zero) page and use UFFDIO_COPYPAGE on it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH v2 12/16] postcopy: Send whole huge pages

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM save code uses ram_save_host_page to send whole host pages at a time; change this to use the host page size associated with the RAM Block which may be a huge page. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 16/16] postcopy: Add doc about hugepages and postcopy

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 6503c17..b462ead 100644 ---

[Qemu-devel] [PATCH v2 07/16] postcopy: Record largest page size

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Record the largest page size in use; we'll need it soon for allocating temporary buffers. Signed-off-by: Dr. David Alan Gilbert --- exec.c| 13 + include/exec/cpu-common.h | 1 +

[Qemu-devel] [PATCH v2 15/16] postcopy: Check for userfault+hugepage feature

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We need extra Linux kernel support (~4.11) to support userfaults on hugetlbfs; check for them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- migration/postcopy-ram.c | 12

[Qemu-devel] [PATCH v2 14/16] postcopy: Update userfaultfd.h header

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We use a new userfaultfd define, so update the header. (Not needed if someone just runs the update script once it's gone into the main kernel). Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH v2 13/16] postcopy: Allow hugepages

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow huge pages in postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- migration/postcopy-ram.c | 25 + 1 file changed, 1 insertion(+), 24

[Qemu-devel] [PATCH v2 02/16] postcopy: Transmit and compare individual page sizes

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When using postcopy with hugepages, we require the source and destination page sizes for any RAMBlock to match; note that different RAMBlocks in the same VM can have different page sizes. Transmit them as part of the RAM information header and

[Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, The existing postcopy code, and the userfault kernel code that supports it, only works for normal anonymous memory. Kernel support for userfault on hugetlbfs is working it's way upstream; it's in the linux-mm tree, You can get a version

[Qemu-devel] [PATCH v2 05/16] postcopy: enhance ram_block_discard_range for hugepages

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Unfortunately madvise DONTNEED doesn't work on hugepagetlb so use fallocate(FALLOC_FL_PUNCH_HOLE) qemu_fd_getpagesize only sets the page based off a file if the file is from hugetlbfs. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 01/16] postcopy: Transmit ram size summary word

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Replace the host page-size in the 'advise' command by a pagesize summary bitmap; if the VM is just using normal RAM then this will be exactly the same as before, however if they're using huge pages they'll be different, and thus: a)

[Qemu-devel] [PATCH v2 04/16] exec: ram_block_discard_range

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Create ram_block_discard_range in exec.c to replace postcopy_ram_discard_range and most of ram_discard_range. Those two routines are a bit of a weird combination, and ram_discard_range is about to get more complex for hugepages. It's OS

[Qemu-devel] [PATCH v2 08/16] postcopy: Plumb pagesize down into place helpers

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we deal with normal size pages and huge pages we need to tell the place handlers the size we're dealing with and make sure the temporary page is large enough. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH v2 03/16] postcopy: Chunk discards for hugepages

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" At the start of the postcopy phase, partially sent huge pages must be discarded. The code for dealing with host page sizes larger than the target page size can be reused for this case. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 06/16] Fold postcopy_ram_discard_range into ram_discard_range

2017-02-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Using the previously created ram_block_discard_range, kill off postcopy_ram_discard_range. ram_discard_range is just a wrapper that does the name lookup. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH 0/4] virtio-net VMState conversion and new VMSTATE macros

2017-02-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This set converts the virtio-net device to VMState; it uses a couple of new VMSTATE macros I've added, of which the VMSTATE_WITH_TMP is a bit unusual, but is intended for dealing with migration data that doesn't quite look like the data

[Qemu-devel] [PATCH 3/4] tests/migration: Add test for VMSTATE_WITH_TMP

2017-02-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a test for VMSTATE_WITH_TMP to tests/test-vmstate.c Signed-off-by: Dr. David Alan Gilbert --- tests/test-vmstate.c | 98 1 file changed, 92 insertions(+), 6

[Qemu-devel] [PATCH 1/4] migration: Add VMSTATE_UNUSED_VARRAY_UINT32

2017-02-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" VMSTATE_UNUSED_VARRAY_UINT32 is used to skip a chunk of the stream that's an n-element array; note the array size and the dynamic value read never get multiplied so there's no overflow risk. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH 4/4] virtio/migration: Migrate virtio-net to VMState

2017-02-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- hw/net/virtio-net.c| 316 +++-- include/hw/virtio/virtio-net.h | 4 +- 2 files changed, 213 insertions(+), 107 deletions(-) diff

[Qemu-devel] [PATCH 2/4] migration: Add VMSTATE_WITH_TMP

2017-02-03 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" VMSTATE_WITH_TMP is for handling structures where some calculation or rearrangement of the data needs to be performed before the data hits the wire. For example, where the value on the wire is an offset from a non-migrated base, but the data

[Qemu-devel] [PULL 01/15] MAINTAINERS: Add myself as a migration submaintainer

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Reviewed-by: Juan Quintela Message-Id: <20170124100437.18200-1-dgilb...@redhat.com> Signed-off-by: Dr. David Alan

[Qemu-devel] [PULL 06/15] block/vvfat: Remove the undesirable comment

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya Remove the "// assert(is_consistent(s))" comment in block/vvfat.c Signed-off-by: Ashijeet Acharya Message-Id: <1484566314-3987-2-git-send-email-ashijeetacha...@gmail.com> Reviewed-by: Dr. David Alan Gilbert

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

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit a678502e4f7580a6f143f680404aaee57ac3f4b5: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging (2017-01-24 15:39:09 +) are available in the git repository

[Qemu-devel] [PULL 10/15] migration: Fail migration blocker for --only-migratable

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya migrate_add_blocker should rightly fail if the '--only-migratable' option was specified and the device in use should not be able to perform the action which results in an unmigratable VM. Make migrate_add_blocker return -EACCES in this case.

[Qemu-devel] [PULL 03/15] migration: migrate QTAILQ

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Jianjun Duan Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. We created VMStateInfo vmstate_info_qtailq for QTAILQ. Similar VMStateInfo can be

[Qemu-devel] [PULL 14/15] migration: transform remaining DPRINTF into trace_

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela So we can remove DPRINTF() macro Signed-off-by: Juan Quintela Message-Id: <1485207141-1941-2-git-send-email-quint...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 13/15] PCI/migration merge vmstate_pci_device and vmstate_pcie_device

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The vmstate_pci_device and vmstate_pcie_devices differ just in the size of one buffer; combine the two using a _TEST macro. I think this is safe as long as everywhere which currently uses either of these two uses the right type. One thing

[Qemu-devel] [PULL 07/15] migration: Add a new option to enable only-migratable

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya Add a new option "--only-migratable" in qemu which will allow to add only those devices which will not fail qemu after migration. Devices set with the flag 'unmigratable' cannot be added when this option will be used. Signed-off-by: Ashijeet

[Qemu-devel] [PULL 11/15] migration: re-active images while migration been canceled after inactive them

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: zhanghailiang commit fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 fixed a case which migration aborted QEMU because it didn't regain the control of images while some errors happened. Actually, there are another two cases can trigger the same error reports: "

[Qemu-devel] [PULL 02/15] migration: extend VMStateInfo

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Jianjun Duan Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Reviewed-by: Dr. David Alan

[Qemu-devel] [PULL 15/15] migration/tracing: Add tracing on save

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add some tracing to vmstate_subsection_save and vmstate_save_state to help in debugging when you're not sure if a conditional piece of data is being saved. In vmstate_subsection_save I renamed the inner vmsd to avoid the aliasing and be able

[Qemu-devel] [PATCH] MAINTAINERS: Add myself as a migration submaintainer

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ad10004..c4b00ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1413,6 +1413,7 @@

[Qemu-devel] [PULL 04/15] tests/migration: Add test for QTAILQ migration

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Jianjun Duan Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan Message-Id: <1484852453-12728-4-git-send-email-du...@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 12/15] migration: Change name of live migration thread

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Pankaj Gupta Change the name of live migration thread from 'migration' to 'live_migration' to identify it clearly. 'migration' is a generic word and kernel also has tasks for process migration with the name 'migration/cpu#'. Signed-off-by: Pankaj Gupta

[Qemu-devel] [PULL 05/15] migration: add error_report

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Jianjun Duan Added error_report where version_ids do not match in vmstate_load_state. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Jianjun Duan Message-Id:

[Qemu-devel] [PULL 08/15] migration: Allow "device add" options to only add migratable devices

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya Introduce checks for the unmigratable flag in the VMStateDescription structs of respective devices when user attempts to add them. If the "--only-migratable" was specified, all unmigratable devices will rightly fail to add. This feature is made

[Qemu-devel] [PULL 09/15] migration: disallow migrate_add_blocker during migration

2017-01-24 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya If a migration is already in progress and somebody attempts to add a migration blocker, this should rightly fail. Add an errp parameter and a retcode return value to migrate_add_blocker. Signed-off-by: John Snow

[Qemu-devel] [PATCH v4 5/5] slirp: VMStatify remaining except for loop

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This converts the remaining components, except for the top level loop, to VMState. Signed-off-by: Dr. David Alan Gilbert --- slirp/slirp.c | 48 +++- 1 file changed, 19

[Qemu-devel] [PATCH v4 0/5] SLIRP VMStatification

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is an update to my previous SLIRP vmstatification, but finally the dependent patches have gone in, so this can now follow. Dave v4 Fix 'VMStatify socket level' for mingw64 build; it has some different choices for the type of

[Qemu-devel] [PATCH v4 1/5] slirp: VMState conversion; tcpcb

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the migration of the struct tcpcb to use a VMStateDescription, the rest of it will come later. Mostly mechanical, except for conversion of some 'char' to uint8_t to ensure portability. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v4 3/5] slirp: Common lhost/fhost union

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The socket structure has a pair of unions for lhost and fhost addresses; the unions are identical so split them out into a separate union declaration. Signed-off-by: Dr. David Alan Gilbert --- slirp/socket.h | 18

[Qemu-devel] [PATCH v4 2/5] slirp: VMStatify sbuf

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the sbuf structure to a VMStateDescription. Note this uses the VMSTATE_WITH_TMP mechanism to calculate and reload the offsets based on the pointers. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson

[Qemu-devel] [PATCH v4 4/5] slirp: VMStatify socket level

2017-02-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Working up the stack, this replaces the slirp_socket_load/save with VMState definitions. A place holder for IPv6 support is added as a comment; it needs testing once the rest of the IPv6 code is there. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v3 12/16] postcopy: Allow hugepages

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow huge pages in postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Laurent Vivier --- migration/postcopy-ram.c | 25

[Qemu-devel] [PATCH v3 08/16] postcopy: Use temporary for placing zero huge pages

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The kernel can't do UFFDIO_ZEROPAGE for huge pages, so we have to allocate a temporary (always zero) page and use UFFDIO_COPYPAGE on it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH v3 06/16] postcopy: Record largest page size

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Record the largest page size in use; we'll need it soon for allocating temporary buffers. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Laurent Vivier

[Qemu-devel] [PATCH v3 02/16] postcopy: Transmit and compare individual page sizes

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When using postcopy with hugepages, we require the source and destination page sizes for any RAMBlock to match; note that different RAMBlocks in the same VM can have different page sizes. Transmit them as part of the RAM information header and

[Qemu-devel] [PATCH v3 00/16] Postcopy: Hugepage support

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, The existing postcopy code, and the userfault kernel code that supports it, only works for normal anonymous memory. Kernel support for userfault on hugetlbfs has just been merged in Linus's tree for 4.11 (see 4c9a7831b11 merge) Note that

[Qemu-devel] [PATCH v3 04/16] exec: ram_block_discard_range

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Create ram_block_discard_range in exec.c to replace postcopy_ram_discard_range and most of ram_discard_range. Those two routines are a bit of a weird combination, and ram_discard_range is about to get more complex for hugepages. It's OS

[Qemu-devel] [PATCH v3 07/16] postcopy: Plumb pagesize down into place helpers

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we deal with normal size pages and huge pages we need to tell the place handlers the size we're dealing with and make sure the temporary page is large enough. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan

[Qemu-devel] [PATCH v3 14/16] postcopy: Check for userfault+hugepage feature

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We need extra Linux kernel support (~4.11) to support userfaults on hugetlbfs; check for them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Laurent Vivier

[Qemu-devel] [PATCH v3 15/16] postcopy: Add doc about hugepages and postcopy

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Laurent Vivier --- docs/migration.txt | 13 + 1 file changed, 13 insertions(+) diff

[Qemu-devel] [PATCH v3 10/16] postcopy: Mask fault addresses to huge page boundary

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently the fault address received by userfault is rounded to the host page boundary and a host page is requested from the source. Use the current RAMBlock page size instead of the general host page size so that for RAMBlocks backed by huge

[Qemu-devel] [PATCH v3 03/16] postcopy: Chunk discards for hugepages

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" At the start of the postcopy phase, partially sent huge pages must be discarded. The code for dealing with host page sizes larger than the target page size can be reused for this case. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v3 11/16] postcopy: Send whole huge pages

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM save code uses ram_save_host_page to send whole host pages at a time; change this to use the host page size associated with the RAM Block which may be a huge page. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v3 16/16] postcopy: Add extra check for COPY function

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" As an extra sanity check, make sure the region we're registering can perform UFFDIO_COPY; the COPY will fail later but this gives a cleaner failure. Signed-off-by: Dr. David Alan Gilbert --- migration/postcopy-ram.c | 4

[Qemu-devel] [PATCH v3 09/16] postcopy: Load huge pages in one go

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The existing postcopy RAM load loop already ensures that it glues together whole host-pages from the target page size chunks sent over the wire. Modify the definition of host page that it uses to be the RAM block page size and thus be huge

[Qemu-devel] [PATCH v3 13/16] postcopy: Update userfaultfd.h header

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Just the userfaultfd.h update from Paolo's header update run; * Drop this patch after Paolo's update goes in * Signed-off-by: Dr. David Alan Gilbert --- linux-headers/linux/userfaultfd.h | 67

[Qemu-devel] [PATCH v3 01/16] postcopy: Transmit ram size summary word

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Replace the host page-size in the 'advise' command by a pagesize summary bitmap; if the VM is just using normal RAM then this will be exactly the same as before, however if they're using huge pages they'll be different, and thus: a)

[Qemu-devel] [PATCH v3 05/16] postcopy: enhance ram_block_discard_range for hugepages

2017-02-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Unfortunately madvise DONTNEED doesn't work on hugepagetlb so use fallocate(FALLOC_FL_PUNCH_HOLE) qemu_fd_getpagesize only sets the page based off a file if the file is from hugetlbfs. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH] x86: Work around SMI migration breakages

2017-02-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Migration from a 2.3.0 qemu results in a reboot on the receiving QEMU due to a disagreement about SM (System management) interrupts. 2.3.0 didn't have much SMI support, but it did set CPU_INTERRUPT_SMI and this gets into the migration stream,

[Qemu-devel] [PULL 2/3] monitor: add poll-* properties into query-iothreads result

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Pavel Hrdina IOthreads were recently extended by new properties that can enable/disable and configure aio polling. This will also allow other tools that uses QEMU to probe for existence of those new properties via query-qmp-schema. Signed-off-by: Pavel Hrdina

[Qemu-devel] [PULL 1/3] hmp: fix block_set_io_throttle

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Eric Blake Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'"

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

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 796b288f7be875045670f963ce1b3c8e96ac: Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-02-21 15:48:22 +) are available in the git repository at:

[Qemu-devel] [PULL 3/3] monitor: Fix crashes when using HMP commands without CPU

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth When running certain HMP commands ("info registers", "info cpustats", "info tlb", "nmi", "memsave" or dumping virtual memory) with the "none" machine, QEMU crashes with a segmentation fault. This happens because the "none" machine does not have any CPUs by

[Qemu-devel] [PULL 02/14] MAINTAINERS: update my email address

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Amit Shah I'm leaving my job at Red Hat, this email address will stop working next week. Update it to one that I will have access to later. Signed-off-by: Amit Shah Message-Id: <1486120433-11628-1-git-send-email-amit.s...@redhat.com>

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

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit df96bfab49dab2d0373e49b51bbb51ce72e1601e: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20170213-1' into staging (2017-02-13 10:54:49 +) are available in the git repository at:

[Qemu-devel] [PULL 10/14] COLO: Don't process failover request while loading VM's state

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: zhanghailiang We should not do failover work while the main thread is loading VM's state. Otherwise the consistent of VM's memory and device state will be broken. We will restart the loading process after jump over the stage, The new failover status

[Qemu-devel] [PULL 05/14] migration: discard non-dirty ram pages after the start of postcopy

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Pavel Butsykin After the start of postcopy migration there are some non-dirty pages which have already been migrated. These pages are no longer needed on the source vm so that we can free them and it doen't hurt to complete the migration. Signed-off-by: Pavel

[Qemu-devel] [PULL 08/14] COLO: fix setting checkpoint-delay not working properly

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: zhanghailiang If we set checkpoint-delay through command 'migrate-set-parameters', It will not take effect until we finish last sleep chekpoint-delay, That's will be offensive espeically when we want to change its value from an extreme big one to a proper

[Qemu-devel] [PULL 12/14] migration: Add VMSTATE_WITH_TMP

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" VMSTATE_WITH_TMP is for handling structures where some calculation or rearrangement of the data needs to be performed before the data hits the wire. For example, where the value on the wire is an offset from a non-migrated base, but the data

[Qemu-devel] [PULL 09/14] COLO: Shutdown related socket fd while do failover

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: zhanghailiang If the net connection between primary host and secondary host breaks while COLO/COLO incoming threads are doing read() or write(). It will block until connection is timeout, and the failover process will be blocked because of it. So it is

[Qemu-devel] [PULL 13/14] tests/migration: Add test for VMSTATE_WITH_TMP

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a test for VMSTATE_WITH_TMP to tests/test-vmstate.c Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20170203160651.19917-4-dgilb...@redhat.com> Signed-off-by: Dr.

[Qemu-devel] [PULL 03/14] migration: add MigrationState arg for ram_save_/compressed_/page()

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Pavel Butsykin Cosmetic patch. The use of ms variable instead of migrate_get_current() looks nicer, especially when there reuse. Signed-off-by: Pavel Butsykin Message-Id: <20170203152321.19739-2-pbutsy...@virtuozzo.com> Reviewed-by: Dr.

[Qemu-devel] [PULL 06/14] migrate: Introduce zero RAM checks to skip RAM migration

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya Migration of a "none" machine with no RAM crashes abruptly as bitmap_new() fails and thus aborts. Instead place zero RAM checks at appropriate places to skip migration of RAM in this case and complete migration successfully for devices only.

[Qemu-devel] [PULL 04/14] add 'release-ram' migrate capability

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Pavel Butsykin This feature frees the migrated memory on the source during postcopy-ram migration. In the second step of postcopy-ram migration when the source vm is put on pause we can free unnecessary memory. It will allow, in particular, to start relaxing the

[Qemu-devel] [PULL 11/14] migration: Add VMSTATE_UNUSED_VARRAY_UINT32

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" VMSTATE_UNUSED_VARRAY_UINT32 is used to skip a chunk of the stream that's an n-element array; note the array size and the dynamic value read never get multiplied so there's no overflow risk. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 01/14] migration: remove myself as maintainer

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Amit Shah I'm switching jobs, and I'm not sure I can continue maintaining migration. Signed-off-by: Amit Shah Message-Id: <1486120416-11566-1-git-send-email-amit.s...@redhat.com> Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 07/14] migration: consolidate VMStateField.start

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: Halil Pasic The member VMStateField.start is used for two things, partial data migration for VBUFFER data (basically provide migration for a sub-buffer) and for locating next in QTAILQ. The implementation of the VBUFFER feature is broken when VMSTATE_ALLOC is

[Qemu-devel] [PULL 14/14] virtio/migration: Migrate virtio-net to VMState

2017-02-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Message-Id: <20170203160651.19917-5-dgilb...@redhat.com> Signed-off-by: Dr. David Alan Gilbert Merge fix

[Qemu-devel] [PATCH v2] migration: Update docs to discourage version bumps

2017-02-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Version bumps break backwards migration; update the docs to explain to people that's bad and how to avoid it. Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 58

[Qemu-devel] [PATCH v3 5/5] slirp: VMStatify remaining except for loop

2017-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This converts the remaining components, except for the top level loop, to VMState. Signed-off-by: Dr. David Alan Gilbert --- slirp/slirp.c | 48 +++- 1 file changed, 19

[Qemu-devel] [PATCH v3 1/5] slirp: VMState conversion; tcpcb

2017-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the migration of the struct tcpcb to use a VMStateDescription, the rest of it will come later. Mostly mechanical, except for conversion of some 'char' to uint8_t to ensure portability. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v3 3/5] slirp: Common lhost/fhost union

2017-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The socket structure has a pair of unions for lhost and fhost addresses; the unions are identical so split them out into a separate union declaration. Signed-off-by: Dr. David Alan Gilbert --- slirp/socket.h | 18

[Qemu-devel] [PATCH] migration: Update docs to discourage version bumps

2017-02-09 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Version bumps break backwards migration; update the docs to explain to people that's bad and how to avoid it. Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 42 ++

[Qemu-devel] [PULL 10/27] migration: Update docs to discourage version bumps

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Version bumps break backwards migration; update the docs to explain to people that's bad and how to avoid it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL 03/27] migration/vmstate: split up vmstate_base_addr

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: Halil Pasic Currently vmstate_base_addr does several things: it pinpoints the field within the struct, possibly allocates memory and possibly does the first pointer dereference. Obviously allocation is needed only for load. Let us split up the functionality in

[Qemu-devel] [PULL 07/27] vmstate-static-checker: update white list with spapr_pci

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: Laurent Vivier To fix migration between 2.7 and 2.8, some fields have been renamed and managed with the help of a PHB property (pre_2_8_migration): 5c4537b spapr: Fix 2.7<->2.8 migration of PCI host bridge So we need to add them to the white list:

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

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 6181478f6395cdd9d6ffd99623d0c9f39ea53606: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-02-28 08:46:03 +) are available in the git repository at:

[Qemu-devel] [PULL 08/27] migrate: Introduce a 'dc->vmsd' check to avoid segfault for --only-migratable

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: Ashijeet Acharya Commit a3a3d8c7 introduced a segfault bug while checking for 'dc->vmsd->unmigratable' which caused QEMU to crash when trying to add devices which do no set their 'dc->vmsd' yet while initialization. Place a 'dc->vmsd' check prior to it so that we

[Qemu-devel] [PULL 01/27] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: Daniel Henrique Barboza Using QMP, the error message of 'migrate_set_downtime' was displaying the values in milliseconds, being misleading with the command that accepts the value in seconds: { "execute": "migrate_set_downtime", "arguments": {"value": 3000}}

[Qemu-devel] [PULL 18/27] postcopy: Plumb pagesize down into place helpers

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we deal with normal size pages and huge pages we need to tell the place handlers the size we're dealing with and make sure the temporary page is large enough. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan

[Qemu-devel] [PULL 25/27] postcopy: Check for userfault+hugepage feature

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We need extra Linux kernel support (~4.11) to support userfaults on hugetlbfs; check for them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Laurent Vivier

[Qemu-devel] [PULL 21/27] postcopy: Mask fault addresses to huge page boundary

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently the fault address received by userfault is rounded to the host page boundary and a host page is requested from the source. Use the current RAMBlock page size instead of the general host page size so that for RAMBlocks backed by huge

[Qemu-devel] [PULL 27/27] postcopy: Add extra check for COPY function

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" As an extra sanity check, make sure the region we're registering can perform UFFDIO_COPY; the COPY will fail later but this gives a cleaner failure. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Laurent Vivier

[Qemu-devel] [PULL 15/27] exec: ram_block_discard_range

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Create ram_block_discard_range in exec.c to replace postcopy_ram_discard_range and most of ram_discard_range. Those two routines are a bit of a weird combination, and ram_discard_range is about to get more complex for hugepages. It's OS

[Qemu-devel] [PULL 09/27] migration: fix id leak regression

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: Marc-André Lureau This leak was introduced in commit 581f08bac22bdd5e081ae07f68071a0fc3c5c2c7. (it stands out quickly with ASAN once the rest of the leaks are also removed from make check with this series) Cc: Dr. David Alan Gilbert Cc:

[Qemu-devel] [PULL 19/27] postcopy: Use temporary for placing zero huge pages

2017-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The kernel can't do UFFDIO_ZEROPAGE for huge pages, so we have to allocate a temporary (always zero) page and use UFFDIO_COPYPAGE on it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

<    4   5   6   7   8   9   10   11   12   13   >