aboutsummaryrefslogtreecommitdiffstats
path: root/qerror.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-19qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGEPaolo Bonzini1-0/+5
This will be used when reject invalid values for integer fields that are 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>
2011-12-15qom: add new dynamic property infrastructure based on Visitors (v2)Anthony Liguori1-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>
2011-12-14Merge remote-tracking branch 'stefanha/trivial-patches-next' into stagingAnthony Liguori1-1/+1
2011-12-14Fix spelling in comments, documentation and messagesStefan Weil1-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>
2011-12-12guest agent: add RPC blacklist command-line optionMichael Roth1-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>
2011-12-06QError: Introduce QERR_IO_ERRORLuiz Capitulino1-0/+4
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-05Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori1-0/+4
2011-12-05Merge remote-tracking branch 'aneesh/1.0-fixes' into stagingAnthony Liguori1-0/+5
2011-12-05hmp/qmp: add block_set_io_throttleZhi Yong Wu1-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>
2011-12-04hw/9pfs: use migration blockers to prevent live migration when virtfs export ↵Aneesh Kumar K.V1-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>
2011-12-02fix spelling in main directoryDong Xu Wang1-1/+1
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-21qed: add migration blocker (v2)Anthony Liguori1-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>
2011-11-21ivshmem: use migration blockers to prevent live migration in peer mode (v2)Anthony Liguori1-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>
2011-10-27qerror: Add a user string for QERR_FEATURE_DISABLEDLuiz Capitulino1-0/+4
Missing from commit 821601ea5b. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qerror: add qerror_report_err()Anthony Liguori1-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>
2011-09-15Monitor/QMP: Don't allow cont on bad VM stateLuiz Capitulino1-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>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-2/+2
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-23Introduce a 'client_add' monitor command accepting an open FDDaniel P. Berrange1-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>
2011-07-21guest agent: add guest agent RPCs/commandsMichael Roth1-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>
2011-07-21qerror: add QERR_JSON_PARSE_ERROR to qerror.cMichael Roth1-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>
2011-06-08Merge remote-tracking branch 'qmp/for-anthony' into stagingAnthony Liguori1-0/+4
2011-06-07QError: Introduce qerror_format()Luiz Capitulino1-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>
2011-06-07QError: Introduce qerror_format_desc()Luiz Capitulino1-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>
2011-06-01QMP: QError: New QERR_UNSUPPORTEDLai Jiangshan1-0/+4
New QERR_UNSUPPORTED for unsupported commands or requests. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-02-10qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATUREKevin Wolf1-0/+5
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-01-10pci: allow devices being tagged as not hotpluggable.Gerd Hoffmann1-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>
2010-10-03Use GCC_FMT_ATTR (format checking)Stefan Weil1-2/+4
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-30migration: Accept 'cont' only after successful incoming migrationAmit Shah1-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>
2010-07-01QError: Introduce QERR_QMP_EXTRA_MEMBERLuiz Capitulino1-0/+4
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-07-01QError: Enhance QERR_DEVICE_NOT_ACTIVE's user descLuiz Capitulino1-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>
2010-05-19Fix qtypes' licensesLuiz Capitulino1-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>
2010-04-26QError: Improve QERR_QMP_BAD_INPUT_OBJECT descLuiz Capitulino1-1/+1
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-26QError: New QERR_QMP_BAD_INPUT_OBJECT_MEMBERLuiz Capitulino1-0/+4
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_DEVICE_IN_USEMarkus Armbruster1-0/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_INVALID_PARAMETER_VALUEMarkus Armbruster1-0/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_DUPLICATE_IDMarkus Armbruster1-0/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Put error definitions back in alphabetical orderMarkus Armbruster1-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>
2010-03-27error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]Markus Armbruster1-0/+20
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-27error: Trim includes in qerror.cMarkus Armbruster1-2/+0
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-17QError: New QERR_DEVICE_NOT_ENCRYPTEDShahar Havivi1-0/+4
Signed-off-by: Shahar Havivi <shaharh@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-16error: New QERR_NO_BUS_FOR_DEVICEMarkus Armbruster1-0/+4
2010-03-16error: New QERR_DEVICE_INIT_FAILEDMarkus Armbruster1-0/+4
2010-03-16error: New QERR_BUS_NO_HOTPLUGMarkus Armbruster1-0/+4
2010-03-16error: New QERR_BAD_BUS_FOR_DEVICEMarkus Armbruster1-0/+4
2010-03-16error: New QERR_DEVICE_NO_BUSMarkus Armbruster1-0/+4
2010-03-16error: New QERR_DEVICE_MULTIPLE_BUSSESMarkus Armbruster1-0/+4
2010-03-16error: New QERR_BUS_NOT_FOUNDMarkus Armbruster1-0/+4
2010-03-16error: New QERR_PROPERTY_VALUE_NOT_FOUNDMarkus Armbruster1-0/+4
2010-03-16error: New QERR_PROPERTY_VALUE_IN_USEMarkus Armbruster1-0/+4
2010-03-16error: New QERR_PROPERTY_VALUE_BADMarkus Armbruster1-0/+4