0083124b | 21-Oct-2020 |
Markus Armbruster <armbru@redhat.com> |
qga: Flatten simple union GuestDeviceId
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on t
qga: Flatten simple union GuestDeviceId
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They should be avoided in new code.
GuestDeviceId was recently added for guest-get-devices. Convert it to a flat union.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
show more ...
|
939caddc | 21-Oct-2020 |
Markus Armbruster <armbru@redhat.com> |
qga-win: Fix guest-get-devices error API violations
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kin
qga-win: Fix guest-get-devices error API violations
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call.
qmp_guest_get_devices() is wrong that way: it calls error_setg() in a loop.
If no iteration fails, the function returns a value and sets no error. Okay.
If exactly one iteration fails, the function returns a value and sets an error. Wrong.
If multiple iterations fail, the function trips error_setv()'s assertion.
Fix it to return immediately on error.
Perhaps the failure to convert the driver version to UTF-8 should not be an error. We could simply not report the botched version string instead.
Drop a superfluous continue while there.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
show more ...
|
a88bceef | 21-Oct-2020 |
Markus Armbruster <armbru@redhat.com> |
qga: Use common time encoding for guest-get-devices 'driver-date'
guest-get-devices returns 'driver-date' as string in the format YYYY-MM-DD. Goes back to recent commit 2e4211cee4 "qga: add command
qga: Use common time encoding for guest-get-devices 'driver-date'
guest-get-devices returns 'driver-date' as string in the format YYYY-MM-DD. Goes back to recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting VirtIO devices".
We should avoid use of multiple encodings for the same kind of data. Especially string encodings. Change it to return nanoseconds since the epoch, like guest-get-time does.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
show more ...
|
ac741a9e | 25-Sep-2020 |
Peter Maydell <peter.maydell@linaro.org> |
qga/qapi-schema.json: Add some headings
Add some section headings to the QGA json; this is purely so that we have some H1 headings, as otherwise each command ends up being visible in the interop/ ma
qga/qapi-schema.json: Add some headings
Add some section headings to the QGA json; this is purely so that we have some H1 headings, as otherwise each command ends up being visible in the interop/ manual's table of contents. In an ideal world there might be a proper 'Introduction' section the way there is in qapi/qapi-schema.json.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200925162316.21205-12-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
2e4211ce | 21-Jul-2020 |
Tomáš Golembiovský <tgolembi@redhat.com> |
qga: add command guest-get-devices for reporting VirtIO devices
Add command for reporting devices on Windows guest. The intent is not so much to report the devices but more importantly the driver (a
qga: add command guest-get-devices for reporting VirtIO devices
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).
Example: [ { "driver-date": "2019-08-12", "driver-name": "Red Hat VirtIO SCSI controller", "driver-version": "100.80.104.17300", "address": { "type": "pci", "data": { "device-id": 4162, "vendor-id": 6900 } } }, ... ]
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> *remove redundant glib autoptr declaration for GuestDeviceInfo Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
23843c12 | 22-Jul-2020 |
Thomas Huth <thuth@redhat.com> |
qga/commands-posix: Support fsinfo for non-PCI virtio devices, too
QEMU on s390x uses virtio via channel I/O instead of PCI by default. Add a function to detect and provide information for virtio-sc
qga/commands-posix: Support fsinfo for non-PCI virtio devices, too
QEMU on s390x uses virtio via channel I/O instead of PCI by default. Add a function to detect and provide information for virtio-scsi and virtio-block devices here, too.
Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
43dadc43 | 22-Jul-2020 |
Thomas Huth <thuth@redhat.com> |
qga/commands-posix: Move the udev code from the pci to the generic function
The libudev-related code is independent from the other pci-related code and can be re-used for non-pci devices (like ccw d
qga/commands-posix: Move the udev code from the pci to the generic function
The libudev-related code is independent from the other pci-related code and can be re-used for non-pci devices (like ccw devices on s390x). Thus move this part to the generic function.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1755075 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|
ba620541 | 22-Jul-2020 |
Thomas Huth <thuth@redhat.com> |
qga/qapi-schema: Document -1 for invalid PCI address fields
The "guest-get-fsinfo" could also be used for non-PCI devices in the future. And the code in GuestPCIAddress() in qga/commands-win32.c see
qga/qapi-schema: Document -1 for invalid PCI address fields
The "guest-get-fsinfo" could also be used for non-PCI devices in the future. And the code in GuestPCIAddress() in qga/commands-win32.c seems to be using "-1" for fields that it can not determine already. Thus let's properly document "-1" as value for invalid PCI address fields.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
show more ...
|