qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] tpm: CRB: Reset Granted flag when relinquis


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 2/4] tpm: CRB: Reset Granted flag when relinquishing locality
Date: Thu, 29 Mar 2018 12:43:33 +0200

On Wed, Mar 28, 2018 at 10:59 PM, Stefan Berger
<address@hidden> wrote:
> Reset the Granted flag when relinquishing a locality.
>
> Signed-off-by: Stefan Berger <address@hidden>

Makes sense. I tried to avoid looking at locality management so far,
but I guess a minimum is necessary. I suppose no locality will be
granted in this case after relinquish, until a new request. But the
spec says: "If two localities have requested use of the TPMwhen
the current locality relinquishes it, the locality with the highest
priority getsaccess to the TPM." Probably that doesn't make sense with
only loc 0, as you can't request, then relinquish, and expect it to be
granted immediately after.

Reviewed-by: Marc-André Lureau <address@hidden>


> ---
>  hw/tpm/tpm_crb.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
> index e728b55..ee6c87e 100644
> --- a/hw/tpm/tpm_crb.c
> +++ b/hw/tpm/tpm_crb.c
> @@ -145,6 +145,8 @@ static void tpm_crb_mmio_write(void *opaque, hwaddr addr,
>          case CRB_LOC_CTRL_RELINQUISH:
>              ARRAY_FIELD_DP32(s->regs, CRB_LOC_STATE,
>                               locAssigned, 0);
> +            ARRAY_FIELD_DP32(s->regs, CRB_LOC_STS,
> +                             Granted, 0);
>              break;
>          case CRB_LOC_CTRL_REQUEST_ACCESS:
>              ARRAY_FIELD_DP32(s->regs, CRB_LOC_STS,
> --
> 2.5.5
>
>



-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]