History | View | Annotate | Download (8.1 kB)
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable
qmp: handle stop/cont in INMIGRATE state
Right now, stop followed by an incoming migration will let thevirtual machine start. cont before an incoming migration insteadwill fail.
This is bad because the actual behavior is not predictable; it isracy with respect to the start of the incoming migration. That's...
block: add block-job-complete
While streaming can be dropped as soon as it progressed through the wholeimage, mirroring needs to be completed manually for two reasons: 1) so thatmanagement knows exactly when the VM switches to the target; 2) becausefor other use cases such as replication, we may leave the operation running...
vnc: drop QERR_VNC_SERVER_FAILED
We now always return "nice" error messages in errp when we goto fail.Drop the default error message.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: add support for job pause/resume
Job pausing reuses the existing support for cancellable sleeps. A pausehappens at the next sleeping point and lasts until the coroutine isre-entered explicitly. Cancellation was already doing a forced resume,so implement it explicitly in terms of resume....
qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE
The DeviceNotActive text is not a particularly good match, adda separate text while keeping the same class.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
error, qerror: pass desc string to error calls
This commit changes all QERR_ macros to contain a human message (ie.the desc string found in qerr_table[]) instead of a json dictionaryin string format.
Before this commit, error_set() and qerror_report() would receive...
qerror: drop qerror_table and qerror_format()
They are unused since last commit.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
error, qerror: drop QDict member
Used to store error information, but it's unused now.
qerror: add proper ErrorClass value for QERR_ macros
This commit replaces the place holder value for the ErrorClassargument with a proper ErrorClass value for all QERR_ macros.
All current errors are mapped to GenericError, except for errorsCommandNotFound, DeviceEncrypted, DeviceNotActive, DeviceNotFound,...
error, qerror: add ErrorClass argument to error functions
The new argument is added to functions qerror_report() and error_set().It's stored in Error and QError. qerror_report_err() is also updated totake care of it.
The QERR_ macros are changed to contain a place holder value for the...
qerror: qerror_table: don't use C99 struct initializers
This allows for changing QERR_ macros to initialize two struct membersat the same time. See next commit for more details.
qerror: drop QERR_SOCKET_CONNECT_IN_PROGRESS
Unused since last commit.
qerror: don't delay error message construction
Today, the error message is only constructed when it's used. This commitchanges qerror to construct the error message when the error object isbuilt (ie. when the error is reported).
This eliminates the need of storing a pointer to qerror_table[], which...
qerror: qerror_format(): return an allocated string
Simplifies current and future users.
qerror: QError: drop file, linenr, func
They have never been fully used and conflict with future errorimprovements.
Also makes qerror_report() a proper function, as there's no pointin having it as a macro anymore.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
qerror: reduce public exposure
qerror will be dropped in a near future, let's reduce its publicexposure by making functions only used in qerror.c static.
qerror: introduce QERR_INVALID_OPTION_GROUP
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-By: Laszlo Ersek <lersek@redhat.com>
qerror: add five qerror strings
Add five new qerror strings, they are about listen/connect socket: QERR_SOCKET_CONNECT_IN_PROGRESS QERR_SOCKET_CONNECT_FAILED QERR_SOCKET_LISTEN_FAILED QERR_SOCKET_BIND_FAILED QERR_SOCKET_CREATE_FAILED
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
qdev: add blocksize property type
Storage interfaces like virtio-blk can be configured with block sizeinformation so that the guest can take advantage of efficient I/Orequest sizes.
According to the SCSI Block Commands (SBC) standard a device's blocksize is "almost always greater than one byte and may be a multiple of...
QError: Introduce new errors for the migration command
The new errors are QERR_MIGRATION_ACTIVE and QERR_MIGRATION_NOT_SUPPORTED,which are going to be used by the QAPI converted migration command.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qdev: print error message before aborting
qdev_prop_set_* functions are always called by machine init functionsthat should know what they're doing, so they abort on error. Still,an assert(!errp) does not aid debugging. Print an error before aborting....
qom: use object_resolve_path_type for links
This allows to restrict partial matches to objects of the expectedtype. It will let people use bare names to reference driveseven though their name might be the same as a device's (e.g.-drive id=hd0,if=none,... -device ...,drive=hd0,id=hd0)....
add QERR_BASE_NOT_FOUND
This qerror will be raised when a given streaming base (backing file)cannot be found.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contentsinto the image file. Also add the BLOCK_JOB_COMPLETED QMP event whichis emitted when image streaming completes. Later patches add controlover the background copy speed, cancelation, and querying running...
qerror: Extend QERR_DEVICE_ENCRYPTED
Include the name of the encrypted file.
qerror: add check-qerror.sh to verify alphabetical order
We're supposed to keep qerror definitions and table entries inalphabetical order. In practice this is not checked.
I haven't found a nice way to integrate this into the makefile yet butwe can at least have this script which verifies that qerrors are in...
qerror: restore alphabetical order over qerrors
Over time these must have gotten out of order. Put everything back inalphabetical order.
This is purely a clean up. In practice nothing depends on the order.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
block: use proper qerrors in qmp_block_resize
Let's report specific errors so that management tools and users canidentify the problem.
Two new qerrors are needed: * QERR_DEVICE_HAS_NO_MEDIUM for ENOMEDIUM * QERR_DEVICE_IS_READ_ONLY for EACCES
qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGE
This will be used when reject invalid values for integer fields thatare less than 64-bits wide.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: add new dynamic property infrastructure based on Visitors (v2)
qdev properties are settable only during construction and static to classes.This isn't flexible enough for QOM.
This patch introduces a property interface for qdev that provides dynamic...
guest agent: add RPC blacklist command-line option
This adds a command-line option, -b/--blacklist, that accepts acomma-seperated list of RPCs to disable, or prints a list ofavailable RPCs if passed "?".
In consequence this also adds general blacklisting and RPC listing...
QError: Introduce QERR_IO_ERROR
hmp/qmp: add block_set_io_throttle
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted
Now when you try to migrate with VirtFS export path mounted, you get a proper QMP error:
(qemu) migrate tcp:localhost:4444Migration is disabled when VirtFS export path '/tmp/' is mounted in the guest using mount_tag 'v_tmp'...
qed: add migration blocker (v2)
Now when you try to migrate with qed, you get:
(qemu) migrate tcp:localhost:1025Block format 'qed' used by device 'ide0-hd0' does not support feature 'live migration'(qemu)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ivshmem: use migration blockers to prevent live migration in peer mode (v2)
Now when you try to migrate with ivshmem, you get a proper QMP error:
(qemu) migrate tcp:localhost:1025Migration is disabled when using feature 'peer mode' in device 'ivshmem'(qemu)...
qerror: add qerror_report_err()
This provides a bridge between Error (new error mechanism) and QError (old errormechanism). Errors can be propagated whereas QError cannot.
The minor evilness avoids layering violations. Since QError should go away RSN,...
Monitor/QMP: Don't allow cont on bad VM state
We have two states where issuing cont before system_reset cancause problems: RSTATE_SHUTDOWN (when -no-shutdown is used) andRSTATE_PANICKED (which only happens with kvm).
This commit fixes that by doing the following when state is...
Introduce a 'client_add' monitor command accepting an open FD
Allow client connections for VNC and socket based characterdevices to be passed in over the monitor using SCM_RIGHTS.
One intended usage scenario is to start QEMU with VNC on aUNIX domain socket. An unprivileged user which cannot access...
guest agent: add guest agent RPCs/commands
This adds the initial set of QMP/QAPI commands provided by the guestagent:
guest-syncguest-pingguest-infoguest-shutdownguest-file-openguest-file-readguest-file-writeguest-file-seekguest-file-flushguest-file-close...
qapi: add QMP input visitor
A type of Visiter class that is used to walk a qobject'sstructure and assign each entry to the corresponding native C type.Command marshaling function will use this to pull out QMP commandparameters recieved over the wire and pass them as native arguments...
Merge remote-tracking branch 'qmp/for-anthony' into staging
QError: Introduce qerror_format()
Will be used by new error propagation framework to convert Error objectsinto human-readable form.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
json-parser: propagate error from parser
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: QError: New QERR_UNSUPPORTED
New QERR_UNSUPPORTED for unsupported commands or requests.
Make VNC support optional
Per default VNC is enabled.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATURE
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
pci: allow devices being tagged as not hotpluggable.
This patch adds a field to PCIDeviceInfo to tag devices as beingnot hotpluggable. Any attempt to plug-in or -out such a devicewill throw an error.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Use GCC_FMT_ATTR (format checking)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking)
Since version 4.4.x, gcc supports additional format attributes. attribute ((format (gnu_printf, 1, 2)))should be used instead of attribute ((format (printf, 1, 2))...
migration: Accept 'cont' only after successful incoming migration
When a 'cont' is issued on a VM that's just waiting for an incomingmigration, the VM reboots and boots into the guest, possibly corruptingits storage since it could be shared with another VM running elsewhere....
QError: Introduce QERR_QMP_EXTRA_MEMBER
Fix qtypes' licenses
- Change from GPL to LGPL- Add license text when missing- Minor cosmetic changes to make all headers look the same
QError: New QERR_QMP_BAD_INPUT_OBJECT_MEMBER
error: New QERR_DEVICE_IN_USE
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
error: Put error definitions back in alphabetical order
Add suitable comments to help keerp them in order.
error: New QERR_DUPLICATE_ID
error: New QERR_INVALID_PARAMETER_VALUE
error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
QError: New QERR_DEVICE_NOT_ENCRYPTED
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
error: New QERR_BUS_NOT_FOUND
error: New QERR_DEVICE_MULTIPLE_BUSSES
error: New QERR_DEVICE_NO_BUS
error: New QERR_BAD_BUS_FOR_DEVICE
error: New QERR_BUS_NO_HOTPLUG
error: New QERR_DEVICE_INIT_FAILED
error: New QERR_NO_BUS_FOR_DEVICE
error: New QERR_PROPERTY_VALUE_IN_USE
error: New QERR_PROPERTY_VALUE_NOT_FOUND
error: Polish human-readable error descriptions
Also put error definitions in alphabetical order
error: New QERR_PROPERTY_NOT_FOUND
error: New QERR_PROPERTY_VALUE_BAD
error: Infrastructure to track locations for error reporting
New struct Location holds a location. So far, the only location isLOC_NONE, so this doesn't do anything useful yet.
Passing the current location all over the place would be toocumbersome. Hide it away in static cur_loc instead, and provide...
Revert "QError: New QERR_INVALID_CPU_INDEX"
This reverts commit 64a34bb14c0e358a6b2f14805e59ef25bf62d6d5.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QError: New QERR_INVALID_CPU_INDEX
QError: New QERR_OPEN_FILE_FAILED
Fix recently added QERR_ definitions
Commits c7c338c4, 41471a23, 7a046f5f and a488be27 usedlower_case_with_underscores for class values. Existing usageCamelCase. ChangeToThatForConsistency.
QError: New QERR_FD_NOT_SUPPLIED
New QERR_INVALID_PARAMETER
QError: New QERR_TOO_MANY_FILES
QMP: add human-readable description to error response
QError: New QERR_VNC_SERVER_FAILED
QError: New QERR_FD_NOT_FOUND
QError: New QERR_DEVICE_NOT_REMOVABLE
QError: New QERR_INVALID_BLOCK_FORMAT
QError: New QERR_SET_PASSWD_FAILED
QError: Put error definitions in alphabetical order
Also fix the odd typoe and clean up whitespace.
QError: New QERR_DEVICE_LOCKED
QError: new class for device encrypted errors
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QError: Add class for invalid passwords
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QError: Add errors needed by QMP
Only QERR_QMP_BAD_INPUT_OBJECT is QMP specific, the others canbe used in different contexts by other subsystems.
Please, note that QERR_JSON_PARSING signals any parsing errorfrom the json parser. We will need it until the parser gets...
QError: Add QERR_DEVICE_NOT_ACTIVE
New class for device not active errors.
QError: Add QERR_KVM_MISSING_CAP
New class for KVM unavailable features errors.
Introduce QError
QError is a high-level data type which represents an exceptionin QEMU, it stores the following error information:
- class Error class name (eg. "ServiceUnavailable")- description A detailed error description, which can contain...
QError: Add QERR_DEVICE_NOT_FOUND
New class for device not found errors.