Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- hw/tpm/tpm_tis.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 175785b9c4..dccc56ab09 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -1057,6 +1057,11 @@ static void tpm_tis_realizefn(DeviceState *dev, Error **errp) { TPMState *s = TPM(dev); + if (!tpm_find()) { + error_setg(errp, "at most one TPM device is permitted"); + return; + } + s->be_driver = qemu_find_tpm_be(s->backend); if (!s->be_driver) { error_setg(errp, "backend driver with id %s could not be found", -- 2.15.0.rc0.40.gaefcc5f6f