[Qemu-devel] [PATCH 0/2] In memory QEMUFile

2014-08-06 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Hi, This patch-pair adds the QEMUSizedBuffer based in-memory QEMUFile written by Stefan Berger and Joel Schopp. I've made some minor fixes (and typo cleanups) and modified the existing test-vmstate to use it for some test cases. While there's

[Qemu-devel] [PATCH 2/2] Tests: QEMUSizedBuffer/QEMUBuffer

2014-08-06 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Modify some of tests/test-vmstate.c to use the in memory file based on QEMUSizedBuffer to provide basic testing of QEMUSizedBuffer and the associated memory backed QEMUFile type. Only some of the tests are changed so that the fd backed QEMUFile is

[Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile

2014-08-06 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This is based on Stefan and Joel's patch that creates a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating

[Qemu-devel] [PATCH v2 1/2] QEMUSizedBuffer based QEMUFile

2014-08-07 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This is based on Stefan and Joel's patch that creates a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating

[Qemu-devel] [PATCH v2 0/2] In memory QEMUFile

2014-08-07 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Hi, This patch-pair adds the QEMUSizedBuffer based in-memory QEMUFile written by Stefan Berger and Joel Schopp. I've made some minor fixes (and typo cleanups) and modified the existing test-vmstate to use it for some test cases. While there's

[Qemu-devel] [PATCH v2 2/2] Tests: QEMUSizedBuffer/QEMUBuffer

2014-08-07 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Modify some of tests/test-vmstate.c to use the in memory file based on QEMUSizedBuffer to provide basic testing of QEMUSizedBuffer and the associated memory backed QEMUFile type. Only some of the tests are changed so that the fd backed QEMUFile is

[Qemu-devel] [PATCH v2 00/43] Postcopy implementation

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Hi, This is a 2nd cut of my postcopy implementation; it fixes up some of the comments from the 1st posting but it also fixes a lot of bugs, (other comments from the 1st round will be fixed later). The commands to start a postcopy migration have

[Qemu-devel] [PATCH v2 09/43] Return path: Send responses from destination to source

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add migrate_send_rp_message to send a message from destination to source along the return path. (It uses a mutex to let it be called from multiple threads) Add migrate_send_rp_shut to send a 'shut' message to indicate the destination is

[Qemu-devel] [PATCH v2 04/43] Create MigrationIncomingState

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com There are currently lots of pieces of incoming migration state scattered around, and postcopy is adding more, and it seems better to try and keep it together. allocate MIS in process_incoming_migration_co Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 02/43] improve DPRINTF macros, add to savevm

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Improve the existing DPRINTF macros in migration.c and arch_init by: 1) Making them go to stderr rather than stdout (so you can run with -nographic and redirect your debug to a file) 2) Making them print the ms time with each debug - useful for

[Qemu-devel] [PATCH v2 05/43] Return path: Open a return path on QEMUFile for sockets

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's using a dup'd fd. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH v2 01/43] qemu_ram_foreach_block: pass up error value, and down the ramblock name

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com check the return value of the function it calls and error if it's none-0 Fixup qemu_rdma_init_one_block that is the only current caller, and __qemu_rdma_add_block the only function it calls using it. Pass the name of the ramblock to the

[Qemu-devel] [PATCH v2 11/43] qemu_loadvm errors and debug

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Flip many fprintf's to error_report Add lots of DPRINTF debug in qemu_loadvm* Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- savevm.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v2 03/43] Add qemu_get_counted_string to read a string prefixed by a count byte

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com and use it in loadvm_state. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/qemu-file.h | 2 ++ qemu-file.c | 15 +++ savevm.c | 18 ++ 3 files

[Qemu-devel] [PATCH v2 07/43] Migration commands

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Create QEMU_VM_COMMAND section type for sending commands from source to destination. These commands are not intended to convey guest state but to control the migration process. For use in postcopy. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 25/43] postcopy: Add incoming_init/cleanup functions

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Provide functions to be called before the start of a postcopy enabled migration (even if it's not eventually used) and at the end. During the init we must disable huge pages in the RAM that we will receive postcopy data into, since if they start

[Qemu-devel] [PATCH v2 20/43] migrate_start_postcopy: Command to trigger transition to postcopy

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Once postcopy is enabled (with migrate_set_capability), the migration will still start on precopy mode. To cause a transition into postcopy the: migrate_start_postcopy command must be issued. Postcopy will start sometime after this (when it's

[Qemu-devel] [PATCH v2 27/43] postcopy: ram_enable_notify to switch on userfault

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/postcopy-ram.h | 5 + postcopy-ram.c | 36 +++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v2 13/43] Rework loadvm path for subloops

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions. Split the core of qemu_loadvm_state out so we can use it for both. Allow the inner

[Qemu-devel] [PATCH v2 10/43] Return path: Source handling of return path

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Open a return path, and handle messages that are received upon it. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/migration.h | 11 migration.c | 145

[Qemu-devel] [PATCH v2 16/43] QEMU_VM_CMD_PACKAGED: Send a packaged chunk of migration stream

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com QEMU_VM_CMD_PACKAGED is a migration command that allows a chunk of migration stream to be sent in one go, and be received by a separate instance of the loadvm loop while not interacting with the migration stream. This is used by postcopy to load

[Qemu-devel] [PATCH v2 19/43] postcopy: OS support test

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Provide a check to see if the OS we're running on has all the bits needed for postcopy. Creates postcopy-ram.c which will get most of the other helpers we need. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- Makefile.objs

[Qemu-devel] [PATCH v2 17/43] migrate_init: Call from savevm

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH v2 15/43] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add state variable showing current incoming postcopy state. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/migration.h | 8 ++ include/sysemu/sysemu.h | 23 +++ savevm.c | 324

[Qemu-devel] [PATCH v2 24/43] Postcopy page-map-incoming (PMI) structure

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com The PMI holds the state of each page on the incoming side, so that we can tell if the page is missing, already received or there is a request outstanding for it. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH v2 26/43] postcopy: Incoming initialisation

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 11 +++ include/migration/migration.h | 1 + migration.c | 1 + 3 files changed, 13 insertions(+) diff --git a/arch_init.c

[Qemu-devel] [PATCH v2 18/43] Allow savevm handlers to state whether they could go into postcopy

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Use that to split the qemu_savevm_state_pending counts into postcopiable and non-postcopiable amounts Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 7 +++ include/migration/vmstate.h | 2 +-

[Qemu-devel] [PATCH v2 30/43] mig fd_connect: open return path

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Open the return path before migration thread creation. Since this can fail, guard the fd cleanup so it doesn't try and destroy the potentially non-existent thread. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH v2 29/43] Postcopy: Rework migration thread for postcopy mode

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Switch to postcopy if: 1) There's still a significant amount to transfer 2) Postcopy is enabled 3) migrate_postcopy_start has been issued. and change the cleanup at the end of migration to match. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v2 22/43] qemu_savevm_state_complete: Postcopy changes

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com When postcopy calls qemu_savevm_state_complete it's not really the end of migration, so skip: a) Finishing postcopiable iterative devices - they'll carry on b) The termination byte on the end of the stream. We then also add:

[Qemu-devel] [PATCH v2 38/43] qemu_ram_block_from_host

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Postcopy sends RAMBlock names and offsets over the wire (since it can't rely on the order of ramaddr being the same), and it starts out with HVA fault addresses from the kernel. qemu_ram_block_from_host translates a HVA into a RAMBlock, an offset

[Qemu-devel] [PATCH v2 31/43] Postcopy: Create a fault handler thread before marking the ram as userfault

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/migration.h | 3 +++ postcopy-ram.c| 23 +++ 2 files changed, 26 insertions(+) diff --git a/include/migration/migration.h

[Qemu-devel] [PATCH v2 21/43] MIG_STATE_POSTCOPY_ACTIVE: Add new migration state

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com 'MIG_STATE_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy 'migration_postcopy_phase' is provided for other sections to know if they're in postcopy. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH v2 42/43] End of migration for postcopy

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Tweak the end of migration cleanup; we don't want to close stuff down at the end of the main stream, since the postcopy is still sending pages on the other thread. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- migration.c | 20

[Qemu-devel] [PATCH v2 33/43] Page request: Process incoming page request

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com On receiving MIG_RPCOMM_REQPAGES look up the address and queue the page. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 52 +++ include/migration/migration.h |

[Qemu-devel] [PATCH v2 23/43] Postcopy: Maintain sentmap during postcopy pre phase

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Where postcopy is preceeded by a period of precopy, the destination will have received pages that may have been dirtied on the source after the page was sent. The destination must throw these pages away before starting it's CPUs. Maintain a

[Qemu-devel] [PATCH v2 34/43] Page request: Consume pages off the post-copy queue

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com When transmitting RAM pages, consume pages that have been queued by MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. Note: a) After a queued page the linear walk carries on from after the unqueued page; there is a

[Qemu-devel] [PATCH v2 28/43] Postcopy: postcopy_start

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com postcopy_start: Perform all the initialisation associated with starting up postcopy mode from the source. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- migration.c | 85

[Qemu-devel] [PATCH v2 37/43] Postcopy: Use helpers to map pages during migration

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com In postcopy, the destination guest is running at the same time as it's receiving pages; as we receive new pages we must put them into the guests address space atomically to avoid a running CPU accessing a partially written page. Use the helpers in

[Qemu-devel] [PATCH v2 36/43] postcopy_ram.c: place_page and helpers

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com postcopy_place_page (etc) provide a way for postcopy to place a page into guests memory atomically (using the new remap_anon_pages syscall). Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/migration.h| 1 +

[Qemu-devel] [PATCH v2 40/43] Start up a postcopy/listener thread ready for incoming page data

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com The loading of a device state (during postcopy) may access guest memory that's still on the source machine and thus might need a page fill; split off a separate thread that handles the incoming page data so that the original incoming migration code

[Qemu-devel] [PATCH v2 35/43] Add assertion to check migration_dirty_pages

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com I've seen it go negative once during dev, it shouldn't happen. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch_init.c b/arch_init.c index c006d21..58eccc1 100644

[Qemu-devel] [PATCH v2 39/43] Postcopy; Handle userfault requests

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com userfaultfd is a Linux syscall that gives an fd that receives a stream of notifications of accesses to pages marked as MADV_USERFAULT, and allows the program to acknowledge those stalls and tell the accessing thread to carry on. Signed-off-by: Dr.

[Qemu-devel] [PATCH v2 41/43] postcopy: Wire up loadvm_postcopy_ram_handle_{run, end} commands

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Wire up more of the handlers for the commands on the destination side, in particular loadvm_postcopy_ram_handle_run now has enough to start the guest running. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- savevm.c | 68

[Qemu-devel] [PATCH v2 43/43] Start documenting how postcopy works.

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/migration.txt | 150 + 1 file changed, 150 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index

[Qemu-devel] [PATCH v2 32/43] Page request: Add MIG_RPCOMM_REQPAGES reverse command

2014-08-11 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add MIG_RPCOMM_REQPAGES command on Return path for the postcopy destination to request a page from the source. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/migration.h | 3 ++ migration.c | 77

[Qemu-devel] [RFC PATCH 02/16] QEMUSizedBuffer/QEMUFile

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Stefan Berger's to create a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers

[Qemu-devel] [RFC PATCH 00/16] visitor+BER migration format

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This is a work in progress cut of my visitor+BER format migration world; there's lots to do but it's starting to get there. I'd appreciate if anyone who has more experience with either the visitor code, or ASN.1/BER in general has a look to see if

[Qemu-devel] [RFC PATCH 15/16] ASN.1 schema for new migration format

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/specs/migration.schema | 113 1 file changed, 113 insertions(+) create mode 100644 docs/specs/migration.schema diff --git

[Qemu-devel] [RFC PATCH 10/16] Visitor: Common types to use visitors

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Rework the common types in vmstate.c to use .visit rather than .get/.put and now call the correct visitor function. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- vmstate.c | 376

[Qemu-devel] [RFC PATCH 07/16] Visitor: Binary compatible input visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com based on Michael Roth's https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg02470.html Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qapi/qemu-file-binary-input-visitor.h | 27 + qapi/Makefile.objs

[Qemu-devel] [RFC PATCH 11/16] Choose output visitor based on env variable

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- savevm.c | 39 --- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/savevm.c b/savevm.c index 7431773..25e92f2 100644 --- a/savevm.c

[Qemu-devel] [RFC PATCH 05/16] Visitor: Binary compatible output visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Binary compatible output visitor to write to a QEMUFile in current migration format. This is based on Michael Roth's series : https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg02466.html Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [RFC PATCH 16/16] Wire in BER visitors

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com BER output visitor to be selected with env (as other output visitors) BER input visitor recognized by file header exec.c: Set cpu-common to use it's own type tag (as example) Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- exec.c

[Qemu-devel] [RFC PATCH 01/16] Visitor: Add methods for migration format use

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com array types From https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg02465.html str256 type For the upto 256byte strings QEMU commonly uses for IDs buffer type For a blob of data that the caller wants to deliver whole (e.g.

[Qemu-devel] [RFC PATCH 06/16] Visitor: Debug output visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com A migration visitor whose output is textual and purely for human consumption for debug. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qapi/qemu-file-debug-output-visitor.h | 26 ++ qapi/Makefile.objs

[Qemu-devel] [RFC PATCH 12/16] BER Visitor: Create output visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ber.h: Add VMSTATE_CPU_COMMON --- include/qapi/ber.h | 108 include/qapi/qemu-file-ber-output-visitor.h | 26 + qapi/Makefile.objs |

[Qemu-devel] [RFC PATCH 14/16] Start some BER format docs

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add information on the QEMUFile/Visitor/VMState split Describe how to verify a BER stream against the schema Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/migration.txt | 34 -- 1 file changed,

[Qemu-devel] [RFC PATCH 08/16] Visitor: Output path

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Replace QEMUFile by Visitor in most of the output path. There are still a few places that want a QEMUFile* and those are TODOs at the moment. Hacks in pci.c, spapr, spapr_vscsi.c for now where new visitor/qemufile boundaries have been added.

[Qemu-devel] [RFC PATCH 09/16] Visitor: Load path

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Hacks in piix4.c, pci.c, spapr_vscsi.c for now Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 72 ++- hw/acpi/piix4.c | 5 +- hw/pci/pci.c| 3 +-

[Qemu-devel] [RFC PATCH 03/16] qemu-file: Add set/get tmp_visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/qemu-file.h | 4 qemu-file.c | 12 2 files changed, 16 insertions(+) diff --git a/include/migration/qemu-file.h

[Qemu-devel] [RFC PATCH 04/16] Header/constant/types fixes for visitors

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Move constants around and add types to allow file structure to move into visitors. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 12 include/migration/migration.h | 15 +++

[Qemu-devel] [RFC PATCH 13/16] BER Visitor: Create input visitor

2014-03-25 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qapi/qemu-file-ber-input-visitor.h | 26 + qapi/Makefile.objs |2 +- qapi/qemu-file-ber-input-visitor.c | 1163

[Qemu-devel] [PATCH v3 1/1] Make qemu_peek_buffer loop until it gets it's data

2014-03-27 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Make qemu_peek_buffer repeatedly call fill_buffer until it gets all the data it requires, or until there is an error. At the moment, qemu_peek_buffer will try one qemu_fill_buffer if there isn't enough data waiting, however the kernel is

[Qemu-devel] [PATCH v4 1/1] Count used RAMBlock pages for migration_dirty_pages

2014-03-27 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This is a fix for a bug* triggered by a migration after hot unplugging a few virtio-net NICs, that caused migration never to converge, because 'migration_dirty_pages' is incorrectly initialised. 'migration_dirty_pages' is used as a tally of the

[Qemu-devel] [PATCH v4 1/1] Make qemu_peek_buffer loop until it gets it's data

2014-04-08 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Make qemu_peek_buffer repeatedly call fill_buffer until it gets all the data it requires, or until there is an error. At the moment, qemu_peek_buffer will try one qemu_fill_buffer if there isn't enough data waiting, however the kernel is

[Qemu-devel] [PATCH 1/1] Disallow outward migration while awaiting incoming migration

2014-04-14 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com QEMU will assert if you attempt to start an outgoing migration on a QEMU that's sitting waiting for an incoming migration (started with -incoming), so disallow it with a proper error. (This is a fix for

[Qemu-devel] [PATCH v2 1/1] Disallow outward migration while awaiting incoming migration

2014-04-14 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com QEMU will assert if you attempt to start an outgoing migration on a QEMU that's sitting waiting for an incoming migration (started with -incoming), so disallow it with a proper error. (This is a fix for

[Qemu-devel] [PATCH] Allow mismatched virtio config-len

2014-06-27 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Commit 'virtio: validate config_len on load' restricted config_len loaded from the wire to match the config_len that the device had. Unfortunately, there are cases where this isn't true, the one we found it on was the wqe addition in virtio-blk.

[Qemu-devel] [PATCH v2] [PATCH] Allow mismatched virtio config-len

2014-06-27 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Commit 'virtio: validate config_len on load' restricted config_len loaded from the wire to match the config_len that the device had. Unfortunately, there are cases where this isn't true, the one we found it on was the wce addition in virtio-blk.

[Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation

2014-05-19 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com VMWare apparently doesn't like running under QEMU due to our incomplete emulation of it's special IO Port. This adds a -machine suboption to allow it to be turned off. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com ---

[Qemu-devel] [PATCH 2/3] Pass optional destination version hint to migrate

2014-05-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Allow a VersionInfo to be passed as an option to migrate to indicate the destination QEMU version. It's intended to help those having to provide compatibility between minor versions (irrespective of what might have happened in a previous minor)

[Qemu-devel] [PATCH 1/3] hmp: Allow options with parameters

2014-05-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com HMP currently allows optional string parameters, however where there are multiple optional string parameters the order and interdependence of them becomes complex. Allow optional parameters of the form: -x string Also, add a hint to

[Qemu-devel] [PATCH 3/3] Add optional migrate version to hmp migrate command

2014-05-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Uses the new 'optional parameter with string' parameter type e.g. migrate -v 2.0.0 (foo) exec: whatever Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- hmp-commands.hx | 7 ++-- hmp.c | 106

[Qemu-devel] [PATCH 0/3] Migrate with destination version

2014-05-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This patch set provides an optional parameter to 'migrate' giving the destination QEMU version, it's intended for those having to maintain compatibility between minor versions (including downstream versions) and also for those who need to think

[Qemu-devel] [PATCH 1/1] Fix vmstate_info_int32_le comparison/assign

2014-02-12 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Fix comparison of vmstate_info_int32_le so that it succeeds if loaded value is (l)ess than or (e)qual When the comparison succeeds, assign the value loaded This is a change in behaviour but I think the original intent, since the idea is to

[Qemu-devel] [PATCH 1/1] Trivial typo: ctz-cto

2014-02-12 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qemu/host-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h index de85d28..285c5fb 100644 ---

[Qemu-devel] [PATCH V2 1/1] Fix vmstate_info_int32_le comparison/assign

2014-02-12 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Fix comparison of vmstate_info_int32_le so that it succeeds if loaded value is (l)ess than or (e)qual When the comparison succeeds, assign the value loaded This is a change in behaviour but I think the original intent, since the idea is to

[Qemu-devel] [PATCH] Fix two XBZRLE corruption issues

2014-02-13 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Push zero'd pages into the XBZRLE cache A page that was cached by XBZRLE, zero'd and then XBZRLE'd again was being compared against a stale cache value Don't use 'qemu_put_buffer_async' to put pages from the XBZRLE cache Since the

[Qemu-devel] [PATCH 1/3] Rework --name to use QemuOpts

2014-01-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- vl.c | 52 +++- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/vl.c b/vl.c index 7f4fe0d..5f993e4 100644 --- a/vl.c +++

[Qemu-devel] [PATCH 2/3] Add 'namethreads' suboption to --name

2014-01-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qemu/thread.h| 1 + qemu-options.hx | 6 -- util/qemu-thread-posix.c | 7 +++

[Qemu-devel] [PATCH 0/3] Name threads

2014-01-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This series uses pthread_setname_np (when available) to set the names on threads that QEMU creates to make life easier when debugging. It's turned off by default (because there were worries that it might break tools that relied on process names)

[Qemu-devel] [PATCH 3/3] Add a 'name' parameter to qemu_thread_create

2014-01-28 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- cpus.c | 6 +++---

[Qemu-devel] [PATCH v2 2/3] Add 'debug-threads' suboption to --name

2014-01-30 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qemu/thread.h| 1 + qemu-options.hx | 7 +-- util/qemu-thread-posix.c | 7 +++

[Qemu-devel] [PATCH v2 3/3] Add a 'name' parameter to qemu_thread_create

2014-01-30 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- cpus.c | 25

[Qemu-devel] [PATCH v2 0/3] Name threads

2014-01-30 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This series uses pthread_setname_np (when available) to set the names on threads that QEMU creates to make life easier when debugging. It's turned off by default (because there were worries that it might break tools that relied on process names)

[Qemu-devel] [PATCH v2 1/3] Rework --name to use QemuOpts

2014-01-30 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com Reviewed-by: Alex Bennée alex.ben...@linaro.org --- vl.c | 52 +++- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/vl.c

[Qemu-devel] [RFC PATCH v2 09/16] Visitor: Load path

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Hacks in piix4.c, pci.c, spapr_vscsi.c for now Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- arch_init.c | 93 +++--- hw/acpi/piix4.c | 5 +- hw/pci/pci.c| 3

[Qemu-devel] [RFC PATCH v2 06/16] Visitor: Binary compatible output visitor

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Binary compatible output visitor to write to a QEMUFile in current migration format. This is based on Michael Roth's series : https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg02466.html Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [RFC PATCH v2 08/16] Visitor: Output path

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Replace QEMUFile by Visitor in most of the output path. There are still a few places that want a QEMUFile* and those are TODOs at the moment. Hacks in pci.c, spapr, spapr_vscsi.c for now where new visitor/qemufile boundaries have been added.

[Qemu-devel] [RFC PATCH v2 12/16] BER Visitor: Create input visitor

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qapi/qemu-file-ber-input-visitor.h | 26 + qapi/Makefile.objs |2 +- qapi/qemu-file-ber-input-visitor.c | 1575

[Qemu-devel] [RFC PATCH v2 14/16] ASN.1 schema for new migration format

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/specs/migration.schema | 133 1 file changed, 133 insertions(+) create mode 100644 docs/specs/migration.schema diff --git

[Qemu-devel] [RFC PATCH v2 10/16] Visitor: Common types to use visitors

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Rework the common types in vmstate.c to use .visit rather than .get/.put and now call the correct visitor function. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- vmstate.c | 376

[Qemu-devel] [RFC PATCH v2 13/16] Start some BER format docs

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Add information on the QEMUFile/Visitor/VMState split Describe how to verify a BER stream against the schema Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/migration.txt | 34 -- 1 file changed,

[Qemu-devel] [RFC PATCH v2 16/16] Add vmstate_cpu_common BER type code and wire it in.

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- docs/specs/migration.schema | 8 +++- exec.c | 2 ++ include/qapi/ber.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [RFC PATCH v2 04/16] qemu-file: Add set/get tmp_visitor

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/qemu-file.h | 4 qemu-file.c | 12 2 files changed, 16 insertions(+) diff --git a/include/migration/qemu-file.h

[Qemu-devel] [RFC PATCH v2 00/16] visitor+BER migration format

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com This is the 2nd version of my work-in-progress cut of my visitor+BER format migration world; there's lots to do but it's starting to get there. I'd appreciate if anyone who has more experience with either the visitor code, or ASN.1/BER in general

[Qemu-devel] [RFC PATCH v2 02/16] QEMUSizedBuffer/QEMUFile

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Stefan Berger's to create a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers

[Qemu-devel] [RFC PATCH v2 03/16] QEMUFilePart: A shim to read part of a file

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com QEMUFilePart takes a backing QEMUFile and a length, and exposes only 'length' bytes from the backing QEMUFile. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/migration/qemu-file.h | 2 ++ qemu-file.c | 73

[Qemu-devel] [RFC PATCH v2 07/16] Visitor: Binary compatible input visitor

2014-04-23 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com based on Michael Roth's https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg02470.html Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com --- include/qapi/qemu-file-binary-input-visitor.h | 27 + qapi/Makefile.objs

  1   2   3   4   5   6   7   8   9   10   >