From patchwork Thu Feb 25 21:27:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 8426791 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC7539F52D for ; Thu, 25 Feb 2016 21:27:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9B3A2038F for ; Thu, 25 Feb 2016 21:27:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94DB82037C for ; Thu, 25 Feb 2016 21:27:51 +0000 (UTC) Received: from localhost ([::1]:45961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ3Ru-00081g-N2 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Feb 2016 16:27:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ3Rj-0007yz-BF for qemu-devel@nongnu.org; Thu, 25 Feb 2016 16:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZ3Rf-0000w6-Ov for qemu-devel@nongnu.org; Thu, 25 Feb 2016 16:27:39 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:56588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ3Rf-0000vu-FL for qemu-devel@nongnu.org; Thu, 25 Feb 2016 16:27:35 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Feb 2016 14:27:33 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 25 Feb 2016 14:27:32 -0700 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: mdroth@linux.vnet.ibm.com X-IBM-RcptTo: qemu-devel@nongnu.org Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id D34963E4005E for ; Thu, 25 Feb 2016 14:27:31 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u1PLRVmX37617808 for ; Thu, 25 Feb 2016 14:27:31 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u1PLRUgp025896 for ; Thu, 25 Feb 2016 14:27:31 -0700 Received: from localhost ([9.53.92.253]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u1PLRSm7025762; Thu, 25 Feb 2016 14:27:29 -0700 MIME-Version: 1.0 To: Peter Maydell From: Michael Roth In-Reply-To: References: <1456420321-20924-1-git-send-email-mdroth@linux.vnet.ibm.com> Message-ID: <20160225212725.29588.10089@loki> User-Agent: alot/0.3.6 Date: Thu, 25 Feb 2016 15:27:25 -0600 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16022521-0009-0000-0000-000012BCE3FD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.97.110.151 Cc: sw@weilnetz.de, QEMU Developers Subject: Re: [Qemu-devel] [PULL 0/9] qemu-ga patch queue for 2.6 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Quoting Peter Maydell (2016-02-25 12:18:17) > On 25 February 2016 at 17:11, Michael Roth wrote: > > The following changes since commit 774ae4254d3910f1c94ad6ed44d14cbea0e6a2f2: > > > > Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20160225' into staging (2016-02-25 12:57:22 +0000) > > > > are available in the git repository at: > > > > > > git://github.com/mdroth/qemu.git tags/qga-pull-2016-02-25-tag > > > > for you to fetch changes up to e55eb806dbb97f53794b0c2f86983d34f6696845: > > > > qga: fix w32 breakage due to missing osdep.h includes (2016-02-25 10:54:32 -0600) > > > > ---------------------------------------------------------------- > > qemu-ga patch queue for 2.6 > > > > * fix w32 build breakage when VSS enabled > > * fix up wchar handling in guest-set-user-password > > * fix re-install handling for w32 MSI installer > > * add w32 support for guest-get-vcpus > > * add support for enums in guest-file-seek SEEK params > > instead of relying on platform-specific integer values > > This doesn't seem to build on w32 (the old mingw compiler). It works > with the newer w64-mingw32 compiler so I guess this is just a > "disable stuff we can't support with the old headers" thing. > > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c: In > function ‘qmp_guest_get_vcpus’: > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1226: > error: ‘PSYSTEM_LOGICAL_PROCESSOR_INFORMATION’ undeclared (first use > in this function) > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1226: > error: (Each undeclared identifier is reported only once > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1226: > error: for each function it appears in.) > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1226: > error: expected ‘;’ before ‘pslpi’ > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1232: > error: ‘ptr’ undeclared (first use in this function) > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1232: > error: ‘pslpi’ undeclared (first use in this function) > cc1: warnings being treated as errors > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1238: > warning: implicit declaration of function > ‘GetLogicalProcessorInformation’ > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1238: > warning: nested extern declaration of ‘GetLogicalProcessorInformation’ > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1240: > error: ‘SYSTEM_LOGICAL_PROCESSOR_INFORMATION’ undeclared (first use in > this function) > /home/petmay01/linaro/qemu-for-merges/qga/commands-win32.c:1253: > error: ‘RelationProcessorCore’ undeclared (first use in this function) > make: *** [qga/commands-win32.o] Error 1 > make: *** Waiting for unfinished jobs.... > make: Leaving directory `/home/petmay01/linaro/qemu-for-merges/build/w32' > > I'm open to the idea of dropping old-mingw from the build rotation > if it looks like it really is just totally hopeless, since I have > a newer setup for it now. I wouldn't want to speak for dropping old mingw checks in general (cc'ing Stefan), but for qemu-ga I think it makes sense. VSS/fsfreeze also relies on mingw-w64 so it's really the only build system I use for testing functionality. If we do want to keep supporting the old mingw in general, --disable-guest-agent should do the trick, but a probe is probably best to simply not enable qemu-ga automatically in such cases... According to: https://sourceforge.net/p/mingw-w64/wiki2/Answer%20Check%20For%20Mingw-w64/ The below patch should handle this automatically. Should I send a v2 with it included, or would a follow-up be preferable? Author: Michael Roth Date: Thu Feb 25 15:11:04 2016 -0600 configure: add mingw-w64 probe and make it a prereq for qga qemu-ga relies on a number of features now (VSS/fsfreeze, drive info, online/offline processor info) that are only implemented in the mingw-w64 alternative to mingw, and that featureset is expected to increase. Since a number of these features are fairly standard functionality expected of the guest agent, go ahead and make mingw-w64 a hard dependency. On MinGW builds, if qemu-ga isn't explicitly enabled, it will now just silently not build. Otherwise it will complain as needed. Signed-off-by: Michael Roth > > thanks > -- PMM > diff --git a/configure b/configure index 0c0472a..f4f1dc1 100755 --- a/configure +++ b/configure @@ -238,6 +238,7 @@ strip_opt="yes" tcg_interpreter="no" bigendian="no" mingw32="no" +mingw_w64="no" gcov="no" gcov_tool="gcov" EXESUF="" @@ -712,6 +713,18 @@ if test "$mingw32" = "yes" ; then local_statedir= confsuffix="" libs_qga="-lws2_32 -lwinmm -lpowrprof -liphlpapi -lnetapi32 $libs_qga" + cat > $TMPC << EOF +#include <_mingw.h> +#if !defined(__MINGW64_VERSION_MAJOR) +#error +#endif +int main(void) { return 0; } +EOF + # not to be confused with a check for 64-bit, this is testing specifically + # for mingw-w64 compiler, which has a larger featureset than standard mingw + if compile_prog "" "" ; then + mingw_w64=yes + fi fi werror="" @@ -4529,12 +4542,17 @@ fi # Probe for guest agent support/options if [ "$guest_agent" != "no" ]; then - if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then + if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw_w64" = "yes" ] ; then tools="qemu-ga $tools" guest_agent=yes elif [ "$guest_agent" != yes ]; then guest_agent=no else + # if theydoing a mingw check passed but not mingw_w64, inform them of what's missing to avoid + # confusion about actual dependencies + if [ "$mingw32" = "yes" ]; then + error_exit "Guest agent requires mingw-w64 (32 or 64-bit) for win32 builds, but only mingw detected." + fi error_exit "Guest agent is not supported on this platform" fi fi