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. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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)
--- hw/tpm/tpm_tis_sysbus.c | 1 - 1 file changed, 1 deletion(-)
hw/tpm/tpm_tis_sysbus.c +0 -1
@@ -93,7 +93,6 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)static Property tpm_tis_sysbus_properties[] = {DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num,TPM_TIS_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateSysBus, state.be_driver), -DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (), };
Signature · 1 line
2.41.0
Hi Stefan,
Quoted 13 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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
Quoted 4 lines
[...]
Segmentation fault (core dumped)Signed-off-by Stefan Berger <[email protected]>
Thanks!
Eric
Quoted 16 lines
--- hw/tpm/tpm_tis_sysbus.c | 1 - 1 file changed, 1 deletion(-)hw/tpm/tpm_tis_sysbus.c +0
-1@@ -93,7 +93,6 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)static Property tpm_tis_sysbus_properties[] = {DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num,TPM_TIS_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateSysBus, state.be_driver), -DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (), };
Quoted 14 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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
Quoted 4 lines
[...]
Segmentation fault (core dumped)Signed-off-by Stefan Berger <[email protected]>
Do you need to add a VMSTATE_UNUSED_TEST in case a future QEMU version introduces a new field in the same position which will cause an issue when restoring from an older version?
Quoted 19 lines · Joelle van Dyne
Quoted 17 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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)
Quoted 5 lines
Quoted 1 line
Signed-off-by Stefan Berger <[email protected]>Do you need to add a
VMSTATE_UNUSED_TESTin case a future QEMU version introduces a new field in the same position which will cause an issue when restoring from an older version?
Actually, ignore that last message. I misread the patch thinking it's on the VMState.
Quoted 18 lines · Joelle van Dyne
Quoted 17 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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)
Quoted 5 lines
Quoted 1 line
Signed-off-by Stefan Berger <[email protected]>Do you need to add a
VMSTATE_UNUSED_TESTin case a future QEMU version introduces a new field in the same position which will cause an issue when restoring from an older version?
Hm, you got a point there. We will have to error-out in case someone sets ppi=on instead since the expectation that PPI would work is simply not there. v2 coming soon.
Stefan
Hi Stefan,
Quoted 24 lines · Stefan Berger
Quoted 21 lines · Joelle van Dyne
Quoted 18 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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]>
Quoted 7 lines
Quoted 3 lines
Do you need to add a
VMSTATE_UNUSED_TESTin case a future QEMU version introduces a new field in the same position which will cause an issue when restoring from an older version?Hm, you got a point there. We will have to error-out in case someone sets ppi=on instead since the expectation that PPI would work is simply not there. v2 coming soon.
as Joelle pointed it out ppi_enabled is not part of vmstate_tpm_tis_sysbus fields. And since it has never worked I suspect we cannot have any existing VM enabling it. So I don't get the issue with this 1st version?
Thanks
Eric
Quoted 3 lines
Stefan
Quoted 30 lines · Eric Auger
Hi Stefan,
Quoted 28 lines · Stefan Berger
Quoted 24 lines · Joelle van Dyne
Quoted 17 lines · Stefan Berger
The ppi command line option for the TIS device on sysbus never worked and caused an immediate segfault. Remove support for it since it also needs support in the firmware and needs testing inside the VM.
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)Quoted 1 line
Signed-off-by Stefan Berger <[email protected]>Do you need to add a
VMSTATE_UNUSED_TESTin case a future QEMU version introduces a new field in the same position which will cause an issue when restoring from an older version?
Quoted 7 lines
Quoted 3 lines
Hm, you got a point there. We will have to error-out in case someone sets ppi=on instead since the expectation that PPI would work is simply not there. v2 coming soon.
as Joelle pointed it out
ppi_enabledis not part ofvmstate_tpm_tis_sysbusfields. And since it has never worked I suspect we cannot have any existing VM enabling it. So I don't get the issue with this 1st version?
You are right. I repeated my test with restoring state of a VM taken before the removal of this field and it restored it. So that other patch is good and I am withdrawing this patch here.
Stefan
Quoted 8 lines
Thanks
Eric
Quoted 3 lines
Stefan