Hi
On Wed, Dec 11, 2024 at 5:30 PM Stefan Berger <stefanb(a)linux.ibm.com> wrote:
On 12/11/24 5:37 AM, marcandre.lureau(a)redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
>
> This reverts commit bb5e26749fe5b5856a3541be2cbe147701e6e121.
>
> swtpm-setup doesn't have "tpmstate-lock", only swtpm.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Reviewed-by: Stefan Berger <stefanb(a)linux.ibm.com>
Can someone queue the series? thanks
> ---
> src/qemu/qemu_tpm.c | 11 ++---------
> src/util/virtpm.c | 1 -
> src/util/virtpm.h | 1 -
> tests/testutilsqemu.c | 1 -
> 4 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
> index f5e0184e54..476e3dd224 100644
> --- a/src/qemu/qemu_tpm.c
> +++ b/src/qemu/qemu_tpm.c
> @@ -344,23 +344,16 @@ static char *
> qemuTPMGetSwtpmSetupStateArg(const virDomainTPMSourceType source_type,
> const char *source_path)
> {
> - const char *lock = ",lock";
> -
> - if (!virTPMSwtpmSetupCapsGet(VIR_TPM_SWTPM_SETUP_FEATURE_TPMSTATE_OPT_LOCK)) {
> - VIR_WARN("This swtpm version doesn't support explicit
locking");
> - lock = "";
> - }
> -
> switch (source_type) {
> case VIR_DOMAIN_TPM_SOURCE_TYPE_FILE:
> /* the file:// prefix is supported since swtpm_setup 0.7.0 */
> /* assume the capability check for swtpm is redundant. */
> - return g_strdup_printf("file://%s%s", source_path, lock);
> + return g_strdup_printf("file://%s", source_path);
> case VIR_DOMAIN_TPM_SOURCE_TYPE_DIR:
> case VIR_DOMAIN_TPM_SOURCE_TYPE_DEFAULT:
> case VIR_DOMAIN_TPM_SOURCE_TYPE_LAST:
> default:
> - return g_strdup_printf("%s%s", source_path, lock);
> + return g_strdup_printf("%s", source_path);
> }
> }
>
> diff --git a/src/util/virtpm.c b/src/util/virtpm.c
> index 4016ad8fc4..f90839debe 100644
> --- a/src/util/virtpm.c
> +++ b/src/util/virtpm.c
> @@ -53,7 +53,6 @@ VIR_ENUM_IMPL(virTPMSwtpmSetupFeature,
> "cmdarg-reconfigure-pcr-banks",
> "tpm-1.2",
> "tpm-2.0",
> - "tpmstate-opt-lock",
> "cmdarg-profile",
> );
>
> diff --git a/src/util/virtpm.h b/src/util/virtpm.h
> index 03fb92629a..4119a903e5 100644
> --- a/src/util/virtpm.h
> +++ b/src/util/virtpm.h
> @@ -45,7 +45,6 @@ typedef enum {
> VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_RECONFIGURE_PCR_BANKS,
> VIR_TPM_SWTPM_SETUP_FEATURE_TPM_1_2,
> VIR_TPM_SWTPM_SETUP_FEATURE_TPM_2_0,
> - VIR_TPM_SWTPM_SETUP_FEATURE_TPMSTATE_OPT_LOCK,
> VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_PROFILE,
>
> VIR_TPM_SWTPM_SETUP_FEATURE_LAST
> diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
> index 5caccbc6b4..abc425b9b7 100644
> --- a/tests/testutilsqemu.c
> +++ b/tests/testutilsqemu.c
> @@ -71,7 +71,6 @@ virTPMSwtpmSetupCapsGet(virTPMSwtpmSetupFeature cap)
> case VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_CREATE_CONFIG_FILES:
> case VIR_TPM_SWTPM_SETUP_FEATURE_TPM12_NOT_NEED_ROOT:
> case VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_RECONFIGURE_PCR_BANKS:
> - case VIR_TPM_SWTPM_SETUP_FEATURE_TPMSTATE_OPT_LOCK:
> case VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_PROFILE:
> case VIR_TPM_SWTPM_SETUP_FEATURE_LAST:
> break;
--
Marc-André Lureau