summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qemu-sockets: add Error ** to all functionsPaolo Bonzini2012-10-236-24/+24
| | | | | | | | This lets me adjust the clients to do proper error propagation first, thus avoiding temporary regressions in the quality of the error messages. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* error: add error_set_errno and error_setg_errnoPaolo Bonzini2012-10-232-0/+37
| | | | | | | | These functions help maintaining homogeneous formatting of error messages that include strerror values. Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* usb-serial: only expose device in guest when the chardev is openGerd Hoffmann2012-10-221-2/+17
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* usb-serial: don't magically zap chardev on umplugGerd Hoffmann2012-10-221-1/+1
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: add pci-serial documentationGerd Hoffmann2012-10-222-0/+36
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: add 2x + 4x pci variantGerd Hoffmann2012-10-221-0/+149
| | | | | | | | Add multiport serial card implementation, with two variants, one featuring two and one featuring four ports. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: add windows inf file for the pci card to docsGerd Hoffmann2012-10-221-0/+109
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: add pci variantGerd Hoffmann2012-10-226-0/+112
| | | | | | | So we get a hot-pluggable 16550 uart. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: split serial.cGerd Hoffmann2012-10-2226-180/+257
| | | | | | | | | | Split serial.c into serial.c, serial.h and serial-isa.c. While being at creating a serial.h header file move the serial prototypes from pc.h to the new serial.h. The latter leads to s/pc.h/serial.h/ in tons of boards which just want the serial bits from pc.h Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Call MADV_HUGEPAGE for guest RAM allocationsLuiz Capitulino2012-10-222-0/+6
| | | | | | | | | This makes it possible for QEMU to use transparent huge pages (THP) when transparent_hugepage/enabled=madvise. Otherwise THP is only used when it's enabled system wide. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'quintela/migration-next-20121017' into stagingAnthony Liguori2012-10-2217-272/+319
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * quintela/migration-next-20121017: (41 commits) cpus: create qemu_in_vcpu_thread() savevm: make qemu_file_put_notify() return errors savevm: un-export qemu_file_set_error() block-migration: handle errors with the return codes correctly block-migration: Switch meaning of return value block-migration: make flush_blks() return errors buffered_file: buffered_put_buffer() don't need to set last_error savevm: Only qemu_fflush() can generate errors savevm: make qemu_fill_buffer() be consistent savevm: unexport qemu_ftell() savevm: unfold qemu_fclose_internal() savevm: make qemu_fflush() return an error code savevm: Remove qemu_fseek() virtio-net: use qemu_get_buffer() in a temp buffer savevm: unexport qemu_fflush migration: make migrate_fd_wait_for_unfreeze() return errors buffered_file: make buffered_flush return the error code buffered_file: callers of buffered_flush() already check for errors buffered_file: We can access directly to bandwidth_limit buffered_file: unfold migrate_fd_close ...
| * cpus: create qemu_in_vcpu_thread()Juan Quintela2012-10-171-2/+7
| | | | | | | | | | | | | | Old code used !io_thread to know if a thread was an vcpu or not. That fails when we introduce the iothread. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: make qemu_file_put_notify() return errorsJuan Quintela2012-10-173-5/+6
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: un-export qemu_file_set_error()Juan Quintela2012-10-172-2/+1
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * block-migration: handle errors with the return codes correctlyJuan Quintela2012-10-171-12/+14
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * block-migration: Switch meaning of return valueJuan Quintela2012-10-171-5/+9
| | | | | | | | | | | | | | | | | | Make consistent the result of blk_mig_save_dirty_block() and mig_save_device_dirty() Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * block-migration: make flush_blks() return errorsJuan Quintela2012-10-171-14/+8
| | | | | | | | | | | | | | | | | | This means we don't need to pass through qemu_file to get the errors. Adjust all callers. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: buffered_put_buffer() don't need to set last_errorJuan Quintela2012-10-171-2/+0
| | | | | | | | | | | | | | | | Callers on savevm.c:qemu_fflush() will set it. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: Only qemu_fflush() can generate errorsJuan Quintela2012-10-171-17/+18
| | | | | | | | | | | | | | | | | | Move the error check to the beggining of the callers. Once this is fixed qemu_file_set_if_error() is not used anymore, so remove it. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: make qemu_fill_buffer() be consistentJuan Quintela2012-10-171-1/+1
| | | | | | | | | | | | | | | | It was setting last_error directly once, and with the helper the other time. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: unexport qemu_ftell()Juan Quintela2012-10-172-4/+1
| | | | | | | | | | | | It was unused out of savevm.c. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: unfold qemu_fclose_internal()Juan Quintela2012-10-171-20/+6
| | | | | | | | | | | | | | | | | | It was used only one, and was only one if. It makes error handling saner. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: make qemu_fflush() return an error codeJuan Quintela2012-10-171-16/+23
| | | | | | | | | | | | | | | | | | Adjust all the callers. We moved the set of last_error from inside qemu_fflush() to all the callers. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: Remove qemu_fseek()Juan Quintela2012-10-172-22/+0
| | | | | | | | | | | | | | | | It has no users, and is only half implemented. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * virtio-net: use qemu_get_buffer() in a temp bufferJuan Quintela2012-10-171-1/+3
| | | | | | | | | | | | | | | | | | | | qemu_fseek() is known to be wrong. Would be removed on the next commit. This code should never been used (value has been MAC_TABLE_ENTRIES since 2009). Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * savevm: unexport qemu_fflushJuan Quintela2012-10-172-2/+1
| | | | | | | | | | | | | | | | It is not used outside of savevm.c Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration: make migrate_fd_wait_for_unfreeze() return errorsJuan Quintela2012-10-173-6/+11
| | | | | | | | | | | | | | | | Adjust all callers Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: make buffered_flush return the error codeJuan Quintela2012-10-171-9/+26
| | | | | | | | | | | | Or the amount of data written if there is no error. Adjust all callers. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * buffered_file: callers of buffered_flush() already check for errorsJuan Quintela2012-10-171-7/+0
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: We can access directly to bandwidth_limitJuan Quintela2012-10-173-6/+4
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: unfold migrate_fd_closeJuan Quintela2012-10-174-15/+6
| | | | | | | | | | | | We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * buffered_file: unfold migrate_fd_wait_for_unfreezeJuan Quintela2012-10-174-9/+3
| | | | | | | | | | | | We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * buffered_file: unfold migrate_fd_put_readyJuan Quintela2012-10-174-9/+3
| | | | | | | | | | | | | | | | We only use it once, just remove the callback indirection. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: unfold migrate_fd_put_bufferJuan Quintela2012-10-174-11/+7
| | | | | | | | | | | | | | | | We only used it once, just remove the callback indirection Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: opaque is MigrationStateJuan Quintela2012-10-172-4/+6
| | | | | | | | | | | | | | | | | | It always have that type, just change it. We will remove buffered file later on the migration thread series. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * buffered_file: rename opaque to migration_stateJuan Quintela2012-10-171-6/+6
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * BufferedFile: append, then flushPaolo Bonzini2012-10-171-39/+11
| | | | | | | | | | | | | | | | | | | | | | Simplify the logic for pushing data from the buffer to the output pipe/socket. This also matches more closely what will be the operation of the migration thread. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * migration: Add dirty_pages_rate to query migrate outputJuan Quintela2012-10-175-2/+31
| | | | | | | | | | | | It indicates how many pages were dirtied during the last second. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * Separate migration bitmapJuan Quintela2012-10-173-31/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration limits the amount of concurrent access to the qemu bitmap from iothread and migration thread (which requires taking the big lock). We use the qemu bitmap type. We have to "undo" the dirty_pages counting optimization on the general dirty bitmap and do the counting optimization with the migration local bitmap. Signed-off-by: Umesh Deshpande <udeshpan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * ram: create trace event for migration sync bitmapJuan Quintela2012-10-172-0/+10
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * ram: introduce migration_bitmap_sync()Juan Quintela2012-10-171-2/+8
| | | | | | | | | | | | | | | | | | Helper that we use each time that we need to syncronize the migration bitmap with the other dirty bitmaps. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * ram: Export last_ram_offset()Juan Quintela2012-10-172-1/+2
| | | | | | | | | | | | | | | | Is the only way of knowing the RAM size. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * ram: Introduce migration_bitmap_test_and_reset_dirty()Juan Quintela2012-10-171-5/+14
| | | | | | | | | | | | | | | | | | It just test if the dirty bit is set, and clears it. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * ram: introduce migration_bitmap_set_dirty()Juan Quintela2012-10-171-7/+13
| | | | | | | | | | | | | | | | | | It just marks a region of memory as dirty. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * savevm: Factorize ram globals reset in its own functionJuan Quintela2012-10-171-3/+9
| | | | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * migration: print expected downtime in info migrateJuan Quintela2012-10-176-0/+20
| | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
| * migration: export migrate_get_current()Juan Quintela2012-10-172-1/+2
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration: rename expected_time to expected_downtimeJuan Quintela2012-10-171-10/+10
| | | | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * migration: print total downtime for final phase of migrationJuan Quintela2012-10-175-2/+19
| | | | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
| * migration: store end_time in a local variableJuan Quintela2012-10-171-1/+3
| | | | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
OpenPOWER on IntegriCloud