Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- hw/tpm/tpm_crb.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index e8c42f6..ef8b80e 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -84,6 +84,12 @@ static uint64_t tpm_crb_mmio_read(void *opaque, hwaddr addr, unsigned offset = addr & 3; uint32_t val = *(uint32_t *)regs >> (8 * offset); + switch (addr) { + case A_CRB_LOC_STATE: + val |= !tpm_backend_get_tpm_established_flag(s->tpmbe); + break; + } + trace_tpm_crb_mmio_read(addr, size, val); return val; -- 2.5.5