mbox series

[PATCH-for-10.1,v2,00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines

Message ID 20250116145944.38028-1-philmd@linaro.org
Headers show
Series hw/arm: Remove virt-2.6 up to virt-2.12 machines | expand

Message

Philippe Mathieu-Daudé Jan. 16, 2025, 2:59 p.m. UTC
The versioned 'virt' machines up to 2.12 been marked as deprecated
two releases ago, and are older than 6 years, so according to our
support policy we can remove them. Remove associated dead code.

Since v1:
- Corrected disallow_affinity_adjustment removal (Thomas)
- Do not modify docs/about/removed-features.rst (Thomas & Daniel)

Philippe Mathieu-Daudé (13):
  hw/arm/virt: Remove deprecated virt-2.6 machine
  hw/arm/virt: Remove VirtMachineClass::no_pmu field
  hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
  hw/arm/virt: Remove deprecated virt-2.7 machine
  hw/arm/virt: Remove VirtMachineClass::no_its field
  hw/arm/virt: Remove deprecated virt-2.8 machine
  hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
    field
  hw/arm/virt: Remove deprecated virt-2.9 machine
  hw/arm/virt: Remove deprecated virt-2.10 machine
  hw/arm/virt: Remove deprecated virt-2.11 machine
  hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
  hw/arm/virt: Remove deprecated virt-2.12 machine
  hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field

 include/hw/arm/virt.h    |   6 --
 hw/arm/virt-acpi-build.c |  10 +--
 hw/arm/virt.c            | 136 +++++++--------------------------------
 3 files changed, 26 insertions(+), 126 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 16, 2025, 9:13 p.m. UTC | #1
Hi Peter,

On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
> The versioned 'virt' machines up to 2.12 been marked as deprecated
> two releases ago, and are older than 6 years, so according to our
> support policy we can remove them. Remove associated dead code.

> Philippe Mathieu-Daudé (13):
>    hw/arm/virt: Remove deprecated virt-2.6 machine
>    hw/arm/virt: Remove VirtMachineClass::no_pmu field
>    hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
>    hw/arm/virt: Remove deprecated virt-2.7 machine
>    hw/arm/virt: Remove VirtMachineClass::no_its field
>    hw/arm/virt: Remove deprecated virt-2.8 machine
>    hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
>      field
>    hw/arm/virt: Remove deprecated virt-2.9 machine
>    hw/arm/virt: Remove deprecated virt-2.10 machine
>    hw/arm/virt: Remove deprecated virt-2.11 machine
>    hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
>    hw/arm/virt: Remove deprecated virt-2.12 machine
>    hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field

Please ignore this (reviewed) series for now. I'll rebase it and
repost after the 10.0 release.

Thanks,

Phil.
Thomas Huth Jan. 17, 2025, 6:47 a.m. UTC | #2
On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote:
> Hi Peter,
> 
> On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
>> The versioned 'virt' machines up to 2.12 been marked as deprecated
>> two releases ago, and are older than 6 years, so according to our
>> support policy we can remove them. Remove associated dead code.
> 
>> Philippe Mathieu-Daudé (13):
>>    hw/arm/virt: Remove deprecated virt-2.6 machine
>>    hw/arm/virt: Remove VirtMachineClass::no_pmu field
>>    hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
>>    hw/arm/virt: Remove deprecated virt-2.7 machine
>>    hw/arm/virt: Remove VirtMachineClass::no_its field
>>    hw/arm/virt: Remove deprecated virt-2.8 machine
>>    hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
>>      field
>>    hw/arm/virt: Remove deprecated virt-2.9 machine
>>    hw/arm/virt: Remove deprecated virt-2.10 machine
>>    hw/arm/virt: Remove deprecated virt-2.11 machine
>>    hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
>>    hw/arm/virt: Remove deprecated virt-2.12 machine
>>    hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field
> 
> Please ignore this (reviewed) series for now. I'll rebase it and
> repost after the 10.0 release.

Why? IMHO it should be ok to include them now already. While Daniel's macro 
only starts the automatic disablement for 10.1, it should be ok to remove 
them now already according to our normal deprecation policy: The machines 
have been marked as deprecated in the 9.1 release already (via commit 
https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff ), and thus they 
have been deprecated since two releases already. So it should be fine to 
remove them now, shouldn't it?

  Thomas
Daniel P. Berrangé Jan. 17, 2025, 8:09 a.m. UTC | #3
On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote:
> On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote:
> > Hi Peter,
> > 
> > On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
> > > The versioned 'virt' machines up to 2.12 been marked as deprecated
> > > two releases ago, and are older than 6 years, so according to our
> > > support policy we can remove them. Remove associated dead code.
> > 
> > > Philippe Mathieu-Daudé (13):
> > >    hw/arm/virt: Remove deprecated virt-2.6 machine
> > >    hw/arm/virt: Remove VirtMachineClass::no_pmu field
> > >    hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
> > >    hw/arm/virt: Remove deprecated virt-2.7 machine
> > >    hw/arm/virt: Remove VirtMachineClass::no_its field
> > >    hw/arm/virt: Remove deprecated virt-2.8 machine
> > >    hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
> > >      field
> > >    hw/arm/virt: Remove deprecated virt-2.9 machine
> > >    hw/arm/virt: Remove deprecated virt-2.10 machine
> > >    hw/arm/virt: Remove deprecated virt-2.11 machine
> > >    hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
> > >    hw/arm/virt: Remove deprecated virt-2.12 machine
> > >    hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field
> > 
> > Please ignore this (reviewed) series for now. I'll rebase it and
> > repost after the 10.0 release.
> 
> Why? IMHO it should be ok to include them now already. While Daniel's macro
> only starts the automatic disablement for 10.1, it should be ok to remove
> them now already according to our normal deprecation policy: The machines
> have been marked as deprecated in the 9.1 release already (via commit
> https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff ), and thus they
> have been deprecated since two releases already. So it should be fine to
> remove them now, shouldn't it?

No, because as of 9.1.0 we documented that machine types are under the
new policy, and these were only deprecated in 9.1.0, hence the new policy
applies to them.
 
With regards,
Daniel
Thomas Huth Jan. 17, 2025, 8:29 a.m. UTC | #4
On 17/01/2025 09.09, Daniel P. Berrangé wrote:
> On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote:
>> On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote:
>>> Hi Peter,
>>>
>>> On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
>>>> The versioned 'virt' machines up to 2.12 been marked as deprecated
>>>> two releases ago, and are older than 6 years, so according to our
>>>> support policy we can remove them. Remove associated dead code.
>>>
>>>> Philippe Mathieu-Daudé (13):
>>>>     hw/arm/virt: Remove deprecated virt-2.6 machine
>>>>     hw/arm/virt: Remove VirtMachineClass::no_pmu field
>>>>     hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
>>>>     hw/arm/virt: Remove deprecated virt-2.7 machine
>>>>     hw/arm/virt: Remove VirtMachineClass::no_its field
>>>>     hw/arm/virt: Remove deprecated virt-2.8 machine
>>>>     hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
>>>>       field
>>>>     hw/arm/virt: Remove deprecated virt-2.9 machine
>>>>     hw/arm/virt: Remove deprecated virt-2.10 machine
>>>>     hw/arm/virt: Remove deprecated virt-2.11 machine
>>>>     hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
>>>>     hw/arm/virt: Remove deprecated virt-2.12 machine
>>>>     hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field
>>>
>>> Please ignore this (reviewed) series for now. I'll rebase it and
>>> repost after the 10.0 release.
>>
>> Why? IMHO it should be ok to include them now already. While Daniel's macro
>> only starts the automatic disablement for 10.1, it should be ok to remove
>> them now already according to our normal deprecation policy: The machines
>> have been marked as deprecated in the 9.1 release already (via commit
>> https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff ), and thus they
>> have been deprecated since two releases already. So it should be fine to
>> remove them now, shouldn't it?
> 
> No, because as of 9.1.0 we documented that machine types are under the
> new policy, and these were only deprecated in 9.1.0, hence the new policy
> applies to them.

Hm, I guess we could argue now about the wording (I don't see a spot in 
ce80c4fa6ff that says that this only happens starting with 10.1), but in the 
long run, it doesn't really matter much whether we remove these machines 
with 10.0 already or just with 10.1, so let's go with 10.1 instead.

  Thomas
Philippe Mathieu-Daudé Jan. 17, 2025, 8:44 a.m. UTC | #5
On 17/1/25 09:09, Daniel P. Berrangé wrote:
> On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote:
>> On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote:
>>> Hi Peter,
>>>
>>> On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
>>>> The versioned 'virt' machines up to 2.12 been marked as deprecated
>>>> two releases ago, and are older than 6 years, so according to our
>>>> support policy we can remove them. Remove associated dead code.


>>> Please ignore this (reviewed) series for now. I'll rebase it and
>>> repost after the 10.0 release.
>>
>> Why? IMHO it should be ok to include them now already. While Daniel's macro
>> only starts the automatic disablement for 10.1, it should be ok to remove
>> them now already according to our normal deprecation policy: The machines
>> have been marked as deprecated in the 9.1 release already (via commit
>> https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff ), and thus they
>> have been deprecated since two releases already. So it should be fine to
>> remove them now, shouldn't it?
> 
> No, because as of 9.1.0 we documented that machine types are under the
> new policy, and these were only deprecated in 9.1.0, hence the new policy
> applies to them.

Thomas, see Daniel's larger explanation:
https://lore.kernel.org/qemu-devel/Z4jRYiUGAzz1_NRV@redhat.com/
Daniel P. Berrangé Jan. 17, 2025, 11:01 a.m. UTC | #6
On Fri, Jan 17, 2025 at 09:29:40AM +0100, Thomas Huth wrote:
> On 17/01/2025 09.09, Daniel P. Berrangé wrote:
> > On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote:
> > > On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote:
> > > > Hi Peter,
> > > > 
> > > > On 16/1/25 15:59, Philippe Mathieu-Daudé wrote:
> > > > > The versioned 'virt' machines up to 2.12 been marked as deprecated
> > > > > two releases ago, and are older than 6 years, so according to our
> > > > > support policy we can remove them. Remove associated dead code.
> > > > 
> > > > > Philippe Mathieu-Daudé (13):
> > > > >     hw/arm/virt: Remove deprecated virt-2.6 machine
> > > > >     hw/arm/virt: Remove VirtMachineClass::no_pmu field
> > > > >     hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
> > > > >     hw/arm/virt: Remove deprecated virt-2.7 machine
> > > > >     hw/arm/virt: Remove VirtMachineClass::no_its field
> > > > >     hw/arm/virt: Remove deprecated virt-2.8 machine
> > > > >     hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
> > > > >       field
> > > > >     hw/arm/virt: Remove deprecated virt-2.9 machine
> > > > >     hw/arm/virt: Remove deprecated virt-2.10 machine
> > > > >     hw/arm/virt: Remove deprecated virt-2.11 machine
> > > > >     hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field
> > > > >     hw/arm/virt: Remove deprecated virt-2.12 machine
> > > > >     hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field
> > > > 
> > > > Please ignore this (reviewed) series for now. I'll rebase it and
> > > > repost after the 10.0 release.
> > > 
> > > Why? IMHO it should be ok to include them now already. While Daniel's macro
> > > only starts the automatic disablement for 10.1, it should be ok to remove
> > > them now already according to our normal deprecation policy: The machines
> > > have been marked as deprecated in the 9.1 release already (via commit
> > > https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff ), and thus they
> > > have been deprecated since two releases already. So it should be fine to
> > > remove them now, shouldn't it?
> > 
> > No, because as of 9.1.0 we documented that machine types are under the
> > new policy, and these were only deprecated in 9.1.0, hence the new policy
> > applies to them.
> 
> Hm, I guess we could argue now about the wording (I don't see a spot in
> ce80c4fa6ff that says that this only happens starting with 10.1), but in the
> long run, it doesn't really matter much whether we remove these machines
> with 10.0 already or just with 10.1, so let's go with 10.1 instead.

That's the wrong commit - I documented the delayed impl of deletion
in a separate commit, so that we could just revert that part on its
own in 10.1 dev:

  commit c9fd2d9a48ee3c195cf83cc611b87b09f02f0013
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Thu Jun 20 17:57:37 2024 +0100

    include/hw: temporarily disable deletion of versioned machine types
    
    The new deprecation and deletion policy for versioned machine types is
    being introduced in QEMU 9.1.0.
    
    Under the new policy a number of old machine types (any prior to 2.12)
    would be liable for immediate deletion which would be a violation of our
    historical deprecation and removal policy
    
    Thus automatic deletions (by skipping QOM registration) are temporarily
    gated on existance of the env variable "QEMU_DELETE_MACHINES" / QEMU
    version number >= 10.1.0. This allows opt-in testing of the automatic
    deletion logic, while activating it fully in QEMU >= 10.1.0.
    
    This whole commit should be reverted in the 10.1.0 dev cycle or shortly
    thereafter.
    
    Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Message-ID: <20240620165742.1711389-10-berrange@redhat.com>
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


If a machine type was deprected *before* the 9.1 release cycle, I think
it is fair game to delete it under the historical deprecation rules.

If a machine type was deprecated in 9.1, or later cycles, I think that
deletion is gated until 10.1.0 under the policy applied by that commit
above.

With regards,
Daniel