- 04 5月, 2010 2 次提交
-
-
由 Naphtali Sprei 提交于
Current code of monitor command: 'change', used to open file for read-write uncoditionally. Change to open it as read-only for CDROM, and read-write for all others. Signed-off-by: NNaphtali Sprei <nsprei@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
It's emitted when the Virtual Machine resumes execution. We currently have the STOP event but don't have the matching RESUME one, this means that clients are notified when the VM is stopped but don't get anything when it resumes. Let's fix that as it's already causing some trouble to libvirt. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 27 4月, 2010 2 次提交
-
-
由 Paolo Bonzini 提交于
If there is already a fd in s->msgfd before recvmsg it is closed by parts that this patch does not touch. So, only one descriptor can be "leaked" by attaching it to a command other than getfd. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
The 'quit' Monitor command (implemented by do_quit()) calls exit() directly, this is problematic under QMP because QEMU exits before having a chance to send the ok response. Clients don't know if QEMU exited because of a problem or because the 'quit' command has been executed. This commit fixes that by moving the exit() call to the main loop, so that do_quit() requests the system to quit, instead of calling exit() directly. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 26 4月, 2010 2 次提交
-
-
由 Luiz Capitulino 提交于
Otherwise the following input crashes QEMU: { "execute": "migrate", "arguments": "tcp:0:4446" } Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
The QERR_QMP_BAD_INPUT_OBJECT error is going to be used only for two problems: the input is not an object or the "execute" key is missing. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 23 4月, 2010 1 次提交
-
-
由 Kevin Wolf 提交于
What is known today as bdrv_open2 becomes the new bdrv_open. All remaining callers of the old function are converted to the new one. In some places they even know the right format, so they should have used bdrv_open2 from the beginning. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 19 4月, 2010 5 次提交
-
-
由 Luiz Capitulino 提交于
Trivial, as it never fails, doesn't have output nor return any data. Note that it's also available under QMP, as kvm-autotest needs this. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Markus Armbruster 提交于
This is a boolean value. Human monitor accepts "on" or "off". Consistent with option parsing (see parse_option_bool()). Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Markus Armbruster 提交于
To make 'b' available for boolean argument. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Ryan Harper 提交于
Currently when using the change command to switch the file in the cd drive the command doesn't complain if the file doesn't exit or can't be opened and the drive keeps the existing image. This patch adds a qerror_report call to print a message out indicating the failure. This error message can be used to catch failures. Current behavior: QEMU 0.12.50 monitor - type 'help' for more information (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 /home/rharper/work/isos/Fedora-9-i386-DVD.iso (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 file=/home/rharper/work/isos/Fedora-9-i386-DVD.iso ro=0 drv=raw encrypted=0 floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 /tmp/non_existent_file.iso (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) With patch: QEMU 0.12.50 monitor - type 'help' for more information (qemu) change ide1-cd0 /tmp/non_existent_file.iso Could not open '/tmp/non_existent_file.iso' (qemu) Signed-off-by: NRyan Harper <ryanh@us.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 10 4月, 2010 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 27 3月, 2010 1 次提交
-
-
由 Markus Armbruster 提交于
Missed in commit 2f792016. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 17 3月, 2010 4 次提交
-
-
由 Shahar Havivi 提交于
Signed-off-by: NShahar Havivi <shaharh@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Markus Armbruster 提交于
In the human monitor, it declares a single optional argument to be parsed according to the QemuOptsList given by its name. In QMP, it declares an optional argument for each member of the QemuOptsList. Restriction: only lists with empty desc are supported for now. Good enough for the job at hand. We'll lift the restriction when we need that.
-
由 Markus Armbruster 提交于
While fully converted handlers are not supposed to print anything when running in a QMP monitor, they are free to print in a human monitor. For instance, device_add (not yet converted) prints help, and will continue to do so after conversion. Moreover, utility functions converted to QError should remain usable from unconverted handlers. Two problems: * handler_audit() complains when a converted handler prints. Limit that to QMP monitors. * With QMP, handlers need to pass the error object by way of monitor_set_error(). However, we do that both for QMP and for the human monitor. The human monitor prints the error object after the handler returns. If the handler prints anything else, that output "overtakes" the error message. Limit use of monitor_set_error() to QMP monitors. Update handler_audit() accordingly.
-
由 Markus Armbruster 提交于
-
- 16 3月, 2010 6 次提交
-
-
由 Markus Armbruster 提交于
-
由 Markus Armbruster 提交于
qemu_error_sink can either point to a monitor or a file. In practice, it always points to the current monitor if we have one, else to stderr. Simply route errors to the current monitor or else to stderr, and remove qemu_error_sink along with the functions to control it. Actually, the old code switches the sink slightly later, in handle_user_command() and handle_qmp_command(), than it gets switched now, implicitly, by setting the current monitor in monitor_read() and monitor_control_read(). Likewise, it switches back slightly earlier (same places). Doesn't make a difference, because there are no calls of qemu_error() in between.
-
由 Markus Armbruster 提交于
They're about reporting errors, not about the monitor.
-
由 Markus Armbruster 提交于
This separates the monitor part from the QError part.
-
由 Markus Armbruster 提交于
Commits 376253ec..731b0364 introduced global variable cur_mon, which points to the "default monitor" (if any), except during execution of monitor_read() or monitor_control_read() it points to the monitor from which we're reading instead (the "current monitor"). Monitor command handlers run within monitor_read() or monitor_control_read(). Default monitor and current monitor are really separate things, and squashing them together is confusing and error-prone. For instance, usb_host_scan() can run both in "info usbhost" and periodically via usb_host_auto_check(). It prints to cur_mon, which is what we want in the former case: the monitor executing "info usbhost". But since that's the default monitor in the latter case, it periodically spams the default monitor there. A few places use cur_mon to log stuff to the default monitor. If we ever log something while cur_mon points to current monitor instead of default monitor, the log temporarily "jumps" to another monitor. Whether that can or cannot happen isn't always obvious. Maybe logging to the default monitor (which may not even exist) is a bad idea, and we should log to stderr or a logfile instead. But that's outside the scope of this commit. Change cur_mon to point to the current monitor. Create new default_mon to point to the default monitor. Update users of cur_mon accordingly. This fixes the periodical spamming of the default monitor by usb_host_scan(). It also stops "log jumping", should that problem exist.
-
由 Markus Armbruster 提交于
A monitor may not even exist. Change load_vmstate() to use qemu_error() instead of monitor_printf(). Parameter mon is now unused, remove it.
-
- 09 3月, 2010 4 次提交
-
-
由 Luiz Capitulino 提交于
It's emitted whenever the watchdog device's timer expires. The action taken is provided in the 'data' member. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Emitted whenever the RTC time changes. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
This event has been introduced in the first round of QMP commits, turns out that it's based on the usage of the EXCP_DEBUG macro, which has discussable semantics when exposed through QMP. As libvirt doesn't use this, let's just drop it. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Adam Litke 提交于
This patch application failed. My patch adds a cb() call in do_balloon(), but the change in git has added the cb() call to do_info_balloon(). That is causing qemu segfaults. Applying the following should correct the damage. Thanks. Fix for commit: 5c366a8a The cb() call is needed in do_balloon(), not do_info_balloon(). Signed-off-by: NAdam Litke <agl@us.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 24 2月, 2010 1 次提交
-
-
由 Gleb Natapov 提交于
It was broken by 09b9418c. (!env && !is_physical) != (!is_physical) when env is true. Signed-off-by: NGleb Natapov <gleb@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 20 2月, 2010 11 次提交
-
-
由 Adam Litke 提交于
Arghh... Adding missing S-O-B Hi Anthony. I wonder if there was a problem when importing my async command handler patchset. Since the 'balloon' command completes immediately, it must call the completion callback before returning. That call was missing but is added by the patch below. Signed-off-by: NAdam Litke <agl@us.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Handlers can generate only one error in a call, we let the programmer know if they brake this rule and clients will only get the first generated error. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
QObject Monitor handlers should not call any Monitor print function: they should only build objects, printing is done by common code. Current QMP code will ignore such calls, as we can't send garbage to clients, additionally it will also emit an undefined error on the assumption that print calls usually report errors. However, the right way to deal with this is to rely on a return code. This has been fixed by other commit already. Now, this commit drops the error from monitor_vprintf() and adds a better debugging mechanism for those 'stray' prints: we count them if debug is enabled and let the developer know if a QObject handler is trying to print anything. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
This commit verifies the following two rules specified by Markus Armbruster: 1. If the handler returns failure, it must have passed an error. If it didn't, it's broken. Report an internal error to the client, and report the bug to the programmer. 2. If the handler returns success, it must not have passed an error. If it did, it's broken. Report the error to the client, and report the bug to the programmer. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
We can ignore calls to monitor_vprintf() in QMP mode and use monitor_puts() directly in monitor_json_emitter(). This allows us to drop this ugly hack. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Add configure options (--enable-debug-mon and --disable-debug-mon) plus the MON_DEBUG() macro. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Now that all handlers are converted to cmd_new_ret(), we can rename it back to cmd_new(). But now it returns a value. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Not that trivial as the call chain also has to be modified. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Note that this function only fails in QMP, in the user Monitor it prints the help text instead. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-