Statistics
| Branch: | Revision:

root / qga @ feature-archipelago

# Date Author Comment
cae8a928 03/03/2014 07:46 am Stefan Weil

qga: Remove unneeded include file

This file does not depend on windows.h.

Signed-off-by: Stefan Weil <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Michael Tokarev <>

a749f42d 02/24/2014 02:38 am Miki Mishael

qemu-ga: isa-serial support on Windows

Add support for isa-serial method for qemu-ga on Windows,
Added -p command line parameter for serial port name
specification, e.g. "-p COM15".

Signed-off-by: Miki Mishael <>
Signed-off-by: Dmitry Fleytman <>...

10b7c5dd 02/23/2014 09:13 pm Markus Armbruster

qga: Fix memory allocation pasto

qmp_guest_file_seek() allocates memory for a GuestFileRead object
instead of the GuestFileSeek object it actually uses. Harmless,
because the GuestFileRead is slightly larger.

Signed-off-by: Markus Armbruster <>...

2c958923 02/23/2014 09:11 pm Michal Privoznik

qga: Don't require 'time' argument in guest-set-time command

As the description to the guest-set-time states, the command is
there to ease time synchronization after resume. If guest was
suspended for longer period of time, its system time can go off
so badly, that even NTP refuses to set it. That's why the command...

d9e1f574 02/23/2014 09:11 pm Tomoki Sekiyama

qga: vss-win32: Fix interference with snapshot deletion by other VSS request

When a VSS requester such as vshadow.exe or diskshadow.exe requests to
delete snapshots, qemu-ga VSS provider's DeleteSnapshots() is also called
and returns E_NOTIMPL, that makes the deletion fail....

ff8adbcf 02/23/2014 09:11 pm Tomoki Sekiyama

qga: vss-win32: Fix interference with snapshot creation by other VSS requesters

When a VSS requester such as vshadow.exe or diskshadow.exe requests to
create disk snapshots, Windows may choose qemu-ga VSS provider if it is
only provider registered on the system. However, because it provides only a...

4c1b8f1e 02/23/2014 09:10 pm Tomoki Sekiyama

qga: vss-win32: Use NULL as an invalid pointer for OpenEvent and CreateEvent

OpenEvent and CreateEvent WinAPI return NULL when failed to open/create
events handles, instead of INVALID_HANDLE_VALUE (although their return
types are HANDLE).
This replaces INVALID_HANDLE_VALUE related to event handles with NULL....

84d18f06 02/17/2014 06:57 pm Markus Armbruster

Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out. Unnecessarily hard for
optimizers, static checkers, and human readers. Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives....

16f4e8fa 11/26/2013 06:35 am Stefan Weil

qga: Fix two format strings for MinGW

Both code locations cause a compiler warning. Using "%s" instead of "%lu"
would result in a program crash if the wrong code were executed.

Signed-off-by: Stefan Weil <>
Message-id: ...

d916adaa 11/25/2013 07:41 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/tags/for-anthony' into staging

Here are a bunch of 1.7-tagged patches that I was afraid
were getting forgotten or that did not have a clear maintainer responsible
for making a pull request.

  1. gpg: Signature made Thu 21 Nov 2013 08:40:59 AM PST using RSA key ID 9B4D86F2...
bca4bf10 11/22/2013 11:14 pm Tomoki Sekiyama

qemu-ga: vss-win32: Install VSS provider COM+ application service

Currently, qemu-ga for Windows fails to execute guset-fsfreeze-freeze when
no user is logging in to Windows, with an error message: {"error":{"class":"GenericError",
"desc":"failed to add C:\\ to snapshotset: (error: 8004230f)"}}...

d607a523 11/21/2013 06:39 pm Stefan Weil

qga: Fix compiler warnings (missing format attribute, wrong format strings)

gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra):

CC    qga/commands.o
qga/commands.c: In function ‘slog’:
qga/commands.c:28:5: error:
function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]...
485e741c 11/16/2013 12:04 pm whitearchey

qga: Fix shutdown command of guest agent to work with SysV

For now guest agent uses following command to shutdown system:
shutdown -P +0 "blabla"
but this syntax works only with shutdown command from systemd or upstart,
because SysV shutdown requires -h switch....

ba1c2931 11/13/2013 01:59 pm Stefan Weil

qga: Fix compilation for old versions of MinGW

While MinGW-w64 can compile the qga code, MinGW from Debian lenny
(gcc-mingw32 4.4.2-3) shows these errors:

In file included from qga/vss-win32.c:17:
qga/vss-win32/requester.h:31:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«...

e5d9adbd 10/10/2013 10:52 pm Tomoki Sekiyama

qemu-ga: execute fsfreeze-freeze in reverse order of mounts

Currently, fsfreeze-freeze may cause deadlock if a guest has loopback mounts
of image files in its disk; e.g.:

  1. mount | grep ^/
    /dev/vda1 / type ext4 (rw,noatime,seclabel,data=ordered)...
8dc4d915 10/10/2013 10:52 pm Mark Wu

qemu-ga: Add interface to traverse the qmp command list by QmpCommand

In the original code, qmp_get_command_list is used to construct
a list of all commands' name. To get the information of all qga
commands, it traverses the name list and search the command info...

0106dc4f 10/10/2013 10:52 pm Mark Wu

qemu-ga: Extend 'guest-info' command to expose flag 'success-response'

Now we have several qemu-ga commands not returning response on success.
It has been documented in qga/qapi-schema.json already. This patch exposes
the 'success-response' flag by extending 'guest-info' command. With this...

b39297ae 09/09/2013 10:17 pm Tomoki Sekiyama

qemu-ga: Add Windows VSS provider and requester as DLL

Adds VSS provider and requester as a qga-vss.dll, which is loaded by
Windows VSS service as well as by qemu-ga.

"provider.cpp" implements a basic stub of a software VSS provider.
Currently, this module only relays a frozen event from VSS service to the...

64c00317 09/09/2013 10:17 pm Tomoki Sekiyama

qemu-ga: Call Windows VSS requester in fsfreeze command handler

Support guest-fsfreeze-freeze and guest-fsfreeze-thaw commands for Windows
guests. When fsfreeze command is issued, it calls the VSS requester to
freeze filesystems and applications. On thaw command, it again tells the VSS...

f311f2c2 09/09/2013 10:17 pm Tomoki Sekiyama

qemu-ga: Install Windows VSS provider on `qemu-ga -s install'

Register QGA VSS provider library into Windows when qemu-ga is installed as
Windows service ('-s install' option). It is deregistered when the service
is uninstalled ('-s uninstall' option).

Signed-off-by: Tomoki Sekiyama <>...

febf1c49 07/25/2013 10:49 pm Laszlo Ersek

qga/service-win32.c: diagnostic output should go to stderr

Acked-by: Michael Roth <>
Reviewed-by: Eric Blake <>
Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

108365fd 07/25/2013 10:49 pm Laszlo Ersek

ga_install_service(): nest error paths more idiomatically

Acked-by: Michael Roth <>
Reviewed-by: Eric Blake <>
Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

340d51df 07/25/2013 10:49 pm Laszlo Ersek

qga: escape cmdline args when registering win32 service (CVE-2013-2231)

Reported-by: Lev Veyde <>
Reviewed-by: Eric Blake <>
Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

c394ecb7 05/30/2013 07:37 pm Laszlo Ersek

qga: determine default state dir and pidfile dynamically

No effective change on POSIX, but on Win32 the defaults come from the
environment / session.

Since commit 39097daf ("qemu-ga: use key-value store to avoid recycling fd
handles after restart") we've relied on the state directory for the fd...

bf12c1fa 05/30/2013 07:37 pm Laszlo Ersek

qga: create state directory on win32

On Win32 the local state directory is application specific and users might
expect qemu-ga to create it automatically.

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

a880845f 05/30/2013 07:37 pm Laszlo Ersek

qga: remove undefined behavior in ga_install_service()

We shouldn't snprintf() from a buffer to the same buffer.

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

a839ee77 05/30/2013 07:37 pm Laszlo Ersek

qga: save state directory in ga_install_service()

If the user selects a non-default state directory at service installation
time, we should remember it in the registered service.

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Michael Roth <>

ce4cc316 05/17/2013 06:00 pm Anthony Liguori

Merge remote-tracking branch 'mdroth/qga-pull-2013-05-13' into staging

  • mdroth/qga-pull-2013-05-13:
    qga: unlink just created guest-file if fchmod() or fdopen() fails on it
    qga: distinguish binary modes in "guest_file_open_modes" map

Signed-off-by: Anthony Liguori <>

8fe6bbca 05/13/2013 05:45 pm Laszlo Ersek

qga: distinguish binary modes in "guest_file_open_modes" map

In Windows guests this may make a difference.

Since the original patch (commit c689b4f1) sought to be pedantic and to
consider theoretical corner cases of portability, we should fix it up
where it failed to come through in that pursuit....

2b720018 05/13/2013 05:45 pm Laszlo Ersek

qga: unlink just created guest-file if fchmod() or fdopen() fails on it

We shouldn't allow guest filesystem pollution on error paths.

Suggested-by: Eric Blake <>
Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>...

c7e775e4 05/12/2013 12:25 pm Dong Xu Wang

remove double semicolons

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Michael Tokarev <>

c689b4f1 05/07/2013 02:46 pm Laszlo Ersek

qga: set umask 0077 when daemonizing (CVE-2013-2007)

The qemu guest agent creates a bunch of files with insecure permissions
when started in daemon mode. For example:

rw-rw-rw 1 root root /var/log/qemu-ga.log
rw-rw-rw 1 root root /var/run/qga.state...
3f2a6087 04/02/2013 05:06 pm Lei Li

qga: add windows implementation for guest-get-time

Signed-off-by: Lei Li <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

b8f954fe 04/02/2013 05:06 pm Lei Li

qga: add windows implementation for guest-set-time

Signed-off-by: Lei Li <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

c964c9e0 04/02/2013 05:06 pm Laszlo Ersek

qga schema: mark optional GuestLogicalProcessor.can-offline with #optional

Suggested-by: Eric Blake <>
Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>...

9481ecd7 04/02/2013 05:06 pm Laszlo Ersek

qga schema: document generic QERR_UNSUPPORTED

Part of the wording was shamelessly stolen from Michael Roth's email.

Suggested-by: Michael Roth <>
Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>...

ce7f7cc2 04/02/2013 05:06 pm Luiz Capitulino

qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows

Today we reset fd_counter if it wraps, but it's better to abort()
instead, as fd_counter should never reach INT64_MAX.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>...

085d8134 03/22/2013 02:25 pm Peter Maydell

Fix typos and misspellings

Fix various typos and misspellings. The bulk of these were found with
codespell.

Signed-off-by: Peter Maydell <>
Reviewed-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

4f306496 03/15/2013 03:23 pm Peter Crosthwaite

qga/main.c: Don't use g_key_file_get/set_int64

These functions don't exist until glib version 2.26. QEMU is currently only
mandating glib 2.12.

This patch replaces the functions with g_key_file_get/set_integer.

Unbreaks the build on Ubuntu 10.04 and RHEL 5.6....

cbb65fc2 03/12/2013 01:58 am Laszlo Ersek

qga: implement qmp_guest_set_vcpus() for Linux with sysfs

Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>
Signed-off-by: Michael Roth <>

d2baff62 03/12/2013 01:58 am Laszlo Ersek

qga: implement qmp_guest_get_vcpus() for Linux with sysfs

Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>
Signed-off-by: Michael Roth <>

70e133a7 03/12/2013 01:57 am Laszlo Ersek

qga: introduce guest-get-vcpus / guest-set-vcpus with stubs

Signed-off-by: Laszlo Ersek <>
Reviewed-by: Eric Blake <>
Signed-off-by: Michael Roth <>

39097daf 03/12/2013 01:53 am Michael Roth

qemu-ga: use key-value store to avoid recycling fd handles after restart

Hosts hold on to handles provided by guest-file-open for periods that can
span beyond the life of the qemu-ga process that issued them. Since these
are issued starting from 0 on every restart, we run the risk of issuing...

6912e6a9 03/12/2013 01:53 am Lei Li

qga: add guest-get-time command

Signed-off-by: Lei Li <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>

*added stub for w32

Signed-off-by: Michael Roth <>

a1bca57f 03/12/2013 01:53 am Lei Li

qga: add guest-set-time command

Signed-off-by: Lei Li <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>

*added stub for w32

Signed-off-by: Michael Roth <>

ed2cbf74 03/12/2013 01:53 am Lei Li

qga: cast to int for DWORD type

This patch fixes a compiler warning when cross-build:

qga/service-win32.c: In function 'printf_win_error':
qga/service-win32.c:32:5: warning: format '%d' expects argument of type 'int',
but argument 3 has type 'DWORD' [-Wformat]...

9e7c23db 03/12/2013 01:53 am Stefan Hajnoczi

qemu-ga: fix confusing GAChannelMethod comparison

In commit 7868e26e5930f49ca942311885776b938dcf3b77
("qemu-ga: add initial win32 support") support was added for qemu-ga on
Windows using virtio-serial. Other channel methods (ISA serial and UNIX
domain socket) are not supported on Windows....

c5dcb6ae 03/12/2013 01:53 am Michael Roth

qemu-ga: make guest-sync-delimited available during fsfreeze

We currently maintain a whitelist of commands that are safe during
fsfreeze. During fsfreeze, we disable all commands that aren't part of
that whitelist.

guest-sync-delimited meets the criteria for being whitelisted, and is...

24a53049 01/30/2013 12:14 pm Markus Armbruster

qemu-ga: Fix unchecked strdup() by converting to g_strdup()

I figure it's freed somewhere deep down in QAPI, with g_free().

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Luiz Capitulino <>...

10a2158f 01/28/2013 09:46 pm Markus Armbruster

qemu-ga: Plug leaks on qmp_guest_network_get_interfaces() error paths

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Luiz Capitulino <>
Signed-off-by: Michael Roth <>

6f686749 01/28/2013 09:46 pm Markus Armbruster

qemu-ga: Plug memory leak in guest_fsfreeze_cleanup()

Neglects to free errors allocated by qmp_guest_fsfreeze_thaw().
Spotted by Coverity.

While there, drop the test whether return value is negative (it's
never true), and improve logging.

Signed-off-by: Markus Armbruster <>...

e4ada482 01/19/2013 12:24 pm Stefan Weil

Replace non-portable asprintf by g_strdup_printf

g_strdup_printf already handles OOM errors, so some error handling in
QEMU code can be removed.

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

2fd3402d 01/16/2013 12:50 am Anthony Liguori

Merge remote-tracking branch 'mdroth/qga-pull-1-14-2013-2' into staging

  • mdroth/qga-pull-1-14-2013-2:
    qga: add missing commas in json docs

Signed-off-by: Anthony Liguori <>

01b87f6d 01/15/2013 12:15 am Eric Blake

qga: add missing commas in json docs

  • qga/qapi-schema.json: Use valid JSON.

Signed-off-by: Eric Blake <>
Signed-off-by: Michael Roth <>

7868181f 01/14/2013 08:08 pm Markus Armbruster

qemu-ga: Handle errors uniformely in ga_channel_open()

We detect errors in several places. One reports with g_error(), which
calls abort(), the others report with g_critical(). Three of them
exit(), three return false.

Always report with g_critical(), and return false....

d4f4a3ef 01/14/2013 08:07 pm Markus Armbruster

qemu-ga: Plug fd leak on ga_channel_open() error paths

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>
Reviewed-by: Luiz Capitulino <>...

32c16620 01/14/2013 08:07 pm Markus Armbruster

qemu-ga: Plug fd leak on ga_channel_listen_accept() error path

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>
Reviewed-by: Luiz Capitulino <>...

03ac10f1 01/14/2013 08:07 pm Markus Armbruster

qemu-ga: Plug file descriptor leak on ga_open_pidfile() error path

Spotted by Coverity. Also document why we keep it open on success.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>...

5d27f9ce 01/14/2013 08:07 pm Markus Armbruster

qemu-ga: Drop pointless lseek() from ga_open_pidfile()

After open(), the file offset is already zero, and neither lockf() nor
ftruncate() change it.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>...

f5b79578 01/14/2013 08:00 pm Markus Armbruster

qemu-ga: Document intentional fall through in channel_event_cb()

For clarity, and to hush up Coverity.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Reviewed-by: Michael Roth <>...

9e92f6d4 01/14/2013 08:00 pm Luiz Capitulino

qemu-ga: add ga_open_logfile()

This function sets O_CLOEXEC on the log file fd so that it isn't
leaked to executed processes.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Acked-by: Amos Kong <>...

6ffacc5d 01/14/2013 08:00 pm Luiz Capitulino

qemu-ga: ga_open_pidfile(): use qemu_open()

This ensures that O_CLOEXEC is passed to open(), this way the
pid file fd is not leaked to executed processes.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>...

fedf2de3 01/11/2013 04:43 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    hw/pc.c: Fix converting of ioport_register* to MemoryRegion
    Replace remaining gmtime, localtime by gmtime_r, localtime_r
    savevm: Remove MinGW specific code which is no longer needed...
1d57db19 01/11/2013 10:33 am Peter Maydell

qga/channel-posix.c: Explicitly include string.h

Explicitly include string.h to avoid warnings under MacOS X/clang
about implicit declarations of strerror() and strlen().

Signed-off-by: Peter Maydell <>
Reviewed-by: Stefan Weil <>...

6b26e837 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: bios_supports_mode(): improve error reporting

Most errors are QERR_UNDEFINED_ERROR today.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

7b376087 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: guest_suspend(): improve error reporting

Most errors are QERR_UNDEFINED_ERROR today.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

ec0f694c 01/09/2013 12:38 am Tomoki Sekiyama

qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw

To use the online disk snapshot for online-backup, application-level
consistency of the snapshot image is required. However, currently the
guest agent can provide only filesystem-level consistency, and the...

db3edb66 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_file_*: improve error reporting

Use error_setg_errno() when possible with an improved error description.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Michael Roth <>

d220a6df 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_shutdown(): improve error reporting

Most errors are QERR_UNDEFINED_ERROR. Also, adds ga_wait_child() as
a future commit will use it too.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>...

261551d1 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: build_fs_mount_list(): take an Error argument

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Michael Roth <>

617fbbc1 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_fsfreeze_*(): get rid of sprintf() + error_set()

Convert them to error_setg_errno().

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

071673b0 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_fstrim(): get rid of sprintf() + error_set()

Convert them to error_setg_errno().

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

878a0ae0 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_network_get_interfaces(): get rid of snprintf() + error_set()

Convert them to error_setg_errno().

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

a9de6d01 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: guest_file_handle_find(): take an Error argument

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>

*Fixed missing space character in error message

Signed-off-by: Michael Roth <>

3ac4b7c5 01/09/2013 12:38 am Luiz Capitulino

qemu-ga: qmp_guest_file_close(): fix fclose() error check

fclose() returns EOF on error.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Michael Roth <>
Signed-off-by: Michael Roth <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

2870dc34 12/19/2012 09:31 am Paolo Bonzini

qemu-ga: move qemu-ga files to qga/

Signed-off-by: Paolo Bonzini <>

4d4922c3 12/06/2012 10:17 am Eduardo Habkost

qga/channel-posix.c: Include headers it needs

Include:
- <errno.h> for errno
- <unistd.h> & <fcntl.h> for fcntl()
- <stdlib.h> for exit()
- "osdep.h" for qemu_open()

Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers...

90119816 10/23/2012 02:54 pm Paolo Bonzini

qemu-ga: ask and print error information from qemu-sockets

Reviewed-by: Luiz Capitulino <>
Signed-off-by: Paolo Bonzini <>

7fc4e63e 10/23/2012 02:54 pm Paolo Bonzini

qemu-sockets: add Error ** to all functions

This lets me adjust the clients to do proper error propagation first,
thus avoiding temporary regressions in the quality of the error messages.

Reviewed-by: Luiz Capitulino <>
Signed-off-by: Paolo Bonzini <>

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

1ab516ed 10/05/2012 03:58 pm Jim Meyering

qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name

NUL-termination of the .ifr_name field is not required, but is fine
(and preferable to using strncpy and leaving the reader to wonder),
since the first thing the linux kernel does is to clear the last byte....

54c2e502 07/29/2012 11:41 am Dunrong Huang

build: Fix linking failure for qemu-ga

This patch will fix the following linking failed:

LINK  qemu-ga
gcc: error: qga/../qapi-generated/qga-qapi-types.o: No such file or directory
gcc: error: qga/../qapi-generated/qga-qapi-visit.o: No such file or directory...
cdc976b0 07/28/2012 12:15 pm Paolo Bonzini

build: include qapi-generated/ files in qga/Makefile.objs

No reason to leave them out, and it will ensure that the dependencies
are picked up. Later we can perhaps move the files to another
directory to avoid ../ usage.

Signed-off-by: Paolo Bonzini <>...

eab5fd59 06/22/2012 01:59 am Paolo Bonzini

qemu-ga: add guest-fstrim command

FITRIM is a mounted filesystem feature to discard (or "trim") blocks which
are not in use by the filesystem. This is useful for solid-state drives
(SSDs) and thinly-provisioned storage. Provide access to the feature
from the host so that filesystems can be trimmed periodically or before...

af02203f 06/22/2012 01:59 am Paolo Bonzini

qemu-ga: make names more generic for mount list functions

We will use these functions and types for more than FSFREEZE, so rename them.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Luiz Capitulino <>
Reviewed-by: Michal Privoznik <>...

4eb7ba8a 06/07/2012 10:21 am Paolo Bonzini

build: move qga/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

9e2fa418 05/30/2012 05:00 am Michael Roth

qemu-ga: avoid blocking on atime update when reading /etc/mtab

Currently we re-read/re-process /etc/mtab to get an updated list of
mounts when guest-fsfreeze-thaw is called. This can cause an atime
update on /etc/mtab, which will block if we're in a frozen state....

eecae147 05/30/2012 05:00 am Andreas Färber

qemu-ga: Fix use of environ on Darwin

Use _NSGetEnviron() helper to access the environment.

Signed-off-by: Andreas Färber <>
Cc: Charlie Somerville <>
Signed-off-by: Michael Roth <>

2c02cbf6 05/24/2012 09:06 pm Luiz Capitulino

qemu-ga: Fix missing environ declaration

Commit 3674838cd05268954bb6473239cd7f700a79bf0f uses the environ global
variable, but is relying on environ to be declared somewhere else.

This worked for me because on F16 environ is declared in <unistd.h>, but
that doesn't happen in OpenBSD for example, causing a build failure....

8efacc43 05/15/2012 05:17 pm Michael Roth

qemu-ga: align versioning with QEMU_VERSION

Previously qemu-ga version was defined seperately. Since it is aligned
with QEMU releases, use QEMU_VERSION instead. This also implies the
version bump for 1.1[-rcN] release of qemu-ga.

Reviewed-by: Michal Privoznik <>...

04b4e75f 05/15/2012 05:15 pm Luiz Capitulino

qemu-ga: make reopen_fd_to_null() public

The next commit wants to use it.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Signed-off-by: Michael Roth <>

dc8764f0 05/15/2012 05:15 pm Luiz Capitulino

qemu-ga: guest-suspend: make the API synchronous

Currently, qemu-ga has a SIGCHLD handler that automatically reaps terminated
children processes. The idea is to avoid having qemu-ga commands blocked
waiting for children to terminate.

That approach has two problems:...

d5dd3498 05/15/2012 05:15 pm Luiz Capitulino

qemu-ga: guest-shutdown: become synchronous

Last commit dropped qemu-ga's SIGCHLD handler, used to automatically
reap terminated children processes. This introduced a bug to
qmp_guest_shutdown(): it will generate zombies.

This problem probably doesn't matter in the success case, as the VM...

3674838c 05/15/2012 05:15 pm Luiz Capitulino

qemu-ga: guest-shutdown: use only async-signal-safe functions

POSIX mandates1 that a child process of a multi-thread program uses
only async-signal-safe functions before exec(). We consider qemu-ga
to be multi-thread, because it uses glib.

However, qmp_guest_shutdown() uses functions that are not...

a31f0531 05/14/2012 08:27 am Jim Meyering

fix some common typos

These were identified using: http://github.com/lyda/misspell-check
and run like this to create a bourne shell script using GNU sed's
-i option:

git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \
-pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'...

75e4e847 05/02/2012 02:44 am Anthony Liguori

Merge remote-tracking branch 'mdroth/qga-pull-4-27-12' into staging

  • mdroth/qga-pull-4-27-12:
    qemu-ga: persist tracking of fsfreeze state via filesystem
    qemu-ga: add a whitelist for fsfreeze-safe commands
    qemu-ga: improve recovery options for fsfreeze
e61ab1da 05/01/2012 01:49 pm Andreas Färber

qemu-ga: Implement alternative to O_ASYNC

ga_channel_open() was using open flag O_ASYNC for SIGIO-driven I/O.
This breaks on illumos, so fall back to POSIX I_SETSIG ioctl (SIGPOLL).

Signed-off-by: Lee Essen <>
Signed-off-by: Andreas Färber <>...