mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
00bbf50a50
We have a strict separation between enum TpmModel and tpm_models[]: * TpmModel may have any number of members. It just happens to have one. * tpm_register_model() uses the first empty slot in tpm_models[]. If you register more than tpm_models[] has space, tpn_register_model() fails. Its caller silently ignores the failure. Register the same TpmModel more than once has no effect other than wasting tpm_models[] slots: tpm_model_is_registered() is happy with the first one it finds. Since we only ever register one model, and tpm_models[] has space for just that one, this contraption even works. Turn tpm_models[] into a straight map from enum TpmType to bool. Much simpler. Cc: Stefan Berger <stefanb@us.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-5-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [Commit message typo fixed] |
||
---|---|---|
.. | ||
accel.h | ||
arch_init.h | ||
balloon.h | ||
block-backend.h | ||
blockdev.h | ||
bt.h | ||
cpus.h | ||
cryptodev.h | ||
device_tree.h | ||
dma.h | ||
dump-arch.h | ||
dump.h | ||
hax.h | ||
hostmem.h | ||
hw_accel.h | ||
iothread.h | ||
kvm_int.h | ||
kvm.h | ||
memory_mapping.h | ||
numa.h | ||
os-posix.h | ||
os-win32.h | ||
qtest.h | ||
replay.h | ||
reset.h | ||
rng-random.h | ||
rng.h | ||
seccomp.h | ||
sysemu.h | ||
tpm_backend_int.h | ||
tpm_backend.h | ||
tpm.h | ||
watchdog.h | ||
xen-mapcache.h |