All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/4] tpm: CRB: Reset Granted flag when relinquishing locality
Date: Thu, 29 Mar 2018 12:43:33 +0200	[thread overview]
Message-ID: <CAJ+F1CKK+27LbyvT=AG=W6d6k-X00Y=gT166QtkHtyNd8W=-ZQ@mail.gmail.com> (raw)
In-Reply-To: <1522270761-29646-3-git-send-email-stefanb@linux.vnet.ibm.com>

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

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 <marcandre.lureau@redhat.com>


> ---
>  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	other threads:[~2018-03-29 10:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 20:59 [Qemu-devel] [PATCH 0/4] tpm: More improvements on CRB interface Stefan Berger
2018-03-28 20:59 ` [Qemu-devel] [PATCH 1/4] tpm: CRB: set the Idle flag by default Stefan Berger
2018-03-29 10:44   ` Marc-André Lureau
2018-03-28 20:59 ` [Qemu-devel] [PATCH 2/4] tpm: CRB: Reset Granted flag when relinquishing locality Stefan Berger
2018-03-29 10:43   ` Marc-André Lureau [this message]
2018-03-28 20:59 ` [Qemu-devel] [PATCH 3/4] tpm: CRB: Enforce locality is requested before processing buffer Stefan Berger
2018-03-29 10:45   ` Marc-André Lureau
2018-03-28 20:59 ` [Qemu-devel] [PATCH 4/4] tests: Tests more flags of the CRB interface Stefan Berger
2018-03-29 12:30   ` Marc-André Lureau
2018-03-29 10:21 ` [Qemu-devel] [PATCH 0/4] tpm: More improvements on " no-reply
2018-03-31  8:03 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ+F1CKK+27LbyvT=AG=W6d6k-X00Y=gT166QtkHtyNd8W=-ZQ@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.