Re: [PATCH 9/9] qemu: Drop _virQEMUDriver::hostFips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 01, 2024 at 13:41:43 +0200, Michal Privoznik wrote:
> The 'hostFips' member of _virQEMUDriver struct is not used
> really, due to previous cleanups. Drop it.

I'm glad I've added the note about the only usage of hostFips ;)

> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_conf.h    | 1 -
>  src/qemu/qemu_driver.c  | 9 ---------
>  tests/qemuxmlconftest.c | 2 --
>  3 files changed, 12 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
> index 36049b4bfa..aa1e1a626c 100644
> --- a/src/qemu/qemu_conf.h
> +++ b/src/qemu/qemu_conf.h
> @@ -261,7 +261,6 @@ struct _virQEMUDriver {
>      /* Immutable values */
>      bool privileged;
>      char *embeddedRoot;
> -    bool hostFips; /* FIPS mode is enabled on the host */
>  
>      /* Immutable pointers. Caller must provide locking */
>      virStateInhibitCallback inhibitCallback;
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index fc1704f4fc..cd5ddf2eac 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -732,15 +732,6 @@ qemuStateInitialize(bool privileged,
>      if (qemuMigrationDstErrorInit(qemu_driver) < 0)
>          goto error;
>  
> -    /* qemu-5.1 and older requires use of '-enable-fips' flag when the host
> -     * is in FIPS mode. We store whether FIPS is enabled */
> -    if (virFileExists("/proc/sys/crypto/fips_enabled")) {
> -        g_autofree char *buf = NULL;
> -
> -        if (virFileReadAll("/proc/sys/crypto/fips_enabled", 10, &buf) > 0)
> -            qemu_driver->hostFips = STREQ(buf, "1\n");
> -    }
> -
>      if (privileged) {
>          g_autofree char *channeldir = NULL;
>  
> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
> index e584e0d9e5..73e9a935d9 100644
> --- a/tests/qemuxmlconftest.c
> +++ b/tests/qemuxmlconftest.c
> @@ -389,8 +389,6 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
>      qemuDomainObjPrivate *priv = vm->privateData;
>      size_t i;
>  
> -    drv->hostFips = flags & FLAG_FIPS_HOST;

There's few more no-longer-useful uses of this flag in the test suite
including the flag itself. Mind cleaning those up too?

> -
>      if (qemuProcessCreatePretendCmdPrepare(drv, vm, migrateURI,
>                                             VIR_QEMU_PROCESS_START_COLD) < 0)
>          return NULL;

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux