Go to file
Stefan Berger edff867807 Add TPM (frontend) hardware interface (TPM TIS) to QEMU
This patch adds the main code of the TPM frontend driver, the TPM TIS
interface, to QEMU. The code is largely based on the previous implementation
for Xen but has been significantly extended to meet the standard's
requirements, such as the support for changing of localities and all the
functionality of the available flags.

Communication with the backend (i.e., for Xen or the libtpms-based one)
is cleanly separated through an interface which the backend driver needs
to implement.

Whenever the frontend has collected a complete packet, it will submit
a task to the backend, which then starts processing the command. Once
the result has been returned, the backend invokes a callback function
(tpm_tis_receive_cb()).

Testing the proper functioning of the different flags and localities
cannot be done from user space when running in Linux for example, since
access to the address space of the TPM TIS interface is not possible. Also
the Linux driver itself does not exercise all functionality. So, for
testing there is a fairly extensive test suite as part of the SeaBIOS patches
since from within the BIOS one can have full access to all the TPM's registers.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Message-id: 1361987275-26289-3-git-send-email-stefanb@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-12 13:40:11 -05:00
audio audio: Replace non-portable asprintf in debug code by g_strdup_printf 2013-01-16 12:03:26 -06:00
backends Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-03-10 19:56:35 -05:00
block iscsi: add iscsi_truncate support 2013-03-05 17:51:51 +01:00
bsd-user qemu-log: default to stderr for logging output 2013-02-26 13:31:47 -06:00
default-configs ppc: express FDT dependency of pSeries and e500 boards via default-configs/ 2013-03-01 15:01:19 +01:00
disas Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() 2013-02-23 16:11:19 +00:00
docs migration: move rate limiting to QEMUFile 2013-03-11 13:32:02 +01:00
fpu softfloat: Handle float_muladd_negate_c when product is zero 2013-01-26 13:22:09 +00:00
fsdev virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup() 2013-01-30 11:14:46 +01:00
gdb-xml
hw arm: fix compilation with CONFIG_FDT 2013-03-11 07:39:47 -05:00
include Support for TPM command line options 2013-03-12 13:40:11 -05:00
ldscripts build: create ldscripts/ 2012-12-19 08:29:06 +01:00
libcacard libcacard: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
linux-headers linux-headers: resync from mainline to add ARM KVM headers 2013-03-05 00:34:40 +00:00
linux-user mipsn32-linux-user: Configure the architecture properly 2013-03-05 15:04:20 +01:00
net net: reduce the unnecessary memory allocation of multiqueue 2013-02-27 16:10:47 +01:00
pc-bios update seabios to 1.7.2.1 2013-02-28 09:19:00 +01:00
pixman@97336fad32 qapi: move include files to include/qobject/ 2012-12-19 08:31:31 +01:00
po ui/gtk: Use menu item from stock for full screen 2013-02-22 14:49:00 -06:00
qapi qapi: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
qga qemu-ga: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
QMP qmp: add pull_event function 2012-10-24 10:26:22 +02:00
qobject build: move qobject files to qobject/ and libqemuutil.a 2013-01-12 18:42:50 +01:00
qom qom/object.c: Allow itf cast with num_itfs = 0 2013-02-21 16:34:10 -06:00
roms update seabios to 1.7.2.1 2013-02-28 09:19:00 +01:00
scripts make_device_config.sh: Emit dependency file to directory where included 2013-03-09 12:00:03 +00:00
slirp move socket_set_nodelay to osdep.c 2013-03-04 09:54:17 +01:00
stubs hw: move device-hotplug.o to toplevel, compile it once 2013-03-01 13:57:13 +01:00
sysconfigs/target Eliminate cpus-x86_64.conf file 2012-09-21 15:12:58 +02:00
target-alpha gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-arm target-arm: Use MemoryListener to identify GIC base address for KVM 2013-03-05 00:45:25 +00:00
target-cris gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-i386 virtio,vhost,pci,e1000 2013-03-04 08:22:41 -06:00
target-lm32 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-m68k gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-microblaze gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-mips mips64-linux-user: Enable 64-bit address mode and fpu 2013-03-05 11:58:48 +01:00
target-openrisc gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-ppc target-ppc: Move CPU aliases out of translate_init.c 2013-03-08 21:04:53 +01:00
target-s390x s390/css: Fix subchannel detection 2013-03-08 21:17:46 +01:00
target-sh4 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-sparc gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-unicore32 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-xtensa gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
tcg Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
tests rtc-test: Fix test failures with recent glib 2013-03-08 10:16:54 +01:00
tpm Add TPM (frontend) hardware interface (TPM TIS) to QEMU 2013-03-12 13:40:11 -05:00
trace trace: deal with deprecated glib thread functions 2013-02-12 16:26:44 -06:00
ui qemu-char: move text console init to console.c 2013-03-08 13:57:16 -06:00
util Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-03-10 19:56:35 -05:00
.exrc qemu: add .exrc 2012-09-07 09:02:44 +03:00
.gitignore .gitignore: Ignore optionrom/*.asm 2013-02-21 10:38:07 +01:00
.gitmodules pixman: add submodule 2012-11-01 13:10:06 +01:00
.mailmap
aio-posix.c aio: support G_IO_HUP and G_IO_ERR 2013-02-21 16:17:31 -06:00
aio-win32.c aio: Fix return value of aio_poll() 2013-01-17 10:51:42 +01:00
arch_init.c page_cache: dup memory on insert 2013-03-11 13:32:03 +01:00
async.c aio: convert aio_poll() to g_poll(3) 2013-02-21 16:17:31 -06:00
balloon.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
block-migration.c migration: run setup callbacks out of big lock 2013-03-11 13:32:01 +01:00
block.c block: for HMP commit() operations on 'all', skip non-COW drives 2013-03-04 09:54:17 +01:00
blockdev-nbd.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
blockdev.c blockdev: add discard suboption to -drive 2013-02-22 21:29:42 +01:00
blockjob.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
bt-host.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
bt-vhci.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
Changelog
cmd.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
cmd.h
CODING_STYLE
configure Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-03-10 19:56:35 -05:00
COPYING
COPYING.LIB
coroutine-gthread.c block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
coroutine-sigaltstack.c Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-02-26 07:44:39 -06:00
coroutine-ucontext.c Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-02-26 07:44:39 -06:00
coroutine-win32.c block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
cpu-exec.c Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
cpus.c cpus.c: Drop unnecessary set_cpu_log() 2013-02-16 10:45:19 +00:00
cputlb.c cpu: Move current_tb field to CPUState 2013-02-16 14:51:00 +01:00
device_tree.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
device-hotplug.c hw: move device-hotplug.o to toplevel, compile it once 2013-03-01 13:57:13 +01:00
disas.c monitor: move include files to include/monitor/ 2012-12-19 08:31:32 +01:00
dma-helpers.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dump-stub.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dump.c cpu: Move host_tid field to CPUState 2013-02-16 14:50:59 +01:00
exec.c Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
gdbstub.c move socket_set_nodelay to osdep.c 2013-03-04 09:54:17 +01:00
HACKING HACKING: List areas where we may rely on impdef C behaviour 2012-12-08 14:27:40 +00:00
hmp-commands.hx Support for TPM command line options 2013-03-12 13:40:11 -05:00
hmp.c Support for TPM command line options 2013-03-12 13:40:11 -05:00
hmp.h Support for TPM command line options 2013-03-12 13:40:11 -05:00
iohandler.c iohandler: switch to GPollFD 2013-02-21 16:17:31 -06:00
ioport.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
kvm-all.c cpu: Move exit_request field to CPUState 2013-02-16 14:51:00 +01:00
kvm-stub.c kvm: Pass CPUState to kvm_on_sigbus_vcpu() 2013-01-28 16:57:56 +01:00
LICENSE
main-loop.c main-loop: drop rfds/wfds/xfds for good 2013-02-21 16:17:31 -06:00
MAINTAINERS s390: virtio-ccw maintainer 2013-03-08 21:17:46 +01:00
Makefile Makefile: Add subdir dependency on config-devices-all.mak 2013-03-09 12:00:03 +00:00
Makefile.objs Support for TPM command line options 2013-03-12 13:40:11 -05:00
Makefile.target build: always link device_tree.o into emulators if libfdt available 2013-03-01 15:01:19 +01:00
memory_mapping-stub.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
memory_mapping.c exec: change RAM list to a TAILQ 2012-12-20 23:08:47 +01:00
memory.c memory: Use non-bitops ctzl 2013-02-16 11:12:13 +00:00
migration-exec.c migration: eliminate s->migration_file 2013-03-11 13:32:03 +01:00
migration-fd.c migration: eliminate s->migration_file 2013-03-11 13:32:03 +01:00
migration-tcp.c migration: eliminate s->migration_file 2013-03-11 13:32:03 +01:00
migration-unix.c migration: eliminate s->migration_file 2013-03-11 13:32:03 +01:00
migration.c migration: inline migrate_fd_close 2013-03-11 13:32:03 +01:00
monitor.c Support for TPM command line options 2013-03-12 13:40:11 -05:00
nbd.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
os-posix.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
os-win32.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
page_cache.c page_cache: dup memory on insert 2013-03-11 13:32:03 +01:00
qapi-schema-test.json
qapi-schema.json Support for TPM command line options 2013-03-12 13:40:11 -05:00
qdev-monitor.c hw: move qdev-monitor.o to toplevel directory 2013-03-01 13:54:10 +01:00
qdict-test-data.txt
qemu-bridge-helper.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-char.c qemu-char: fix win32 build 2013-03-10 19:26:22 -05:00
qemu-coroutine-io.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine-lock.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine-sleep.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine.c coroutine: move pooling to common code 2013-02-22 21:21:10 +01:00
qemu-doc.texi sheepdog: add support for connecting to unix domain socket 2013-03-04 09:54:17 +01:00
qemu-img-cmds.hx qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-img.c qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-img.texi qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-io.c block: implement BDRV_O_UNMAP 2013-02-22 21:29:42 +01:00
qemu-log.c qemu-log: default to stderr for logging output 2013-02-26 13:31:47 -06:00
qemu-nbd.c qemu-nbd: add --discard option 2013-02-22 21:29:43 +01:00
qemu-nbd.texi qemu-nbd: add --discard option 2013-02-22 21:29:43 +01:00
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx Support for TPM command line options 2013-03-12 13:40:11 -05:00
qemu-seccomp.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
qemu-tech.texi qemu-tech.texi: update implemented xtensa features list 2012-11-29 13:00:52 -06:00
qemu-timer.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
qemu.sasl
qmp-commands.hx Support for TPM command line options 2013-03-12 13:40:11 -05:00
qmp.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
qtest.c qtest: Add MMIO support 2013-02-18 08:39:10 -06:00
readline.c readline: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
README
rules.mak rules/mak: make clean should blow away timestamp files 2013-01-30 01:31:08 +02:00
savevm.c migration: move rate limiting to QEMUFile 2013-03-11 13:32:02 +01:00
spice-qemu-char.c qemu-char: move spice registration to spice-qemu-char.c 2013-03-08 13:57:15 -06:00
tcg-runtime.c tcg: Implement multiword multiply helpers 2013-02-23 17:25:28 +00:00
tci.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
thread-pool.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
thunk.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
trace-events migration: add migrate_set_state tracepoint 2013-03-11 13:32:01 +01:00
translate-all.c translate-all.c: Remove cpu_unlink_tb() 2013-03-03 14:28:59 +00:00
translate-all.h cputlb: Pass CPUState to cpu_unlink_tb() 2013-02-16 14:51:00 +01:00
user-exec.c Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() 2013-02-23 16:11:19 +00:00
VERSION Open up 1.5 development tree 2013-02-15 17:40:56 -06:00
version.rc
vl.c Support for TPM command line options 2013-03-12 13:40:11 -05:00
xbzrle.c Move XBZRLE encoding code to a separate file to allow testing 2013-02-01 08:32:20 +01:00
xen-all.c xen: Simplify halting of first CPU 2013-01-15 04:09:14 +01:00
xen-mapcache.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
xen-stub.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team