[PATCH 6/9] qemu_capabilities: Drop version check for QEMU_CAPS_ENABLE_FIPS and QEMU_CAPS_NETDEV_USER

Michal Privoznik posted 9 patches 2 months, 2 weeks ago
[PATCH 6/9] qemu_capabilities: Drop version check for QEMU_CAPS_ENABLE_FIPS and QEMU_CAPS_NETDEV_USER
Posted by Michal Privoznik 2 months, 2 weeks ago
Now that the minimal required version of QEMU is 5.2.0 the
conditional setting of QEMU_CAPS_ENABLE_FIPS and
QEMU_CAPS_NETDEV_USER is effectively a dead code. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_capabilities.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b2c6815934..7301fa4337 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5398,19 +5398,8 @@ virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps,
  * Add all QEMU capabilities based on version of QEMU.
  */
 static void
-virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps)
+virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
 {
-    /* -enable-fips is deprecated in QEMU 5.2.0, and QEMU
-     * should be built with gcrypt to achieve FIPS compliance
-     * automatically / implicitly
-     */
-    if (qemuCaps->version < 5002000)
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_FIPS);
-
-    /* We are not able to detect this for old QEMU. Assume the capability is
-     * there. */
-    if (qemuCaps->version < 5000000)
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV_USER);
 }
 
 
-- 
2.44.2
Re: [PATCH 6/9] qemu_capabilities: Drop version check for QEMU_CAPS_ENABLE_FIPS and QEMU_CAPS_NETDEV_USER
Posted by Peter Krempa 2 months, 2 weeks ago
On Mon, Jul 01, 2024 at 13:41:40 +0200, Michal Privoznik wrote:
> Now that the minimal required version of QEMU is 5.2.0 the
> conditional setting of QEMU_CAPS_ENABLE_FIPS and
> QEMU_CAPS_NETDEV_USER is effectively a dead code. Drop it.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/qemu/qemu_capabilities.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>