virt: Set tpm-tis-device ppi property to off by default
cover virt: Set tpm-tis-device ppi property to off by default
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to off
hw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/2 tpm: tpm-tis-device: set PPI to false by default
The tpm-tis-device device does not support PPI. Let's change the default value for the corresponding property instead of tricking this latter in the mach-virt machine.
--- hw/tpm/tpm_tis_sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/tpm/tpm_tis_sysbus.c +1 -1
@@ -91,7 +91,7 @@ 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, true), +DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (), };
Signature · 1 line
2.20.1
Re: [PATCH 1/2] tpm: tpm-tis-device: set PPI to false by default
Quoted 14 lines · On Mon, 27 Apr 2020 16:31:44 +0200 Eric Auger <[email protected]> wrote:
The tpm-tis-device device does not support PPI. Let's change the default value for the corresponding property instead of tricking this latter in the mach-virt machine.
Signed-off-by Eric Auger <[email protected]>--- hw/tpm/tpm_tis_sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/tpm/tpm_tis_sysbus.c +0
-0
hw/tpm/tpm_tis_sysbus.c static void tpm_tis_sysbus_reset(DeviceState *dev) · line 97
Quoted 8 lines
hw/tpm/tpm_tis_sysbus.c +1
-1@@ -91,7 +91,7 @@ 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, true), +DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (), };
This looks like a better place to do this than in the virt compat machines, and should get us the same result, leaving compatibility intact.
Stefan Berger
Reviewed-byRe: [PATCH 1/2] tpm: tpm-tis-device: set PPI to false by default
Quoted 29 lines · Cornelia Huck
Quoted 14 lines · On Mon, 27 Apr 2020 16:31:44 +0200 Eric Auger <[email protected]> wrote:
The tpm-tis-device device does not support PPI. Let's change the default value for the corresponding property instead of tricking this latter in the mach-virt machine.
Signed-off-by Eric Auger <[email protected]>--- hw/tpm/tpm_tis_sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/tpm/tpm_tis_sysbus.c +0
-0hw/tpm/tpm_tis_sysbus.c static void tpm_tis_sysbus_reset(DeviceState *dev) · line 97
Quoted 8 lines
hw/tpm/tpm_tis_sysbus.c +1
-1@@ -91,7 +91,7 @@ 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, true), +DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (), };This looks like a better place to do this than in the virt compat machines, and should get us the same result, leaving compatibility intact.
Quoted 2 lines
Reviewed-by Cornelia Huck <[email protected]>
PATCH 2/2 hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to off
In reply to Eric AugerNow that the tpm-tis-device device PPI property is off by default, we can remove the compat used for the same goal.
--- hw/arm/virt.c | 5 ----- 1 file changed, 5 deletions(-)
hw/arm/virt.c +0 -5
@@ -2311,11 +2311,6 @@ type_init(machvirt_machine_init);static void virt_machine_5_0_options (MachineClass *mc) { -static GlobalProperty compat[] = { - {TYPE_TPM_TIS_SYSBUS ,"ppi" ,"false" }, - }; - -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); }DEFINE_VIRT_MACHINE_AS_LATEST (5 ,0 )
Signature · 1 line
2.20.1
Re: [PATCH 2/2] hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to off
Quoted 14 lines · On Mon, 27 Apr 2020 16:31:45 +0200 Eric Auger <[email protected]> wrote:
Now that the tpm-tis-device device PPI property is off by default, we can remove the compat used for the same goal.
Signed-off-by Eric Auger <[email protected]>--- hw/arm/virt.c | 5 ----- 1 file changed, 5 deletions(-)hw/arm/virt.c +0
-0@@ -2311,11 +2311,6 @@ type_init(machvirt_machine_init);
hw/arm/virt.c type_init(machvirt_machine_init); · line 2316
Quoted 10 lines
hw/arm/virt.c +0
-5static void virt_machine_5_0_options (MachineClass *mc) { -static GlobalProperty compat[] = { - {TYPE_TPM_TIS_SYSBUS ,"ppi" ,"false" }, - }; - -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); }DEFINE_VIRT_MACHINE_AS_LATEST (5 ,0 )
Stefan Berger
Reviewed-byRe: [PATCH 2/2] hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to off
Quoted 17 lines · Cornelia Huck
Quoted 14 lines · On Mon, 27 Apr 2020 16:31:45 +0200 Eric Auger <[email protected]> wrote:
Now that the tpm-tis-device device PPI property is off by default, we can remove the compat used for the same goal.
Signed-off-by Eric Auger <[email protected]>--- hw/arm/virt.c | 5 ----- 1 file changed, 5 deletions(-)hw/arm/virt.c +0
-0@@ -2311,11 +2311,6 @@ type_init(machvirt_machine_init);
Quoted 12 lines
hw/arm/virt.c type_init(machvirt_machine_init); · line 2316
Quoted 10 lines
hw/arm/virt.c +0
-5static void virt_machine_5_0_options (MachineClass *mc) { -static GlobalProperty compat[] = { - {TYPE_TPM_TIS_SYSBUS ,"ppi" ,"false" }, - }; - -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); }DEFINE_VIRT_MACHINE_AS_LATEST (5 ,0 )Reviewed-by Cornelia Huck <[email protected]>
Quoted 4 lines · Eric Auger
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
There is no change in behavior on any arm machine due to this patch, right? So backporting would not be necessary?
Stefan
Hi Stefan,
Quoted 8 lines · Stefan Berger
Quoted 4 lines · Eric Auger
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
There is no change in behavior on any arm machine due to this patch, right? So backporting would not be necessary?
Indeed, there is no functional change as we keep PPI off. My understanding is we can safely remove the compat mechanism. I tested migration between virt machine with compat to virt machine without compat and conversely (without tpm-tis-device though) and it passed.
Thanks
Eric
Quoted 5 lines
Stefan
Quoted 9 lines · On Mon, 27 Apr 2020 16:31:43 +0200 Eric Auger <[email protected]> wrote:
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Quoted 8 lines
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to offhw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
I think we can apply the compat machines patch on top of these two patches.
Q: Who will queue this and the machine types patch? It feels a bit weird taking arm patches through the s390 tree :)
Quoted 20 lines · Cornelia Huck
Quoted 9 lines · On Mon, 27 Apr 2020 16:31:43 +0200 Eric Auger <[email protected]> wrote:
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Quoted 8 lines
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to offhw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
Quoted 6 lines
I think we can apply the compat machines patch on top of these two patches.
Q: Who will queue this and the machine types patch? It feels a bit weird taking arm patches through the s390 tree :)
I can queue them and would send the PR soon. I am also fine with someone else doing it.
Quoted 21 lines · On Tue, 28 Apr 2020 16:13:05 -0400 Stefan Berger <[email protected]> wrote:
Quoted 20 lines · Cornelia Huck
Quoted 17 lines · On Mon, 27 Apr 2020 16:31:43 +0200 Eric Auger <[email protected]> wrote:
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to offhw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
Quoted 8 lines
Quoted 6 lines
I think we can apply the compat machines patch on top of these two patches.
Q: Who will queue this and the machine types patch? It feels a bit weird taking arm patches through the s390 tree :)
I can queue them and would send the PR soon. I am also fine with someone else doing it.
Would be great if you could queue these together with
https://patchew.org/QEMU/[email protected]/
(hopefully should still apply cleanly, let me know if a respin is needed).
Quoted 30 lines · Cornelia Huck
Quoted 27 lines · On Tue, 28 Apr 2020 16:13:05 -0400 Stefan Berger <[email protected]> wrote:
Quoted 26 lines · Cornelia Huck
Quoted 9 lines · On Mon, 27 Apr 2020 16:31:43 +0200 Eric Auger <[email protected]> wrote:
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Quoted 8 lines
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to offhw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)I think we can apply the compat machines patch on top of these two patches.
Q: Who will queue this and the machine types patch? It feels a bit weird taking arm patches through the s390 tree :)
Quoted 7 lines
Quoted 2 lines
I can queue them and would send the PR soon. I am also fine with someone else doing it.
Would be great if you could queue these together with
https://patchew.org/QEMU/[email protected]/
(hopefully should still apply cleanly, let me know if a respin is needed).
It's probably better to respin:
Quoted 1 line
patches apply id:[email protected]
Applying: hw: add compat machines for 5.1
Using index info to reconstruct a base tree...
M hw/arm/virt.c
Falling back to patching base and 3-way merge... Auto-merging hw/arm/virt.c
CONFLICT (content): Merge conflict in hw/arm/virt.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 hw: add compat machines for 5.1
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Quoted 10 lines · Eric Auger
Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.
Best Regards
Eric
Quoted 7 lines
Eric Auger (2):
tpm: tpm-tis-device: set PPI to false by default hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to offhw/arm/virt.c | 5 ----- hw/tpm/tpm_tis_sysbus.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
Stefan, feel free to take these through your tree if you think that makes sense.
thanks
-- PMM