summaryrefslogtreecommitdiffstats
path: root/qerror.c
Commit message (Collapse)AuthorAgeFilesLines
* qom: add new dynamic property infrastructure based on Visitors (v2)Anthony Liguori2011-12-151-0/+4
| | | | | | | | | | | 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 properties that are tied to objects, instead of classes. These properties are Visitor based instead of string based too. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/trivial-patches-next' into stagingAnthony Liguori2011-12-141-1/+1
|\
| * Fix spelling in comments, documentation and messagesStefan Weil2011-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accidently->accidentally annother->another choosen->chosen consideres->considers decriptor->descriptor developement->development paramter->parameter preceed->precede preceeding->preceding priviledge->privilege propogation->propagation substraction->subtraction throught->through upto->up to usefull->useful Fix also grammar in posix-aio-compat.c Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | guest agent: add RPC blacklist command-line optionMichael Roth2011-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a command-line option, -b/--blacklist, that accepts a comma-seperated list of RPCs to disable, or prints a list of available RPCs if passed "?". In consequence this also adds general blacklisting and RPC listing facilities to the new QMP dispatch/registry facilities, should the QMP monitor ever have a need for such a thing. Ideally, to avoid support/compatability issues in the future, blacklisting guest agent functionality will be the exceptional case, but we add the functionality here to handle guest administrators with specific requirements. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | QError: Introduce QERR_IO_ERRORLuiz Capitulino2011-12-061-0/+4
|/ | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-12-051-0/+4
|\
| * hmp/qmp: add block_set_io_throttleZhi Yong Wu2011-12-051-0/+4
| | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'aneesh/1.0-fixes' into stagingAnthony Liguori2011-12-051-0/+5
|\ \
| * | hw/9pfs: use migration blockers to prevent live migration when virtfs export ↵Aneesh Kumar K.V2011-12-041-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | path is mounted Now when you try to migrate with VirtFS export path mounted, you get a proper QMP error: (qemu) migrate tcp:localhost:4444 Migration is disabled when VirtFS export path '/tmp/' is mounted in the guest using mount_tag 'v_tmp' (qemu) Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | fix spelling in main directoryDong Xu Wang2011-12-021-1/+1
|/ | | | | Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qed: add migration blocker (v2)Anthony Liguori2011-11-211-0/+4
| | | | | | | | | | Now when you try to migrate with qed, you get: (qemu) migrate tcp:localhost:1025 Block 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)Anthony Liguori2011-11-211-0/+4
| | | | | | | | | | Now when you try to migrate with ivshmem, you get a proper QMP error: (qemu) migrate tcp:localhost:1025 Migration is disabled when using feature 'peer mode' in device 'ivshmem' (qemu) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qerror: Add a user string for QERR_FEATURE_DISABLEDLuiz Capitulino2011-10-271-0/+4
| | | | | | Missing from commit 821601ea5b. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qerror: add qerror_report_err()Anthony Liguori2011-10-041-0/+33
| | | | | | | | | | | This provides a bridge between Error (new error mechanism) and QError (old error mechanism). Errors can be propagated whereas QError cannot. The minor evilness avoids layering violations. Since QError should go away RSN, it seems like a reasonable hack. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Monitor/QMP: Don't allow cont on bad VM stateLuiz Capitulino2011-09-151-0/+4
| | | | | | | | | | | | | | We have two states where issuing cont before system_reset can cause problems: RSTATE_SHUTDOWN (when -no-shutdown is used) and RSTATE_PANICKED (which only happens with kvm). This commit fixes that by doing the following when state is RSTATE_SHUTDOWN or RSTATE_PANICKED: 1. returning an error to the user/client if cont is issued 2. automatically transition to RSTATE_PAUSED during system_reset Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-2/+2
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce a 'client_add' monitor command accepting an open FDDaniel P. Berrange2011-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow client connections for VNC and socket based character devices to be passed in over the monitor using SCM_RIGHTS. One intended usage scenario is to start QEMU with VNC on a UNIX domain socket. An unprivileged user which cannot access the UNIX domain socket, can then connect to QEMU's VNC server by passing an open FD to libvirt, which passes it onto QEMU. { "execute": "get_fd", "arguments": { "fdname": "myclient" } } { "return": {} } { "execute": "add_client", "arguments": { "protocol": "vnc", "fdname": "myclient", "skipauth": true } } { "return": {} } In this case 'protocol' can be 'vnc' or 'spice', or the name of a character device (eg from -chardev id=XXXX) The 'skipauth' parameter can be used to skip any configured VNC authentication scheme, which is useful if the mgmt layer talking to the monitor has already authenticated the client in another way. * console.h: Define 'vnc_display_add_client' method * monitor.c: Implement 'client_add' command * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED * qmp-commands.hx: Declare 'client_add' command * ui/vnc.c: Implement 'vnc_display_add_client' method Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* guest agent: add guest agent RPCs/commandsMichael Roth2011-07-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the initial set of QMP/QAPI commands provided by the guest agent: guest-sync guest-ping guest-info guest-shutdown guest-file-open guest-file-read guest-file-write guest-file-seek guest-file-flush guest-file-close guest-fsfreeze-freeze guest-fsfreeze-thaw guest-fsfreeze-status The input/output specification for these commands are documented in the schema. Example usage: host: qemu -device virtio-serial \ -chardev socket,path=/tmp/vs0.sock,server,nowait,id=qga0 \ -device virtserialport,chardev=qga0,name=org.qemu.quest_agent.0 ... echo "{'execute':'guest-info'}" | socat stdio unix-connect:/tmp/qga0.sock guest: qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \ -p /var/run/qemu-guest-agent.pid -d Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
* qerror: add QERR_JSON_PARSE_ERROR to qerror.cMichael Roth2011-07-211-0/+5
| | | | | | | | Missing from previous addition of error to qerror.h. Needed for qerror_format() and friends. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
* Merge remote-tracking branch 'qmp/for-anthony' into stagingAnthony Liguori2011-06-081-0/+4
|\
| * QMP: QError: New QERR_UNSUPPORTEDLai Jiangshan2011-06-011-0/+4
| | | | | | | | | | | | New QERR_UNSUPPORTED for unsupported commands or requests. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | QError: Introduce qerror_format()Luiz Capitulino2011-06-071-0/+15
| | | | | | | | | | | | | | | | | | Will be used by new error propagation framework to convert Error objects into 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>
* | QError: Introduce qerror_format_desc()Luiz Capitulino2011-06-071-19/+25
|/ | | | | | | | | | Refactor non-QError-specific bits out of qerror_human() into general function that can be used by the error_get_pretty() analogue in the new error-propagation framework. 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>
* qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATUREKevin Wolf2011-02-101-0/+5
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: allow devices being tagged as not hotpluggable.Gerd Hoffmann2011-01-101-0/+4
| | | | | | | | | This patch adds a field to PCIDeviceInfo to tag devices as being not hotpluggable. Any attempt to plug-in or -out such a device will 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)Stefan Weil2010-10-031-2/+4
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* migration: Accept 'cont' only after successful incoming migrationAmit Shah2010-07-301-0/+4
| | | | | | | | | | | | | | | | | When a 'cont' is issued on a VM that's just waiting for an incoming migration, the VM reboots and boots into the guest, possibly corrupting its storage since it could be shared with another VM running elsewhere. Ensure that a VM started with '-incoming' is only run when an incoming migration successfully completes. A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont' failed due to no incoming migration has been attempted yet. Reported-by: Laine Stump <laine@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* QError: Introduce QERR_QMP_EXTRA_MEMBERLuiz Capitulino2010-07-011-0/+4
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QError: Enhance QERR_DEVICE_NOT_ACTIVE's user descLuiz Capitulino2010-07-011-1/+1
| | | | | | | | | | The 'by the guest' part is misleading, it could be disabled by the host too. We will likely need more surgery if we care for the distinction, just dropping the problematic part is good enough for now. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Fix qtypes' licensesLuiz Capitulino2010-05-191-1/+1
| | | | | | | | - Change from GPL to LGPL - Add license text when missing - Minor cosmetic changes to make all headers look the same Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QError: Improve QERR_QMP_BAD_INPUT_OBJECT descLuiz Capitulino2010-04-261-1/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QError: New QERR_QMP_BAD_INPUT_OBJECT_MEMBERLuiz Capitulino2010-04-261-0/+4
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: New QERR_DEVICE_IN_USEMarkus Armbruster2010-04-181-0/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: New QERR_INVALID_PARAMETER_VALUEMarkus Armbruster2010-04-181-0/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: New QERR_DUPLICATE_IDMarkus Armbruster2010-04-181-0/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: Put error definitions back in alphabetical orderMarkus Armbruster2010-04-181-4/+8
| | | | | | | Add suitable comments to help keerp them in order. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]Markus Armbruster2010-03-271-0/+20
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* error: Trim includes in qerror.cMarkus Armbruster2010-03-271-2/+0
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* QError: New QERR_DEVICE_NOT_ENCRYPTEDShahar Havivi2010-03-171-0/+4
| | | | | Signed-off-by: Shahar Havivi <shaharh@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* error: New QERR_NO_BUS_FOR_DEVICEMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_DEVICE_INIT_FAILEDMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_BUS_NO_HOTPLUGMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_BAD_BUS_FOR_DEVICEMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_DEVICE_NO_BUSMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_DEVICE_MULTIPLE_BUSSESMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_BUS_NOT_FOUNDMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_PROPERTY_VALUE_NOT_FOUNDMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_PROPERTY_VALUE_IN_USEMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_PROPERTY_VALUE_BADMarkus Armbruster2010-03-161-0/+4
|
* error: New QERR_PROPERTY_NOT_FOUNDMarkus Armbruster2010-03-161-0/+4
|
OpenPOWER on IntegriCloud