Re: [Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-11-06 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: + +#define CRB_INTF_TYPE_CRB_ACTIVE 0b1 +#define CRB_INTF_VERSION_CRB 0b1 +#define CRB_INTF_CAP_LOCALITY_0_ONLY 0b0 +#define CRB_INTF_CAP_IDLE_FAST 0b0 +#define CRB_INTF_CAP_XFER_SIZE_64 0b11 +#define CRB_INTF_CAP_FIFO_NOT_SUPPORTED 0b0 +#define CR

Re: [Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-10-20 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) Interface as defined in TCG PC Client Platform TPM Profile (PTP) Specification Family “2.0” Level 00 Revision 01.03 v22. The PTP allows device implementation to switch between TIS and C

Re: [Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-10-10 Thread Eduardo Habkost
On Tue, Oct 10, 2017 at 02:28:19PM -0400, Stefan Berger wrote: > On 10/09/2017 06:56 PM, Marc-André Lureau wrote: > > + > > +static void tpm_crb_realizefn(DeviceState *dev, Error **errp) > > +{ > > +CRBState *s = CRB(dev); > > +SysBusDevice *sbd = SYS_BUS_DEVICE(dev); > > + > > +if (!tp

Re: [Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: + +static void tpm_crb_realizefn(DeviceState *dev, Error **errp) +{ +CRBState *s = CRB(dev); +SysBusDevice *sbd = SYS_BUS_DEVICE(dev); + +if (!tpm_find()) { +error_setg(errp, "at most one TPM device is permitted"); Shouldn't

[Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-10-09 Thread Marc-André Lureau
tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) Interface as defined in TCG PC Client Platform TPM Profile (PTP) Specification Family “2.0” Level 00 Revision 01.03 v22. The PTP allows device implementation to switch between TIS and CRB model at run time, but given that CRB is a simpl