[PATCH 2/2] qemu: capabilities: fill in domcaps <filesystem>

Michal Prívozník mprivozn at redhat.com
Tue May 18 12:56:15 UTC 2021


On 5/12/21 7:12 PM, Kristina Hanicova wrote:
> Signed-off-by: Kristina Hanicova <khanicov at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c                  | 20 +++++++++++++++++++
>  src/qemu/qemu_capabilities.h                  |  3 +++
>  .../domaincapsdata/qemu_1.5.3-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_1.5.3-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_1.5.3.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_1.6.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_1.6.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_1.6.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_1.7.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_1.7.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_1.7.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.1.1-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.1.1-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.1.1.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.10.0-q35.x86_64.xml |  7 +++++++
>  .../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml |  7 +++++++
>  .../qemu_2.10.0-virt.aarch64.xml              |  7 +++++++
>  tests/domaincapsdata/qemu_2.10.0.aarch64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.10.0.ppc64.xml    |  7 +++++++
>  tests/domaincapsdata/qemu_2.10.0.s390x.xml    |  7 +++++++
>  tests/domaincapsdata/qemu_2.10.0.x86_64.xml   |  7 +++++++
>  .../domaincapsdata/qemu_2.11.0-q35.x86_64.xml |  7 +++++++
>  .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml |  7 +++++++
>  tests/domaincapsdata/qemu_2.11.0.s390x.xml    |  7 +++++++
>  tests/domaincapsdata/qemu_2.11.0.x86_64.xml   |  7 +++++++
>  .../domaincapsdata/qemu_2.12.0-q35.x86_64.xml |  7 +++++++
>  .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml |  7 +++++++
>  .../qemu_2.12.0-virt.aarch64.xml              |  7 +++++++
>  tests/domaincapsdata/qemu_2.12.0.aarch64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.12.0.ppc64.xml    |  7 +++++++
>  tests/domaincapsdata/qemu_2.12.0.s390x.xml    |  7 +++++++
>  tests/domaincapsdata/qemu_2.12.0.x86_64.xml   |  7 +++++++
>  .../domaincapsdata/qemu_2.4.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.4.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.5.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.5.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.6.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml  |  7 +++++++
>  .../qemu_2.6.0-virt.aarch64.xml               |  7 +++++++
>  tests/domaincapsdata/qemu_2.6.0.aarch64.xml   |  7 +++++++
>  tests/domaincapsdata/qemu_2.6.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_2.6.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.7.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.7.0.s390x.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_2.7.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.8.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.8.0.s390x.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_2.8.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_2.9.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_2.9.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_2.9.0.s390x.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_2.9.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_3.0.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_3.0.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_3.0.0.s390x.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_3.0.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_3.1.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_3.1.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_3.1.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_4.0.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml  |  7 +++++++
>  .../qemu_4.0.0-virt.aarch64.xml               |  7 +++++++
>  tests/domaincapsdata/qemu_4.0.0.aarch64.xml   |  7 +++++++
>  tests/domaincapsdata/qemu_4.0.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_4.0.0.s390x.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_4.0.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml  |  7 +++++++
>  .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml  |  7 +++++++
>  tests/domaincapsdata/qemu_4.1.0.x86_64.xml    |  7 +++++++
>  .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |  8 ++++++++
>  .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |  8 ++++++++
>  .../qemu_4.2.0-virt.aarch64.xml               |  8 ++++++++
>  tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |  8 ++++++++
>  tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_4.2.0.s390x.xml     |  8 ++++++++
>  tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |  8 ++++++++
>  .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml  |  8 ++++++++
>  .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml  |  8 ++++++++
>  .../qemu_5.0.0-virt.aarch64.xml               |  8 ++++++++
>  tests/domaincapsdata/qemu_5.0.0.aarch64.xml   |  8 ++++++++
>  tests/domaincapsdata/qemu_5.0.0.ppc64.xml     |  8 ++++++++
>  tests/domaincapsdata/qemu_5.0.0.x86_64.xml    |  8 ++++++++
>  .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml  |  8 ++++++++
>  .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml  |  8 ++++++++
>  tests/domaincapsdata/qemu_5.1.0.sparc.xml     |  7 +++++++
>  tests/domaincapsdata/qemu_5.1.0.x86_64.xml    |  8 ++++++++
>  .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  8 ++++++++
>  .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  8 ++++++++
>  .../qemu_5.2.0-virt.aarch64.xml               |  8 ++++++++
>  tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  8 ++++++++
>  tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  8 ++++++++
>  tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  8 ++++++++
>  tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  8 ++++++++
>  .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  8 ++++++++
>  .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  8 ++++++++
>  tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  8 ++++++++
>  103 files changed, 755 insertions(+)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 43975a39ce..78e59ba10b 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -6173,6 +6173,24 @@ virQEMUCapsFillDomainDeviceRNGCaps(virQEMUCaps *qemuCaps,
>  }
>  
>  
> +void
> +virQEMUCapsFillDomainDeviceFSCaps(virQEMUCaps *qemuCaps,
> +                                  virDomainCapsDeviceFilesystem *filesystem)
> +{
> +    filesystem->supported = VIR_TRISTATE_BOOL_YES;
> +    filesystem->driverType.report = true;
> +
> +    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_FS))
> +        VIR_DOMAIN_CAPS_ENUM_SET(filesystem->driverType,
> +                                 VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS);
> +
> +    VIR_DOMAIN_CAPS_ENUM_SET(filesystem->driverType,
> +                             VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT,
> +                             VIR_DOMAIN_FS_DRIVER_TYPE_PATH,
> +                             VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE);

Sorry for not spotting this earlier, but I just realized that
VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT is not accepted by our XML parser.
It's the default value for new virDomainFSDef-s (because we use
g_new0()), but it's not accepted per-se.

Anyway, let me fix it (and regenerate tests) before pushing.

Michal




More information about the libvir-list mailing list