[Qemu-devel] [PATCH] tpm-tis: set selftest flag on all localities

Marc-André Lureau posted 1 patch 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170223081109.4686-1-marcandre.lureau@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] tpm-tis: set selftest flag on all localities
Posted by Marc-André Lureau 7 years, 2 months ago
Set the flag on all localities, as the original commit
fd859081453f94c3cbd652 intended to.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index a6440fef91..b3c2114bdd 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -398,7 +398,7 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
 
     if (is_selftest_done) {
         for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) {
-            tis->loc[locty].sts |= TPM_TIS_STS_SELFTEST_DONE;
+            tis->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE;
         }
     }
 
-- 
2.12.0.rc2.3.gc93709801


Re: [Qemu-devel] [PATCH] tpm-tis: set selftest flag on all localities
Posted by Philippe Mathieu-Daudé 7 years, 2 months ago
On 02/23/2017 05:11 AM, Marc-André Lureau wrote:
> Set the flag on all localities, as the original commit
> fd859081453f94c3cbd652 intended to.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/tpm/tpm_tis.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
> index a6440fef91..b3c2114bdd 100644
> --- a/hw/tpm/tpm_tis.c
> +++ b/hw/tpm/tpm_tis.c
> @@ -398,7 +398,7 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
>
>      if (is_selftest_done) {
>          for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) {
> -            tis->loc[locty].sts |= TPM_TIS_STS_SELFTEST_DONE;
> +            tis->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE;
>          }
>      }
>
>