Skip to content

Commit

Permalink
tpm_tis: fix loop that cancels any seizure by a lower locality
Browse files Browse the repository at this point in the history
In tpm_tis_mmio_write() if the requesting locality is seizing
access, any seizure by a lower locality is cancelled.  However the
loop doing the seizure had an off-by-one error and the locality
immediately preceding the requesting locality was not being cleared.
This is fixed by adjusting the test in the for loop to check the
localities up to the requesting locality.

Signed-off-by: Liam Merwick <Liam.Merwick@oracle.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit 37b55d6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
merwick authored and mdroth committed Apr 2, 2019
1 parent 690bb48 commit 7b8e8ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/tpm/tpm_tis.c
Expand Up @@ -620,7 +620,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
}

/* cancel any seize by a lower locality */
for (l = 0; l < locty - 1; l++) {
for (l = 0; l < locty; l++) {
s->loc[l].access &= ~TPM_TIS_ACCESS_SEIZE;
}

Expand Down

0 comments on commit 7b8e8ff

Please sign in to comment.