hw/tpm: TIS on sysbus: Remove unsupport ppi command line option
PATCH 1/1 hw/tpm: TIS on sysbus: Remove unsupport ppi command line option
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Since it is part of the state of a VM we cannot remove it but have to intercept ppi_enabled set to true and display an error instead.
Reproducer with the ppi=on option passed:
qemu-system-aarch64 \
-machine virt,gic-version=3 \
-m 4G \
-nographic -no-acpi \
-chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis-device,tpmdev=tpm0,ppi=on
[...]
Segmentation fault (core dumped)
Signed-off-by Stefan Berger <[email protected]>
--- hw/tpm/tpm_tis_sysbus.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/tpm/tpm_tis_sysbus.c +5 -0
@@ -124,6 +124,11 @@ static void tpm_tis_sysbus_realizefn(DeviceState *dev, Error **errp)error_setg (errp,"'tpmdev' property is required" );return ; } + +if (s->ppi_enabled) { +error_setg (errp,"'ppi=on' is not supported by this device" ); +return ; + } }static void tpm_tis_sysbus_class_init (ObjectClass *klass,void *data)
Signature · 1 line
2.41.0