Statistics
| Branch: | Revision:

root / qga @ 1ab516ed

# Date Author Comment
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 <>...

f22d85e9 04/30/2012 04:42 pm Michael Roth

qemu-ga: add a whitelist for fsfreeze-safe commands

Currently we rely on fsfreeze/thaw commands disabling/enabling logging
then having other commands check whether logging is disabled to avoid
executing if they aren't safe for running while a filesystem is frozen....

9e8aded4 04/30/2012 04:41 pm Michael Roth

qemu-ga: improve recovery options for fsfreeze

guest-fsfreeze-thaw relies on state information obtained from
guest-fsfreeze-freeze to determine what filesystems to unfreeze.
This is unreliable due to the fact that that state does not account
for FIFREEZE being issued by other processes, or previous instances...

d35d4cb5 04/19/2012 06:42 pm Michael Roth

qemu-ga: generate missing stubs for fsfreeze

When linux-specific commands (including guest-fsfreeze-*) were consolidated
under defined(linux), we forgot to account for the case where
defined(linux) && !defined(FIFREEZE). As a result stubs are no longer...

e72c3f2e 03/25/2012 10:34 pm Michael Roth

qemu-ga: fix bsd build, and re-org linux-specific implementations

b71706d1 03/19/2012 01:31 pm Jeff Cody

qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()

In the function ga_channel_write(), the handle ov.hEvent is created
by the call to CreateEvent(). However, the handle is not closed
prior to the function return.

This patch closes the handle before the return of the function....

3cf0bed8 03/12/2012 10:09 pm Michael Roth

qemu-ga: add guest-sync-delimited

guest-sync leaves it as an exercise to the user as to how to reliably
obtain the response to guest-sync if the client had previously read in a
partial response (due qemu-ga previously being restarted mid-"sentence"
due to reboot, forced restart, etc)....

11d0f125 03/12/2012 10:09 pm Luiz Capitulino

qemu-ga: add guest-suspend-disk

As the command name implies, this command suspends the guest to disk.

The suspend operation is implemented by two functions: bios_supports_mode()
and guest_suspend(). Both functions are generic enough to be used by
other suspend modes (introduced by next commits)....

fbf42210 03/12/2012 10:09 pm Luiz Capitulino

qemu-ga: add guest-suspend-ram

Signed-off-by: Luiz Capitulino <>

95f4f404 03/12/2012 10:09 pm Luiz Capitulino

qemu-ga: add guest-suspend-hybrid

Signed-off-by: Luiz Capitulino <>

aa59637e 03/12/2012 10:09 pm Gal Hammer

qemu-ga: add win32 guest-suspend-disk command.

Implement guest-suspend-disk RPC for Windows. Functionally this should be
equivalent to the posix implementation.

Signed-off-by: Gal Hammer <>

f54603b6 03/12/2012 10:09 pm Michael Roth

qemu-ga: add win32 guest-suspend-ram command

S3 sleep implementation for windows.

3424fc9f 03/12/2012 10:09 pm Michal Privoznik

qemu-ga: add guest-network-get-interfaces command

This command returns an array of:

[ifname, hwaddr, [ipaddr, ipaddr_family, prefix] ]

for each interface in the system.
Currently, only IPv4 and IPv6 are supported.

Signed-off-by: Michal Privoznik <>

bc62fa03 02/23/2012 11:43 pm Michael Roth

qemu-ga: add Windows service integration

This allows qemu-ga to function as a Windows service:

- to install the service (will auto-start on boot):
qemu-ga --service install
- to start the service:
net start qemu-ga
- to stop the service:
net stop qemu-ga...
546b60d0 02/23/2012 11:43 pm Michael Roth

qemu-ga: add win32 guest-shutdown command

Implement guest-shutdown RPC for Windows. Functionally this should be
equivalent to the posix implementation.

Original patch by Gal Hammer <>

7868e26e 02/23/2012 11:43 pm Michael Roth

qemu-ga: add initial win32 support

This adds a win32 channel implementation that makes qemu-ga functional
on Windows using virtio-serial (unix-listen/isa-serial not currently
implemented). Unlike with the posix implementation, we do not use
GIOChannel for the following reasons:...

125b310e 02/23/2012 11:40 pm Michael Roth

qemu-ga: move channel/transport functionality into wrapper class

This is mostly in preparation for the win32 port, which won't use
GIO channels for reasons that will be made clearer later. Here the
GAChannel class is just a loose wrapper around GIOChannel...

42074a9d 02/23/2012 11:40 pm Michael Roth

qemu-ga: separate out common commands from posix-specific ones

Many of the current RPC implementations are very much POSIX-specific
and require complete re-writes for Windows. There are however a small
set of core guest agent commands that are common to both, and other...

c216e5ad 02/23/2012 11:40 pm Michael Roth

qemu-ga: rename guest-agent-commands.c -> commands-posix.c

d8ca685a 02/23/2012 11:40 pm Michael Roth

qemu-ga: fixes for win32 build of qemu-ga

Various stubs and #ifdefs to compile for Windows using mingw
cross-build. Still has 1 linker error due to a dependency on the
forthcoming win32 versions of the GAChannel/transport class.

bf95c0d5 12/13/2011 01:06 am Michael Roth

guest agent: add supported command list to guest-info RPC

Not that there is blacklisting functionality we can no longer infer
the agent's capabilities via version. This patch extends the current
guest-info RPC to also return a list of dictionaries containing the name...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

4eb36d40 07/24/2011 02:24 am Anthony Liguori

guest-agent: only enable FSFREEZE when it's supported by the kernel

Signed-off-by: Anthony Liguori <>

9af99f1d 07/23/2011 06:19 pm Michael Roth

guest agent: use QERR_UNSUPPORTED for disabled RPCs

Signed-off-by: Anthony Liguori <>

7006b9cf 07/22/2011 11:21 pm Anthony Liguori

guest-agent: fix build with OpenBSD

FS-Freeze only works with Linux.

Signed-off-by: Anthony Liguori <>

13a286d5 07/21/2011 10:48 pm Michael Roth

guest agent: command state class

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

48ff7a62 07/21/2011 10:48 pm Michael Roth

guest agent: qemu-ga daemon

This is the actual guest daemon, it listens for requests over a
virtio-serial/isa-serial/unix socket channel and routes them through
to dispatch routines, and writes the results back to the channel in
a manner similar to QMP.
...

e3d4d252 07/21/2011 10:48 pm Michael Roth

guest agent: add guest agent RPCs/commands

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