[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5] qga: add command guest-get-devices for reporting VirtIO d
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v5] qga: add command guest-get-devices for reporting VirtIO devices |
Date: |
Thu, 28 Nov 2019 12:53:56 +0000 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Thu, Nov 28, 2019 at 01:45:13PM +0100, Tomáš Golembiovský wrote:
> Add command for reporting devices on Windows guest. The intent is not so
> much to report the devices but more importantly the driver (and its
> version) that is assigned to the device. This gives caller the
> information whether VirtIO drivers are installed and/or whether
> inadequate driver is used on a device (e.g. QXL device with base VGA
> driver).
>
> Signed-off-by: Tomáš Golembiovský <address@hidden>
> ---
>
> changes in v5:
> - updated version in schema
>
> changes in v4:
> - making check-patch happy
>
> qga/commands-posix.c | 9 ++
> qga/commands-win32.c | 204 ++++++++++++++++++++++++++++++++++++++++++-
> qga/qapi-schema.json | 32 +++++++
> 3 files changed, 244 insertions(+), 1 deletion(-)
> +##
> +# @GuestDeviceInfo:
> +#
> +# @vendor-id: vendor ID
> +# @device-id: device ID
Presumably these are PCI device IDs ? If so, this schema is not
portable to all architectures, because they don't all use PCI
and on s390x PCI there's some extra device IDs.
> +# @driver-name: name of the associated driver
> +# @driver-date: driver release date in format YYYY-MM-DD
> +# @driver-version: driver version
> +#
> +# Since: 4.3
> +##
> +{ 'struct': 'GuestDeviceInfo',
> + 'data': {
> + 'vendor-id': 'uint16',
> + 'device-id': 'uint16',
> + 'driver-name': 'str',
> + 'driver-date': 'str',
Should be optional as not all OS will have dates for
individual drivers
> + 'driver-version': 'str'
Should be optional again.
> + } }
I think this ought to be a structured differently
though. GuestDeviceInfo should just contain the
driver name, date + version, then it should point
to an GuestDeviceAddress which is a union, initially
only holding a "GuestDevicePCI" struct, but which we
can extend to other types of device address later.
> +
> +##
> +# @guest-get-devices:
> +#
> +# Retrieve information about device drivers in Windows guest
> +#
> +# Returns: @GuestDeviceInfo
> +#
> +# Since: 4.3
The next version is 5.0
> +##
> +{ 'command': 'guest-get-devices',
> + 'returns': ['GuestDeviceInfo'] }
> --
> 2.24.0
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|