All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@pond.sub.org>
To: Elizabeth Ashurov <eashurov@redhat.com>
Cc: qemu-devel@nongnu.org,  kkostiuk@redhat.com,
	 michael.roth@amd.com, dholler@redhat.com,  armbru@redhat.com,
	 fdeutsch@redhat.com, yvugenfi@redhat.com,  kramdoss@redhat.com
Subject: Re: [PATCH v3 2/2] qga: Add guest-get-driver-services command for Windows
Date: Tue, 17 Nov 2026 07:55:43 +0100	[thread overview]
Message-ID: <878q2slzf4.fsf@pond.sub.org> (raw)
In-Reply-To: <20261116161608.1145725-3-eashurov@redhat.com> (Elizabeth Ashurov's message of "Mon, 16 Nov 2026 18:16:08 +0200")

Elizabeth Ashurov <eashurov@redhat.com> writes:

> Add a new guest-get-driver-services command that returns registered
> driver services from the Service Control Manager
> (EnumServicesStatusExW).  Each entry includes the service name,
> configured binary path, current SCM status, and FileVersion and
> CompanyName metadata extracted from the driver binary.
>
> Normalize driver binary paths from the service database before
> reading version resources, including SystemRoot,
> environment-variable, NT-prefix, and relative path forms.
>
> Unrecognized SCM service states are reported as "unknown" with a
> log message rather than aborting the enumeration, so that future
> Windows versions do not break the command.
>
> Link against version.dll (-lversion) for the GetFileVersionInfo
> and VerQueryValue APIs.
>
> Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>

[...]

> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index 081c99bc74..913fe25924 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -1590,6 +1590,33 @@
>    'returns': ['GuestDeviceInfo'],
>    'if': 'CONFIG_WIN32' }
>  
> +##
> +# @GuestDriverServiceStatus:
> +#
> +# @stopped: the service is stopped
> +#
> +# @start-pending: the service is starting
> +#
> +# @stop-pending: the service is stopping
> +#
> +# @running: the service is running
> +#
> +# @continue-pending: the service is resuming
> +#
> +# @pause-pending: the service is pausing
> +#
> +# @paused: the service is paused
> +#
> +# @unknown: SCM returned a service state not recognized by this
> +#     QGA version
> +#
> +# Since: 11.2

12.0

More of the same below.

> +##
> +{ 'enum': 'GuestDriverServiceStatus',
> +  'data': [ 'stopped', 'start-pending', 'stop-pending', 'running',
> +            'continue-pending', 'pause-pending', 'paused', 'unknown' ],
> +  'if': 'CONFIG_WIN32' }
> +
>  ##
>  # @GuestDriverPackage:
>  #
> @@ -1610,6 +1637,26 @@
>              '*vendor': 'str' },
>    'if': 'CONFIG_WIN32' }
>  
> +##
> +# @GuestDriverService:
> +#
> +# @name: service name
> +#
> +# @driver-path: driver binary path configured in the service database
> +#
> +# @version: four-part FileVersion from the driver binary
> +#
> +# @vendor: CompanyName from the driver binary

Are "FileVersion" and "CompanyName" established technical terms?

Are they necessary here, or could we simply say something like "driver
version" and "driver vendor name"?

> +#
> +# @status: current service status
> +#
> +# Since: 11.2
> +##
> +{ 'struct': 'GuestDriverService',
> +  'data': { 'name': 'str', '*driver-path': 'str', '*version': 'str',
> +            '*vendor': 'str', 'status': 'GuestDriverServiceStatus' },
> +  'if': 'CONFIG_WIN32' }
> +
>  ##
>  # @guest-get-driver-packages:
>  #
> @@ -1621,6 +1668,17 @@
>    'returns': ['GuestDriverPackage'],
>    'if': 'CONFIG_WIN32' }
>  
> +##
> +# @guest-get-driver-services:
> +#
> +# Retrieve registered driver services in the guest.

Please use the revised syntax for introductions:

   ##
   # @guest-get-driver-services:
   #     Retrieve registered driver services in the guest.

> +#
> +# Since: 11.2
> +##
> +{ 'command': 'guest-get-driver-services',
> +  'returns': ['GuestDriverService'],
> +  'if': 'CONFIG_WIN32' }
> +
>  ##
>  # @GuestAuthorizedKeys:
>  #


  reply	other threads:[~2026-11-17  6:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 16:16 [PATCH v3 0/2] qga: Add Windows driver information commands Elizabeth Ashurov
2026-11-16 16:16 ` [PATCH v3 1/2] qga: Add guest-get-driver-packages command for Windows Elizabeth Ashurov
2026-11-17  6:50   ` Markus Armbruster
2026-11-17  7:49     ` Kostiantyn Kostiuk
2026-11-17  9:51       ` Elizabeth Ashurov
2026-11-17 10:12       ` Markus Armbruster
2026-11-16 16:16 ` [PATCH v3 2/2] qga: Add guest-get-driver-services " Elizabeth Ashurov
2026-11-17  6:55   ` Markus Armbruster [this message]
2026-11-17 10:05     ` Elizabeth Ashurov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878q2slzf4.fsf@pond.sub.org \
    --to=armbru@pond.sub.org \
    --cc=armbru@redhat.com \
    --cc=dholler@redhat.com \
    --cc=eashurov@redhat.com \
    --cc=fdeutsch@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kramdoss@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yvugenfi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.