Statistics
| Branch: | Revision:

root / monitor.c @ 2c50e26e

History | View | Annotate | Download (122.9 kB)

# Date Author Comment
22890ab5 09/10/2010 12:22 am Prerna Saxena

trace: Support for dynamically enabling/disabling trace events

This patch adds support for dynamically enabling/disabling of trace events.
This is done by internally maintaining each trace event's state, and
permitting logging of data from a trace event only if it is in an...

c5ceb523 09/10/2010 12:22 am Stefan Hajnoczi

trace: Add trace-file command to open/close/flush trace file

This patch adds the trace-file command:

trace-file [on|off|flush]
Open, close, or flush the trace file.  If no argument is given,
the status of the trace file is displayed.

The trace file is turned on by default but is only written out when the...

0ec0291d 08/23/2010 01:11 am Miguel Di Ciurcio Filho

QMP/monitor: update do_info_version() to output broken down version string

This code was originally developed by Daniel P. Berrange <>

Signed-off-by: Miguel Di Ciurcio Filho <>
Signed-off-by: Luiz Capitulino <>...

f0aa7a8b 08/03/2010 04:57 pm Miguel Di Ciurcio Filho

loadvm: improve tests before bdrv_snapshot_goto()

This patch improves the resilience of the load_vmstate() function, doing
further and better ordered tests.

In load_vmstate(), if there is any error on bdrv_snapshot_goto(), except if the
error is on VM state device, load_vmstate() will return zero and the VM will be...

8e84865e 07/31/2010 12:14 am Amit Shah

migration: Accept 'cont' only after successful incoming migration

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....

02d0ba14 07/06/2010 04:31 pm Anthony Liguori

Merge remote branch 'qmp/for-anthony' into staging

a88790a1 07/03/2010 09:48 am Paolo Bonzini

remove exec-all.h inclusion from cpu.h

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

e4940c60 07/01/2010 08:27 pm Luiz Capitulino

QMP: handle_qmp_command(): Small cleanup

Drop a unneeded label and QDECREF call.

Signed-off-by: Luiz Capitulino <>

a6c4d364 07/01/2010 08:27 pm Jan Kiszka

monitor: Allow to exclude commands from QMP

Ported commands that are marked 'user_only' will not be considered for
QMP monitor sessions. This allows to implement new commands that do not
(yet) provide a sufficiently stable interface for QMP use.

Signed-off-by: Jan Kiszka <>...

5af7bbae 07/01/2010 08:27 pm Luiz Capitulino

QMP: Fix error reporting in the async API

The current asynchronous command API doesn't return a QMP response
when the async command fails.

This is easy to reproduce with the balloon command (the sole async
command we have so far): run qemu w/o the '-balloon virtio' option...

eb159d13 07/01/2010 08:27 pm Luiz Capitulino

Monitor: handle optional '-' arg as a bool

Historically, user monitor arguments beginning with '-' (eg. '-f')
were passed as integers down to handlers.

I've maintained this behavior in the new monitor because we didn't
have a boolean type at the very beginning of QMP. Today we have it...

2dbc8db0 07/01/2010 08:27 pm Luiz Capitulino

QMP: New argument checker (first part)

Current QMP's argument checker is more complex than it should be
and has (at least) one serious bug: it ignores unknown arguments.

To solve both problems we introduce a new argument checker. It's
added on top of the existing one, so that there are no regressions...

4af9193a 07/01/2010 08:27 pm Luiz Capitulino

QMP: New argument checker (second part)

This commit introduces the second (and last) part of QMP's new
argument checker.

The job is done by check_client_args_type(), it iterates over
the client's argument qdict and for for each argument it checks
if it exists and if its type is valid....

f6b4fc8b 07/01/2010 08:27 pm Luiz Capitulino

QMP: Drop old client argument checker

Previous two commits added qmp_check_client_args(), which
fully replaces this code and is way better.

It's important to note that the new checker doesn't support
the '/' arg type. As we don't have any of those handlers...

c917c8f3 07/01/2010 08:27 pm Luiz Capitulino

QMP: Introduce qmp_check_input_obj()

This is similar to qmp_check_client_args(), but it checks if
the input object follows the specification (QMP/qmp-spec.txt
section 2.3).

As we're limited to three keys, the work here is quite simple:
we iterate over the input object, checking each time if the...

0bbab46d 07/01/2010 08:27 pm Luiz Capitulino

QMP: Drop old input object checking

Previous commit added qmp_check_input_obj(), it does all the
checking we need.

Signed-off-by: Luiz Capitulino <>

03a63484 07/01/2010 07:58 pm Jan Kiszka

monitor: Fix leakage during completion processing

Given too many arguments or an invalid command, we were leaking the
duplicated argument strings.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

3b6dbf27 07/01/2010 07:58 pm Jan Kiszka

monitor: Fix command completion vs. boolean switches

We now have to move forward to the next argument type via next_arg_type.
This patch fixes completion for 'eject' and maybe also other commands.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

8ac470c1 07/01/2010 07:58 pm Jan Kiszka

monitor: Establish cmd flags and convert the async tag

As we want to add more flags to monitor commands, convert the only so
far existing one accordingly.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

49b586a9 06/22/2010 11:15 pm Bernhard M. Wiedemann

Extra scan codes for missing keys

The code comes from
http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02788.html

Without this patch it is not possible to send at least 10 special
characters (\|'"`~:;[]{}) via the monitor sendkey command.

Signed-off-by: Bernhard M. Wiedemann <>...

a4673e27 06/14/2010 06:33 pm Anthony Liguori

Merge remote branch 'kwolf/for-anthony' into staging

Conflicts:
hw/pc.c

ea4e78e5 06/13/2010 03:33 pm Jan Kiszka

monitor/QMP: Drop info hpet / query-hpet

This command was of minimal use before, now it is useless as the hpet
become a qdev device and is thus easily discoverable. We should
definitely not set query-hpet in QMP's stone, and there is also no good
reason to keep it for the interactive monitor....

666daa68 06/04/2010 04:20 pm Markus Armbruster

blockdev: Collect block device code in new blockdev.c

Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

39b59d26 05/19/2010 06:45 pm Luiz Capitulino

Monitor: Return before exiting with 'quit'

This is a new version of the (now reverted) following commit:

0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d

The 'quit' Monitor command (implemented by do_quit()) calls
exit() directly, this is problematic under QMP because QEMU...

a8751701 05/19/2010 06:45 pm Luiz Capitulino

Revert "Monitor: Return before exiting with 'quit'"

This reverts commit 0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d.

Next commits will do the same thing in a better way.

Signed-off-by: Luiz Capitulino <>

5a834bb4 05/09/2010 11:19 pm Blue Swirl

sparc: Fix lazy flag calculation on interrupts, refactor

Recalculate Sparc64 CPU flags on interrupts, otherwise some earlier
flags could be stored to pstate.

Refactor PSR/CCR/CWP handling: concentrate the actual
functions to op_helper.c.

Thanks to Igor Kovalenko for reporting....

cb4e5f8e 05/03/2010 08:39 pm Naphtali Sprei

block: read-only: open cdrom as read-only when using monitor's change command

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: Naphtali Sprei <>...

6ed2c484 05/03/2010 08:39 pm Luiz Capitulino

QMP: Introduce RESUME event

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....

e53f27b9 04/26/2010 10:36 pm Paolo Bonzini

stash away SCM_RIGHTS fd until a getfd command arrives

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: Paolo Bonzini <>...

0e8d2b55 04/26/2010 10:36 pm Luiz Capitulino

Monitor: Return before exiting with 'quit'

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...

04f8c053 04/26/2010 05:17 pm Luiz Capitulino

QMP: Check "arguments" member's type

Otherwise the following input crashes QEMU:

{ "execute": "migrate", "arguments": "tcp:0:4446" }

Signed-off-by: Luiz Capitulino <>

88f7db84 04/26/2010 05:17 pm Luiz Capitulino

QMP: Use QERR_QMP_BAD_INPUT_OBJECT_MEMBER

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: Luiz Capitulino <>

d6e9098e 04/23/2010 05:08 pm Kevin Wolf

Replace calls of old bdrv_open

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...

ee9545da 04/19/2010 12:55 am Markus Armbruster

monitor: Rename argument type 'b' to 'f'

To make 'b' available for boolean argument.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

942cd1f2 04/19/2010 12:55 am Markus Armbruster

monitor: New argument type 'b'

This is a boolean value. Human monitor accepts "on" or "off".
Consistent with option parsing (see parse_option_bool()).

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

f1dc58e0 04/19/2010 12:55 am Luiz Capitulino

Monitor: Convert do_screen_dump() to QObject

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: Luiz Capitulino <>

e17ba87c 04/19/2010 12:46 am Markus Armbruster

error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

07a5d95a 04/18/2010 11:31 pm Ryan Harper

Add qerror message if the 'change' target filename can't be opened

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...

28c28973 04/09/2010 07:55 pm Paolo Bonzini

move balloon handling to balloon.c

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Aurelien Jarno <>

9f59b566 03/27/2010 03:30 pm Markus Armbruster

error: Trim includes after "Move qemu_error & friends..."

Missed in commit 2f792016.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Aurelien Jarno <>

fd04a2ae 03/17/2010 05:41 pm Shahar Havivi

Wrong error message in block_passwd command

Signed-off-by: Shahar Havivi <>
Signed-off-by: Anthony Liguori <>

361127df 03/16/2010 06:45 pm Markus Armbruster

monitor: New argument type 'O'

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...

6620d3ce 03/16/2010 06:01 pm Markus Armbruster

monitor: New monitor_cur_is_qmp()

cde0fc75 03/16/2010 06:01 pm Markus Armbruster

error: Let converted handlers print in human monitor

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...

ab5b027e 03/16/2010 05:58 pm Markus Armbruster

error: Rename qemu_error_new() to qerror_report()

03cd4655 03/16/2010 05:55 pm Markus Armbruster

savevm: Fix -loadvm to report errors to stderr, not the monitor

A monitor may not even exist.

Change load_vmstate() to use qemu_error() instead of monitor_printf().
Parameter mon is now unused, remove it.

8631b608 03/16/2010 05:55 pm Markus Armbruster

monitor: Separate "default monitor" and "current monitor" cleanly

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...

d6f46833 03/16/2010 05:55 pm Markus Armbruster

monitor: Factor monitor_set_error() out of qemu_error_internal()

This separates the monitor part from the QError part.

b4a51f7f 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error() & friends from monitor.c to own file

They're about reporting errors, not about the monitor.

6e4f984c 03/16/2010 05:55 pm Markus Armbruster

error: Simplify error sink setup

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....

9eedeb3b 03/09/2010 04:47 pm Luiz Capitulino

QMP: Introduce WATCHDOG event

It's emitted whenever the watchdog device's timer expires. The action
taken is provided in the 'data' member.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

80cd3478 03/08/2010 07:30 pm Luiz Capitulino

QMP: Introduce RTC_CHANGE event

Emitted whenever the RTC time changes.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

51a3bd71 03/08/2010 07:30 pm Luiz Capitulino

QMP: Drop DEBUG event

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....

93d67ee6 03/08/2010 07:29 pm Adam Litke

Fix hanging user monitor when using balloon command

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....

c64484a5 02/23/2010 09:23 pm Gleb Natapov

fix 'i' format handling in memory dump

It was broken by 09b9418c6d0. (!env && = (!is_physical)
when env is true.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

5c366a8a 02/19/2010 11:32 pm Adam Litke

Fix hanging user monitor when using balloon command

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....

b4475aa2 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Debugging support

Add configure options (--enable-debug-mon and --disable-debug-mon)
plus the MON_DEBUG() macro.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

b8b08266 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Drop the print disabling mechanism

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: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

bb89c2e9 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Audit handler return

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....
10e4f606 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Debug stray prints the right way

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...

068b332a 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Report more than one error in handlers

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: Luiz Capitulino <>...

6ad3ebd2 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_getfd() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

aeb91c1e 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_closefd() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

9869622e 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_memory_save() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

fe38a32a 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_physical_memory_save() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

4fdc94b4 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_info() to cmd_new_ret()

Note that this function only fails in QMP, in the user Monitor
it prints the help text instead.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

0bbc47bb 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_change() to cmd_new_ret()

Not that trivial as the call chain also has to be modified.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

261394db 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Rename cmd_new_ret()

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: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

97536cff 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Introduce cmd_new_ret()

In order to implement the new error handling and debugging
mechanism for command handlers, we need to change the cmd_new()
callback to return a value.

This commit introduces cmd_new_ret(), which returns a value and
will be used only temporarily to handle the transition from...

ef4b7eee 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert simple handlers to cmd_new_ret()

The following handlers always succeed and hence can be converted
to cmd_new_ret() in the same commit.

- do_stop()
- do_quit()
- do_system_reset()
- do_system_powerdown()
- do_migrate_cancel()
- do_qmp_capabilities()...

d5a7b38f 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_cont() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

9b9d4d9c 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_eject() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

584cbdb5 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_cpu_set() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

ba85d351 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_block_set_passwd() to cmd_new_ret()

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

ba144141 02/10/2010 09:46 pm Luiz Capitulino

Monitor: remove unneeded checks

It's not needed to check the return of qobject_from_jsonf()
anymore, as an assert() has been added there.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

27a749fb 02/10/2010 09:46 pm Luiz Capitulino

QError: Don't abort on multiple faults

Ideally, Monitor code should report an error only once and
return the error information up the call chain.

To assure that this happens as expected and that no error is
lost, we have an assert() in qemu_error_internal()....

47116d1c 02/10/2010 09:46 pm Luiz Capitulino

QMP: Don't leak on connection close

QMP's chardev event callback doesn't call
json_message_parser_destroy() on CHR_EVENT_CLOSED. As the call
to json_message_parser_init() on CHR_EVENT_OPENED allocates memory,
we'are leaking on close.

Fix that by just calling json_message_parser_destroy() on...

ca9567e2 02/10/2010 08:46 pm Luiz Capitulino

QMP: Add QEMU's version to the greeting message

With capability negotiation support clients will only have a chance
to check QEMU's version (ie. issue 'query-version') after the
negotiation procedure is done.

It might be useful to clients to check QEMU's version before...

4a7e1190 02/10/2010 08:46 pm Luiz Capitulino

QMP: Introduce the qmp_capabilities command

This command will be used to enable QMP capabilities advertised
by the capabilities array.

Note that it will be mandatory to issue this command in order
to make QMP functional (although this behavior is not being...

09069b19 02/10/2010 08:46 pm Luiz Capitulino

QMP: Enforce capability negotiation rules

With this commit QMP will be started in Capabilities Negotiation
mode, where the only command allowed to run is 'qmp_capabilities'.

All other commands will return CommandNotFound error. Asynchronous
messages are not delivered either....

aa1db6ed 02/10/2010 07:57 pm Luiz Capitulino

QMP: BLOCK_IO_ERROR event handling

This commit adds the basic definitions for the BLOCK_IO_ERROR
event, but actual event emission will be introduced by the
next commits.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

cc0c4185 02/03/2010 08:39 pm Markus Armbruster

monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX

This changes the error message from "Invalid CPU index" to "Invalid
parameter index" in the human monitor.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

3350a4dd 02/03/2010 08:36 pm Markus Armbruster

monitor: New argument type 'b'

This is a double value with optional suffixes G, g, M, m, K, k. We'll
need this to get migrate_set_speed() QMP-ready.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

fccfb11e 02/03/2010 08:36 pm Markus Armbruster

monitor: New argument type 'T'

This is a double value with optional suffixes ms, us, ns. We'll need
this to get migrate_set_downtime() QMP-ready.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

9fec543f 02/03/2010 08:36 pm Markus Armbruster

monitor: Document argument type 'M'

Was forgotten in commit b6e098d7.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

82617d7c 01/28/2010 09:09 pm Luiz Capitulino

Monitor: Fix command execution regression

Function is_async_return() added by commit 940cc30d0d4 assumes
that 'data', which is returned by handlers, is always a QDict.

This is not true, as QLists can also be returned, in this case
we'll get a segfault.
...

940cc30d 01/27/2010 01:08 am Adam Litke

New API for asynchronous monitor commands

Qemu has a number of commands that can operate asynchronously (savevm, migrate,
etc) and it will be getting more. For these commands, the user monitor needs
to be suspended, but QMP monitors could continue to to accept other commands....

625a5bef 01/27/2010 01:08 am Adam Litke

virtio: Add memory statistics reporting to the balloon driver

When using ballooning to manage overcommitted memory on a host, a system for
guests to communicate their memory usage to the host can provide information
that will minimize the impact of ballooning on the guests. The current method...

163c8a59 01/26/2010 11:42 pm Luiz Capitulino

PCI: Convert pci_info() to QObject

The returned QObject is a QList of all buses. Each bus is
represented by a QDict, which has a key with a QList of all
PCI devices attached to it. Each device is represented by
a QDict.

As has happended to other complex conversions, it's hard to...

27e3ddd3 01/26/2010 10:59 pm Kirill A. Shutemov

monitor.c: fix warnings with _FORTIFY_SOURCE

CC i386-softmmu/monitor.o
cc1: warnings being treated as errors
/usr/src/RPM/BUILD/qemu-0.11.92/monitor.c: In function 'do_memory_save':
/usr/src/RPM/BUILD/qemu-0.11.92/monitor.c:1318: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result...

95fada8c 01/26/2010 10:55 pm Markus Armbruster

monitor: convert do_physical_memory_save() to QError

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

81a1b45a 01/26/2010 10:55 pm Markus Armbruster

monitor: convert do_cpu_set() to QObject, QError

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

09b9418c 01/26/2010 10:55 pm Markus Armbruster

monitor: Don't check for mon_get_cpu() failure

mon_get_cpu() can't return null pointer, because it passes its return
value to cpu_synchronize_state() first, which crashes if its argument
is null.

Remove the (pretty cheesy) handling of this non-existing error....

c34ed28b 01/26/2010 10:55 pm Markus Armbruster

monitor: convert do_memory_save() to QError

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

23fabed1 01/20/2010 04:25 pm Luiz Capitulino

QMP: Fix asynchronous events delivery

Commit f039a563f200beee80cc10fd70b21ea396979dab introduces
a regression as monitor_protocol_event() will return in
the first user Monitor it finds in the QLIST_FOREACH()
loop.

The right thing to do is to only delivery an asynchronous...

f5edb014 01/20/2010 04:25 pm Naphtali Sprei

Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.

Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...

0d2ed46a 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_INITIALIZED event

It's emitted when a VNC client session is activated by QEMU,
client's information such as port, IP and auth ID (if the
session is authenticated) are provided.

Event example:

{ "event": "VNC_INITIALIZED",
"timestamp": {"seconds": 1263475302, "microseconds": 150772},...

f039a563 01/20/2010 12:31 am Adam Litke

QMP: Emit asynchronous events on all QMP monitors

When using a control/QMP monitor in tandem with a regular monitor, asynchronous
messages can get lost depending on the order of the QEMU program arguments.
QEMU events issued by monitor_protocol_event() always go to cur_mon. If the...

0d72f3d3 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_DISCONNECTED event

It's emitted when a VNC client disconnects from QEMU, client's
information such as port and IP address are provided.

Event example:

{ "event": "VNC_DISCONNECTED",
"timestamp": { "seconds": 1262976601, "microseconds": 975795 },...