[Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze

Michael Roth posted 24 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181030144358.23144-1-mdroth@linux.vnet.ibm.com
Test docker-clang@ubuntu passed
Test checkpatch failed
Test asan passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
There is a newer version of this series
configure                   |  21 ++-
qga/Makefile.objs           |   1 +
qga/channel-win32.c         |   3 +-
qga/commands-posix.c        | 152 ++++++++++++--------
qga/commands-win32.c        | 337 +++++++++++++++++++++++++++++++++++---------
qga/installer/qemu-ga.wxs   |   2 +-
qga/main.c                  | 258 ++++++++++++++++++++++++++-------
qga/qapi-schema.json        |   5 +-
qga/service-win32.h         |   4 +
qga/vss-win32.c             |   5 +-
qga/vss-win32.h             |   3 +-
qga/vss-win32/requester.cpp |  92 ++++++++----
qga/vss-win32/requester.h   |  13 +-
13 files changed, 686 insertions(+), 210 deletions(-)
[Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by Michael Roth 7 years ago
The following changes since commit 62b658db1df7c6fa574caae038144f24bf6ca495:

  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-10-29 17:03:27 +0000)

are available in the Git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2018-10-30-tag

for you to fetch changes up to 86f167a2326cebec947da6526dae0a356148bd8a:

  qga-win: changing --retry-path option behavior (2018-10-30 09:06:28 -0500)

----------------------------------------------------------------
qemu-ga patch queue for soft-freeze

* support for --retry-path option for recovering from communication
  path failures
* support for serial/device name in guest-get-fsinfo for linux/w32
* support for freezing individual mount points in guest-fsfreeze-*
* fixes for unicode paths on w32, not-present vcpus in guest-get-vcpus,
  buffer overflow in guest-get-fsinfo for w32, and other minor fixes

----------------------------------------------------------------
Bishara AbuHattoum (1):
      qga-win: changing --retry-path option behavior

Chen Hanxiao (1):
      qga-win: add support for qmp_guest_fsfreeze_freeze_list

Igor Mammedov (1):
      qga: ignore non present cpus when handling qmp_guest_get_vcpus()

Jonathon Reinhart (1):
      qga: Support Unicode paths in guest-file-open on win32

Li Qiang (1):
      qga: fix an off-by-one issue

Michael Roth (7):
      qga-win: add debugging information
      qga: group agent init/cleanup init separate routines
      qga: hang GAConfig/socket_activation off of GAState global
      qga: move w32 service handling out of run_agent()
      qga: add --retry-path option for re-initializing channel on failure
      qga-win: install service with --retry-path set by default
      qga-win: report specific error when failing to open channel

Sameeh Jubran (2):
      qga-win: prevent crash when executing fsinfo command
      qga-win: fsinfo: pci-info: allow partial info

Tomáš Golembiovský (10):
      configure: add test for libudev
      qga: linux: report disk serial number
      qga: linux: return disk device in guest-get-fsinfo
      build: rename CONFIG_QGA_NTDDDISK to CONFIG_QGA_NTDDSCSI
      qga-win: refactor disk properties (bus)
      qga-win: report disk serial number
      qga-win: refactor disk info
      qga-win: handle multi-disk volumes
      qga-win: return disk device in guest-get-fsinfo
      qga-win: demystify namespace stripping

 configure                   |  21 ++-
 qga/Makefile.objs           |   1 +
 qga/channel-win32.c         |   3 +-
 qga/commands-posix.c        | 152 ++++++++++++--------
 qga/commands-win32.c        | 337 +++++++++++++++++++++++++++++++++++---------
 qga/installer/qemu-ga.wxs   |   2 +-
 qga/main.c                  | 258 ++++++++++++++++++++++++++-------
 qga/qapi-schema.json        |   5 +-
 qga/service-win32.h         |   4 +
 qga/vss-win32.c             |   5 +-
 qga/vss-win32.h             |   3 +-
 qga/vss-win32/requester.cpp |  92 ++++++++----
 qga/vss-win32/requester.h   |  13 +-
 13 files changed, 686 insertions(+), 210 deletions(-)



Re: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by Peter Maydell 7 years ago
On 30 October 2018 at 14:43, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> The following changes since commit 62b658db1df7c6fa574caae038144f24bf6ca495:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-10-29 17:03:27 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2018-10-30-tag
>
> for you to fetch changes up to 86f167a2326cebec947da6526dae0a356148bd8a:
>
>   qga-win: changing --retry-path option behavior (2018-10-30 09:06:28 -0500)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for soft-freeze
>
> * support for --retry-path option for recovering from communication
>   path failures
> * support for serial/device name in guest-get-fsinfo for linux/w32
> * support for freezing individual mount points in guest-fsfreeze-*
> * fixes for unicode paths on w32, not-present vcpus in guest-get-vcpus,
>   buffer overflow in guest-get-fsinfo for w32, and other minor fixes
>
> ----------------------------------------------------------------

I get a compile failure here for my Ubuntu x86-64 host
static build:

  LINK    qemu-ga
/usr/bin/ld: cannot find -ludev

This is probably because my system has libudev as a dynamic
library but not a static one. Googling suggests that libudev
upstream don't support providing a static library, so we
need to either make configure handle this case or declare
(and enforce?) that --static requires --disable-tools.

It seems to me that a statically linked guest agent might
be useful for some use cases? It would mean you didn't have
to depend on the exact libraries the guest had installed.

(As an aside, it's an ubuntu bug that
"pkg-config --static --libs libudev" doesn't correctly report
that it can't do static linking of this library, but this
is an extremely common bug in library pkg-config files.)

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by Michael Roth 7 years ago
Quoting Peter Maydell (2018-10-30 13:49:18)
> On 30 October 2018 at 14:43, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> > The following changes since commit 62b658db1df7c6fa574caae038144f24bf6ca495:
> >
> >   Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-10-29 17:03:27 +0000)
> >
> > are available in the Git repository at:
> >
> >   git://github.com/mdroth/qemu.git tags/qga-pull-2018-10-30-tag
> >
> > for you to fetch changes up to 86f167a2326cebec947da6526dae0a356148bd8a:
> >
> >   qga-win: changing --retry-path option behavior (2018-10-30 09:06:28 -0500)
> >
> > ----------------------------------------------------------------
> > qemu-ga patch queue for soft-freeze
> >
> > * support for --retry-path option for recovering from communication
> >   path failures
> > * support for serial/device name in guest-get-fsinfo for linux/w32
> > * support for freezing individual mount points in guest-fsfreeze-*
> > * fixes for unicode paths on w32, not-present vcpus in guest-get-vcpus,
> >   buffer overflow in guest-get-fsinfo for w32, and other minor fixes
> >
> > ----------------------------------------------------------------
> 
> I get a compile failure here for my Ubuntu x86-64 host
> static build:
> 
>   LINK    qemu-ga
> /usr/bin/ld: cannot find -ludev
> 
> This is probably because my system has libudev as a dynamic
> library but not a static one. Googling suggests that libudev
> upstream don't support providing a static library, so we
> need to either make configure handle this case or declare
> (and enforce?) that --static requires --disable-tools.
> 
> It seems to me that a statically linked guest agent might
> be useful for some use cases? It would mean you didn't have
> to depend on the exact libraries the guest had installed.

Hi Peter,

Sorry for the breakage. Static is indeed useful for qemu-ga, but libudev
isn't a hard dependency for qemu-ga so we can get away with simply
disabling libudev for static builds. Would the following (squashed into
patch 04/24) be acceptable? This fixes static qemu-ga builds for me for
both Ubuntu 18.04 and FC27. I'll go ahead submit a v2 shortly since it
may be late for you:

--- a/configure
+++ b/configure
@@ -5608,7 +5608,7 @@ fi
 ##########################################
 # Do we have libudev
 if test "$libudev" != "no" ; then
-  if $pkg_config libudev; then
+  if $pkg_config libudev && test "$static" != "yes"; then
     if test "$static" != "yes"; then
       libudev="yes"
       libudev_libs=$($pkg_config --libs libudev)

> 
> (As an aside, it's an ubuntu bug that
> "pkg-config --static --libs libudev" doesn't correctly report
> that it can't do static linking of this library, but this
> is an extremely common bug in library pkg-config files.)
> 
> thanks
> -- PMM
> 


Re: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by Peter Maydell 7 years ago
On 30 October 2018 at 20:57, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> Sorry for the breakage. Static is indeed useful for qemu-ga, but libudev
> isn't a hard dependency for qemu-ga so we can get away with simply
> disabling libudev for static builds. Would the following (squashed into
> patch 04/24) be acceptable? This fixes static qemu-ga builds for me for
> both Ubuntu 18.04 and FC27. I'll go ahead submit a v2 shortly since it
> may be late for you:
>
> --- a/configure
> +++ b/configure
> @@ -5608,7 +5608,7 @@ fi
>  ##########################################
>  # Do we have libudev
>  if test "$libudev" != "no" ; then
> -  if $pkg_config libudev; then
> +  if $pkg_config libudev && test "$static" != "yes"; then
>      if test "$static" != "yes"; then

Now you've ruled out 'static' in the outer if, this
inner if can never be false...

>        libudev="yes"
>        libudev_libs=$($pkg_config --libs libudev)

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by Michael Roth 7 years ago
Quoting Peter Maydell (2018-10-31 08:23:40)
> On 30 October 2018 at 20:57, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> > Sorry for the breakage. Static is indeed useful for qemu-ga, but libudev
> > isn't a hard dependency for qemu-ga so we can get away with simply
> > disabling libudev for static builds. Would the following (squashed into
> > patch 04/24) be acceptable? This fixes static qemu-ga builds for me for
> > both Ubuntu 18.04 and FC27. I'll go ahead submit a v2 shortly since it
> > may be late for you:
> >
> > --- a/configure
> > +++ b/configure
> > @@ -5608,7 +5608,7 @@ fi
> >  ##########################################
> >  # Do we have libudev
> >  if test "$libudev" != "no" ; then
> > -  if $pkg_config libudev; then
> > +  if $pkg_config libudev && test "$static" != "yes"; then
> >      if test "$static" != "yes"; then
> 
> Now you've ruled out 'static' in the outer if, this
> inner if can never be false...

Argh, sorry, I'd meant to remove the inner test when I squashed it in. v3
incoming...

> 
> >        libudev="yes"
> >        libudev_libs=$($pkg_config --libs libudev)
> 
> thanks
> -- PMM
> 

Re: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze
Posted by no-reply@patchew.org 7 years ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20181030144358.23144-1-mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [PULL 00/24] qemu-ga patch queue for soft-freeze

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
8f42ee8aa7 qga-win: changing --retry-path option behavior
9abf73aeb7 qga-win: report specific error when failing to open channel
c05c7e4b5e qga-win: install service with --retry-path set by default
06dbce634a qga: add --retry-path option for re-initializing channel on failure
55aeec1626 qga: move w32 service handling out of run_agent()
423fc8d618 qga: hang GAConfig/socket_activation off of GAState global
b5ec835db3 qga: group agent init/cleanup init separate routines
830dbe1974 qga: fix an off-by-one issue
83412291a9 qga-win: demystify namespace stripping
429d56cb25 qga-win: return disk device in guest-get-fsinfo
fe3c8c5215 qga-win: handle multi-disk volumes
30caf40e15 qga-win: refactor disk info
171348f603 qga-win: report disk serial number
f3ae9514ec qga-win: refactor disk properties (bus)
90c4266768 qga-win: add debugging information
bd20b26d23 build: rename CONFIG_QGA_NTDDDISK to CONFIG_QGA_NTDDSCSI
be323b6d8b qga-win: fsinfo: pci-info: allow partial info
f6fc8e99e0 qga-win: prevent crash when executing fsinfo command
7ed266cc7b qga: linux: return disk device in guest-get-fsinfo
b215b4cc87 qga: linux: report disk serial number
2022b5f4ca configure: add test for libudev
9769d6747f qga: ignore non present cpus when handling qmp_guest_get_vcpus()
154d62ea2b qga-win: add support for qmp_guest_fsfreeze_freeze_list
9f778d9064 qga: Support Unicode paths in guest-file-open on win32

=== OUTPUT BEGIN ===
Checking PATCH 1/24: qga: Support Unicode paths in guest-file-open on win32...
Checking PATCH 2/24: qga-win: add support for qmp_guest_fsfreeze_freeze_list...
Checking PATCH 3/24: qga: ignore non present cpus when handling qmp_guest_get_vcpus()...
Checking PATCH 4/24: configure: add test for libudev...
Checking PATCH 5/24: qga: linux: report disk serial number...
Checking PATCH 6/24: qga: linux: return disk device in guest-get-fsinfo...
Checking PATCH 7/24: qga-win: prevent crash when executing fsinfo command...
Checking PATCH 8/24: qga-win: fsinfo: pci-info: allow partial info...
Checking PATCH 9/24: build: rename CONFIG_QGA_NTDDDISK to CONFIG_QGA_NTDDSCSI...
Checking PATCH 10/24: qga-win: add debugging information...
Checking PATCH 11/24: qga-win: refactor disk properties (bus)...
Checking PATCH 12/24: qga-win: report disk serial number...
WARNING: line over 80 characters
#39: FILE: qga/commands-win32.c:652:
+            error_setg(errp, "failed to get serial number: offset outside the buffer");

total: 0 errors, 1 warnings, 36 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 13/24: qga-win: refactor disk info...
Checking PATCH 14/24: qga-win: handle multi-disk volumes...
ERROR: "foo*bar" should be "foo *bar"
#148: FILE: qga/commands-win32.c:786:
+                + extents->NumberOfDiskExtents*sizeof(DISK_EXTENT);

total: 1 errors, 0 warnings, 185 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 15/24: qga-win: return disk device in guest-get-fsinfo...
Checking PATCH 16/24: qga-win: demystify namespace stripping...
Checking PATCH 17/24: qga: fix an off-by-one issue...
Checking PATCH 18/24: qga: group agent init/cleanup init separate routines...
Checking PATCH 19/24: qga: hang GAConfig/socket_activation off of GAState global...
Checking PATCH 20/24: qga: move w32 service handling out of run_agent()...
Checking PATCH 21/24: qga: add --retry-path option for re-initializing channel on failure...
Checking PATCH 22/24: qga-win: install service with --retry-path set by default...
Checking PATCH 23/24: qga-win: report specific error when failing to open channel...
Checking PATCH 24/24: qga-win: changing --retry-path option behavior...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com