mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 07:13:38 +08:00
tpm-tis: check that at most one TPM device exists
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
c87b35fa71
commit
51a837e908
@ -1061,6 +1061,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",
|
||||
|
Loading…
Reference in New Issue
Block a user