mbox series

[PULL,0/4] qemu-ga patch queue

Message ID 20200914015902.25769-1-mdroth@linux.vnet.ibm.com
Headers show
Series qemu-ga patch queue | expand

Message

Michael Roth Sept. 14, 2020, 1:58 a.m. UTC
The following changes since commit c47edb8dda0660180f86df4defae2a1f60e345db:

  Merge remote-tracking branch 'remotes/berrange-gitlab/tags/crypt-perf-pull-request' into staging (2020-09-12 21:17:22 +0100)

are available in the Git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2020-09-12-tag

for you to fetch changes up to 2e4211cee49a666bf0e333011689b0981025879e:

  qga: add command guest-get-devices for reporting VirtIO devices (2020-09-12 20:37:48 -0500)

----------------------------------------------------------------
patch queue for qemu-ga

* add guest-get-devices for reporting virtio devices (w32-only)
* extend guest-get-fsinfo to support non-PCI virtio disk controllers

* NOTE: qemu-ga w32 build currently broken, fixed with pending patch:
    "meson: fix MSI rule"
  w32 tested with patch applied.

----------------------------------------------------------------
Thomas Huth (3):
      qga/commands-posix: Rework build_guest_fsinfo_for_real_device() function
      qga/commands-posix: Move the udev code from the pci to the generic function
      qga/commands-posix: Support fsinfo for non-PCI virtio devices, too

Tomáš Golembiovský (1):
      qga: add command guest-get-devices for reporting VirtIO devices

 qga/commands-posix.c | 166 ++++++++++++++++++++++++++++------------
 qga/commands-win32.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 qga/qapi-schema.json |  51 +++++++++++++
 3 files changed, 378 insertions(+), 49 deletions(-)

Comments

Peter Maydell Sept. 14, 2020, 11:12 a.m. UTC | #1
On Mon, 14 Sep 2020 at 02:59, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
>
> The following changes since commit c47edb8dda0660180f86df4defae2a1f60e345db:
>
>   Merge remote-tracking branch 'remotes/berrange-gitlab/tags/crypt-perf-pull-request' into staging (2020-09-12 21:17:22 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2020-09-12-tag
>
> for you to fetch changes up to 2e4211cee49a666bf0e333011689b0981025879e:
>
>   qga: add command guest-get-devices for reporting VirtIO devices (2020-09-12 20:37:48 -0500)
>
> ----------------------------------------------------------------
> patch queue for qemu-ga
>
> * add guest-get-devices for reporting virtio devices (w32-only)
> * extend guest-get-fsinfo to support non-PCI virtio disk controllers
>
> * NOTE: qemu-ga w32 build currently broken, fixed with pending patch:
>     "meson: fix MSI rule"
>   w32 tested with patch applied.


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM
Thomas Huth Sept. 15, 2020, 10:09 a.m. UTC | #2
On 14/09/2020 03.59, Michael Roth wrote:
> From: Tomáš Golembiovský <tgolembi@redhat.com>

> 

> 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>

> ---

>  qga/commands-posix.c |   9 ++

>  qga/commands-win32.c | 210 ++++++++++++++++++++++++++++++++++++++++++-

>  qga/qapi-schema.json |  51 +++++++++++

>  3 files changed, 269 insertions(+), 1 deletion(-)

> 

> diff --git a/qga/commands-posix.c b/qga/commands-posix.c

> index 744c2b5a5d..af5a58a9fd 100644

> --- a/qga/commands-posix.c

> +++ b/qga/commands-posix.c

> @@ -2822,6 +2822,8 @@ GList *ga_command_blacklist_init(GList *blacklist)

>      blacklist = g_list_append(blacklist, g_strdup("guest-fstrim"));

>  #endif

>  

> +    blacklist = g_list_append(blacklist, g_strdup("guest-get-devices"));

> +

>      return blacklist;

>  }

>  

> @@ -3042,3 +3044,10 @@ GuestOSInfo *qmp_guest_get_osinfo(Error **errp)

>  

>      return info;

>  }

> +

> +GuestDeviceInfoList *qmp_guest_get_devices(Error **errp)

> +{

> +    error_setg(errp, QERR_UNSUPPORTED);

> +

> +    return NULL;

> +}

> diff --git a/qga/commands-win32.c b/qga/commands-win32.c

> index 15c9d7944b..48d8bbe649 100644

> --- a/qga/commands-win32.c

> +++ b/qga/commands-win32.c

> @@ -21,10 +21,11 @@

>  #ifdef CONFIG_QGA_NTDDSCSI

>  #include <winioctl.h>

>  #include <ntddscsi.h>

> +#endif

>  #include <setupapi.h>

>  #include <cfgmgr32.h>

>  #include <initguid.h>

> -#endif

> +#include <devpropdef.h>

>  #include <lm.h>

>  #include <wtsapi32.h>

>  #include <wininet.h>

> @@ -39,6 +40,36 @@

>  #include "qemu/base64.h"

>  #include "commands-common.h"

>  

> +/*

> + * The following should be in devpkey.h, but it isn't. The key names were

> + * prefixed to avoid (future) name clashes. Once the definitions get into

> + * mingw the following lines can be removed.

> + */

> +DEFINE_DEVPROPKEY(qga_DEVPKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5,

> +    0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10);

> +    /* DEVPROP_TYPE_STRING */

> +DEFINE_DEVPROPKEY(qga_DEVPKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c,

> +    0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3);

> +    /* DEVPROP_TYPE_STRING_LIST */

> +DEFINE_DEVPROPKEY(qga_DEVPKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d,

> +    0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2);

> +    /* DEVPROP_TYPE_FILETIME */

> +DEFINE_DEVPROPKEY(qga_DEVPKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d,

> +    0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3);

> +    /* DEVPROP_TYPE_STRING */

> +/* The following shoud be in cfgmgr32.h, but it isn't */

> +#ifndef CM_Get_DevNode_Property

> +CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW(

> +    DEVINST          dnDevInst,

> +    CONST DEVPROPKEY * PropertyKey,

> +    DEVPROPTYPE      * PropertyType,

> +    PBYTE            PropertyBuffer,

> +    PULONG           PropertyBufferSize,

> +    ULONG            ulFlags

> +);

> +#define CM_Get_DevNode_Property CM_Get_DevNode_PropertyW

> +#endif


 Hi!

This is causing a build failure with MSYS2:

https://cirrus-ci.com/task/6371116979585024?command=main#L4583

Any ideas how to fix it?

 Thomas