- 04 12月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Remove the unused locty parameter from tpm_tis_abort() function. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
-
- 15 11月, 2018 1 次提交
-
-
由 Prasad J Pandit 提交于
When TIS request is done, set 'sts' data field across all localities. Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org> Reviewed-by: NStefan Berger <stefanb@linux.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.ibm.com>
-
- 25 5月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Extend the TPM TIS interface with state migration support. We need to synchronize with the backend thread to make sure that a command being processed by the external TPM emulator has completed and its response been received. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 07 3月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Leave the DEBUG_TIS for more debugging and convert to use if (DEBUG_TIS) rather than #if DEBUG_TIS where it is being used. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 21 2月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Move the TPM TIS related register and flag #defines into include/hw/acpi/tpm.h for access by the test case. Write a test case that covers the TIS functionality. Add the tests cases to the MAINTAINERS file. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 03 2月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 30 1月, 2018 1 次提交
-
-
由 Marc-André Lureau 提交于
Use an Error** for request to let the caller handle error reporting. This will also allow to inform the frontend of a backend error. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 16 1月, 2018 1 次提交
-
-
由 Eric Blake 提交于
The point of writing a macro embedded in a 'do { ... } while (0)' loop (particularly if the macro has multiple statements or would otherwise end with an 'if' statement) is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our coding style frowns on brace-less 'if': if (cond) statement; else something else; that is the classic case where failure to use do/while(0) wrapping would cause the 'else' to pair with any embedded 'if' in the macro rather than the intended outer 'if'. But conversely, if the macro includes an embedded ';', then the same brace-less coding style would now have two statements, making the 'else' a syntax error rather than pairing with the outer 'if'. Thus, even though our coding style with required braces is not impacted, ending a macro with ';' makes our code harder to port to projects that use brace-less styles. The change should have no semantic impact. I was not able to fully compile-test all of the changes (as some of them are examples of the ugly bit-rotting debug print statements that are completely elided by default, and I didn't want to recompile with the necessary -D witnesses - cleaning those up is left as a bite-sized task for another day); I did, however, audit that for all files touched, all callers of the changed macros DID supply a trailing ';' at the callsite, and did not appear to be used as part of a brace-less conditional. Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\ Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NCornelia Huck <cohuck@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171201232433.25193-7-eblake@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 22 12月, 2017 8 次提交
-
-
由 Stefan Berger 提交于
Move the definition of TPMSizedBuffer out of tpm_tis.c into tpm_util.h and implement tpm_sized_buffer_reset() for the following patches to use. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
We can now merge the r_offset and w_offset into a single rw_offset. This is possible since when the offset is used for writing in RECEPTION state then reads are ignore. Conversely, when the offset is used for reading when in COMPLETION state, then writes are ignored. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
Now that we have a single buffer, we also only need a single set of read/write offsets into that buffer. This works since only one locality can be active. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
Since we can only be in read or write mode, we can merge the buffers into a single buffer. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
One read buffer and one write buffer is sufficient for all localities. The localities cannot all be active at the same time, and only the active locality can use the r/w buffers. Inactive localities will require the COMMAND_READY flag to be set on the STS register to move to the READY state, which then enables access to using the buffer for writing of a command, while all other localities are inactive. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
Remove usage of TPMSizeBuffer. The size of the buffers is limited now by s->be_buffer_size, which is the size of the buffer the TIS has negotiated with the backend. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
This is a preparatory patch for the subsequent ones where we get rid of the flexibility of supporting any kind of buffer size that the backend may support. We keep the size at 4096, which is also the size the external emulator supports. So, limit the size of the buffer we can support and pass it back to the backend. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 15 12月, 2017 16 次提交
-
-
由 Stefan Berger 提交于
Convert the tpm_emulator backend to get the current buffer size of the external device and set it to the buffer size that the frontend (TIS) requests. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
Rather than setting the size of the TPM buffer in the front-end, query the backend for the size of the buffer. In this patch we just move the hard-coded buffer size of 4096 to the backends. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Marc-André Lureau 提交于
Query object classes that implements TPMIf instead. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
The reported error message is already prefixed with the -device name & arguments. Before: qemu-system-x86_64: -device tpm-tis,id=foo,tpmdev=foo,irq=21: tpm_tis: IRQ 21 is outside valid range of 0 to 15 After: qemu-system-x86_64: -device tpm-tis,id=foo,tpmdev=foo,irq=21: IRQ 21 is outside valid range of 0 to 15 Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
The function is generally useful and used in the following patches. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Do not hardcode TPM device model to lookup version, use an interface instead. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
find_tpm() will be introduced to lookup the TPM device. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
No need to store the mode in the backend, or to let the frontend set it itself. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Backend can give more accurate error description, and lift out the job from the frontend. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Lift from the backend implementation the responsability to call the request_completed() callback outside of thread context. This also simplify frontend/interface work, as they no longer need to care whether the callback is called from a different thread. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Now that there is an interface instead. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Store the TPM interface, the actual object may be different from TPMState. Keep a reference on the interface, and check the backend wasn't already initialized. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
This field slipped in commit 5086bf97. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 15 11月, 2017 2 次提交
-
-
由 Stefan Berger 提交于
Rather than returning ~0, return 0 for every register in case of failure mode. The '0' is better to indicate that there's no device there. It avoids SeaBIOS detecting a device and getting stuck on it trying to read and write its registers. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Stefan Berger 提交于
In case the backend has a failure, such as the tpm_emulator's CMD_INIT failing, the TIS goes into failure mode and does not respond to reads or writes to MMIO registers. In this case we need to prevent the ACPI table from being added and the straight-forward way is to indicate that there's no known TPM version being used. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 25 10月, 2017 1 次提交
-
-
由 Stefan Berger 提交于
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 19 10月, 2017 5 次提交
-
-
由 Marc-André Lureau 提交于
Simplify the TPM backend setup, move callback to TPM interface. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
This will simplify backend / interface objects relationship, so the frontend interface will simply have to implement the TPM QOM interface. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
The definitions are now private to TIS implementation. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Marc-André Lureau 提交于
Keep it internal to tpm-tis instead. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-