summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * vnc: avoid Yoda conditionalsPaolo Bonzini2012-10-231-2/+2
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * qemu-ga: ask and print error information from qemu-socketsPaolo Bonzini2012-10-231-3/+5
| | | | | | | | | | Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * nbd: ask and print error information from qemu-socketsPaolo Bonzini2012-10-231-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: $ qemu-system-x86_64 nbd:localhost:12345 inet_connect_opts: connect(ipv4,yakj.usersys.redhat.com,127.0.0.1,12345): Connection refused qemu-system-x86_64: could not open disk image nbd:localhost:12345: Connection refused After: $ x86_64-softmmu/qemu-system-x86_64 nbd:localhost:12345 qemu-system-x86_64: Failed to connect to socket: Connection refused qemu-system-x86_64: could not open disk image nbd:localhost:12345: Connection refused Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * qemu-char: ask and print error information from qemu-socketsPaolo Bonzini2012-10-231-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: $ qemu-system-x86_64 -monitor tcp:localhost:6000 (starts despite error) $ qemu-system-x86_64 -monitor tcp:foo.bar:12345 getaddrinfo(foo.bar,12345): Name or service not known chardev: opening backend "socket" failed $ qemu-system-x86_64 -monitor tcp:localhost:443,server=on inet_listen_opts: bind(ipv4,127.0.0.1,443): Permission denied inet_listen_opts: FAILED chardev: opening backend "socket" failed After: $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:6000 x86_64-softmmu/qemu-system-x86_64: -monitor tcp:localhost:6000: Failed to connect to socket: Connection refused chardev: opening backend "socket" failed $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:foo.bar:12345 qemu-system-x86_64: -monitor tcp:foo.bar:12345: address resolution failed for foo.bar:12345: Name or service not known chardev: opening backend "socket" failed $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:443,server=on qemu-system-x86_64: -monitor tcp:localhost:443,server=on: Failed to bind socket: Permission denied chardev: opening backend "socket" failed Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration (incoming): add error propagation to fd and exec protocolsPaolo Bonzini2012-10-237-42/+27Star
| | | | | | | | | | | | | | And remove the superfluous integer return value. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration (outgoing): add error propagation for all protocolsPaolo Bonzini2012-10-236-65/+22Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error propagation is already there for socket backends. Add it to other protocols, simplifying code that tests for errors that will never happen. With all protocols understanding Error, the code can be simplified further by removing the return value. Unfortunately, the quality of error messages varies depending on where the error is detected, because no Error is passed to the NonBlockingConnectHandler. Thus, the exact error message still cannot be sent to the user if the OS reports it asynchronously via SO_ERROR. If NonBlockingConnectHandler received an Error**, we could for example report the error class and/or message via a new field of the query-migration command even if it is reported asynchronously. Before: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate (qemu) After: (qemu) migrate fd:ffff migrate: File descriptor named 'ffff' has not been found (qemu) info migrate capabilities: xbzrle: off Migration status: failed total time: 0 milliseconds Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration: use qemu-sockets to establish Unix socketsPaolo Bonzini2012-10-233-81/+21Star
| | | | | | | | | | | | | | This makes migration-unix.c again a cut-and-paste job from migration-tcp.c, exactly as it was in the beginning. :) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration: centralize call to migrate_fd_error()Paolo Bonzini2012-10-233-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to migrate_fd_error() was missing for non-socket backends, so centralize it in qmp_migrate(). Before: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate (qemu) After: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate capabilities: xbzrle: off Migration status: failed total time: 0 milliseconds (The awful error message will be fixed later in the series). Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * migration: avoid using error_is_set and thus relying on errp != NULLPaolo Bonzini2012-10-232-9/+12
| | | | | | | | | | | | | | | | | | | | | | The migration code is using errp to detect "internal" errors, this means that it relies on errp being non-NULL. No impact so far because our only QMP clients (the QMP marshaller and HMP) never pass a NULL Error **. But if we had others, this patch would make sure that migration can work with a NULL Error **. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * qemu-sockets: add nonblocking connect for Unix socketsPaolo Bonzini2012-10-233-15/+70
| | | | | | | | | | | | | | | | This patch mostly mimics what was done to TCP sockets, but simpler because there is only one address to try. It also includes a free EINTR bug fix. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * qemu-sockets: unix_listen and unix_connect are portablePaolo Bonzini2012-10-231-32/+17Star
| | | | | | | | | | | | | | They are just wrappers and do not need a Win32-specific version. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * 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>
* | Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-23383-2240/+2240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori2012-10-222-34/+38
|\ \ | | | | | | | | | | | | | | | | | | * qemu-kvm/memory/urgent: memory: abort if a memory region is destroyed during a transaction i440fx: avoid destroying memory regions within a transaction memory: Make eventfd adhere to device endianness
| * | memory: abort if a memory region is destroyed during a transactionAvi Kivity2012-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Destroying a memory region is illegal within a transaction, as until the transaction is committed, the memory core may hold references to the region. Add an assert to check for violations of this rule. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | i440fx: avoid destroying memory regions within a transactionAvi Kivity2012-10-171-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling memory_region_destroy() within a transaction is illegal, since the memory API is allowed to continue to dispatch to a region until the transaction commits. 440fx does that however when managing PAM registers. This bug is benign, since the regions are all aliases (which the memory core tends to throw anyway), and since we don't do concurrent dispatch yet, but instead of relying on that, tighten ship ahead of the coming concurrency storm. Fix by having a predefined set of regions, of which one will be enabled at any time. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: Make eventfd adhere to device endiannessAlexander Graf2012-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our memory API MMIO regions know the concept of device endianness. This is used to automatically swap endianness between devices and host CPU, depending on whether buses in between would swizzle the bits. The ioeventfd value comparison does not adhere to that semantic though. Probably because nobody has been running ioeventfd on a BE platform and the only device implementing ioeventfd right now is LE (PCI) based. So add swizzling to ioeventfd registration / deletion to make the rest of the code as consistent as possible. Thanks a lot to Michael Tsirkin to point me towards the right direction. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
* | | Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121017.0' ↵Anthony Liguori2012-10-221-3/+8
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | into staging * awilliam/tags/vfio-pci-for-qemu-20121017.0: vfio-pci: Mark non-migratable vfio-pci: Fix debug build
| * | vfio-pci: Mark non-migratableAlex Williamson2012-10-171-0/+6
| | | | | | | | | | | | | | | | | | We haven't magically fixed this yet. Toss in a description too. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
| * | vfio-pci: Fix debug buildAlex Williamson2012-10-171-3/+2Star
| | | | | | | | | | | | | | | | | | Stray variable from before MSI-X rework Signed-off-by: Alex Williamson <alex.williamson@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/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | 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/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | 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/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | 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/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | 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/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela <quintela@redhat.com>