From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2og-0001W6-Ml for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:59:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt2oe-00025c-DL for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:59:34 -0500 Received: from mout.perfora.net ([74.208.4.194]:62097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2oe-000257-4y for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:59:32 -0500 From: Michael Roth Date: Thu, 2 Feb 2012 13:58:52 -0600 Message-Id: <1328212740-15799-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 0/8] qemu-ga: add support for Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ghammer@redhat.com, aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com These patches apply on top of qemu.git master, and can also be obtained from: git://github.com/mdroth/qemu.git qga-win32-v2 Luiz/Gal, I decided not to roll the suspend/hibernate stuff into this series since the s3 situation isn't fully sorted out yet. The file structure is a little different now, posix/linux-specific stuff goes in qga/commands-posix.c, win32-specific stuff in qga/commands-win32.c, but other than that it should be a straightforward rebase if this gets merged first. CHANGES SINCE V1: - Dropped guest-set-support-level patch dependency - Rebased on master and re-tested - Spelling/grammar fixes in commits/comments OVERVIEW: These patches add support for Windows to the QEMU guest agent. With these patches the following guest agent commands are supported on Windows: guest-ping guest-info guest-sync guest-shutdown The guest-file* commands can essentially be enabled for Windows as-is, but since mingw does not honor the O_NONBLOCK flag, they'll need to be reworked if we're to retain the current non-blocking behavior. The rest of the commands are currently stubbed out for Windows (qemu-ga will return an "unsupported" error), but it should be easy to implement these going forward with basic Windows support/infrastructure in place. The build was tested using Fedora15 with a MinGW cross-build target via: configure --enable-guest-agent --cross-prefix=i686-pc-mingw32- make qemu-ga.exe The executable was tested using Windows XP SP3, and partially tested using Windows Server 2008 and Windows 7 (no I/O for the latter 2, having issues with virtio-win drivers). GLib 2.28+ for Windows is required. You can install qemu-ga as a load-on-boot service by running: ./qemu-ga --service install And start/stop manually via: net start qemu-ga net stop qemu-ga Many thanks to Gal Hammer for contributing the service integration and shutdown code. Makefile | 2 +- Makefile.objs | 8 +- configure | 2 +- qapi-schema-guest.json | 118 ++++++++-- qemu-ga.c | 413 ++++++++++++++----------------- qga/channel-posix.c | 246 +++++++++++++++++++ qga/channel-win32.c | 337 +++++++++++++++++++++++++ qga/channel.h | 33 +++ qga/commands-posix.c | 528 +++++++++++++++++++++++++++++++++++++++ qga/commands-win32.c | 130 ++++++++++ qga/commands.c | 73 ++++++ qga/guest-agent-commands.c | 585 -------------------------------------------- qga/guest-agent-core.h | 3 +- qga/service-win32.c | 114 +++++++++ qga/service-win32.h | 30 +++ 15 files changed, 1782 insertions(+), 840 deletions(-)