[PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models

Collin Walling posted 5 patches 5 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20250630031930.950021-1-walling@linux.ibm.com
docs/formatdomain.rst                         |  8 ++++
src/qemu/libvirtd_qemu.aug                    |  3 ++
src/qemu/qemu.conf.in                         | 14 ++++++
src/qemu/qemu_capabilities.c                  |  6 +--
src/qemu/qemu_capabilities.h                  |  3 +-
src/qemu/qemu_conf.c                          | 33 +++++++++++++
src/qemu/qemu_conf.h                          | 12 +++++
src/qemu/qemu_driver.c                        |  3 +-
src/qemu/qemu_process.c                       | 46 +++++++++++++++----
src/qemu/test_libvirtd_qemu.aug.in            |  1 +
...cated-features-off-active.s390x-latest.xml | 25 ++++++++++
...ted-features-off-inactive.s390x-latest.xml | 25 ++++++++++
...ecated-features-on-active.s390x-latest.xml | 25 ++++++++++
...ated-features-on-inactive.s390x-latest.xml | 25 ++++++++++
tests/qemuxmlactivetest.c                     | 10 +++-
...deprecated-features-none.s390x-latest.args | 32 +++++++++++++
...-deprecated-features-none.s390x-latest.xml | 25 ++++++++++
.../cpu-model-deprecated-features-none.xml    | 15 ++++++
...l-deprecated-features-on.s390x-latest.args | 32 +++++++++++++
...el-deprecated-features-on.s390x-latest.xml | 25 ++++++++++
.../cpu-model-deprecated-features-on.xml      | 15 ++++++
...default-video-type-s390x.s390x-latest.args |  2 +-
...vfio-zpci-ccw-memballoon.s390x-latest.args |  2 +-
.../launch-security-s390-pv.s390x-latest.args |  2 +-
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args |  2 +-
.../s390-defaultconsole.s390x-latest.args     |  2 +-
.../s390-panic.s390x-latest.args              |  2 +-
tests/qemuxmlconftest.c                       |  2 +
28 files changed, 375 insertions(+), 22 deletions(-)
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-active.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-inactive.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-active.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-inactive.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.xml
[PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Collin Walling 5 months, 2 weeks ago
Changelog

    v5
    - dropped the "none" test in qemuxmlactivetest (see commit for
        details)
    - reordered patches to introduce some tests first, then add
        qemu.conf changes

    v4
    - added qemu.conf option to dictate the default behavior for the
        deprecated_features attribute (Boris)
    - added qemuxmlactivetests (Boris)
    - snuck in missing documentation for deprecated_features in
        formatdomain.rst

    v3
    - added qemu caps check to avoid breaking s390 guests trying to
        default deprecated_features='off' on QEMU versions that
        do not support reporting these features

    v2
    - changed behavior from disabling features on the host model to 
        instead flagging the guest CPU to disable deprecated features
    - removed disabling deprecated features on host model in
        virQEMUCapsInitCPUModelS390
    - added flagging deprecated_feats in qemuProcessUpdateGuestCPU
    - added tests for deprecated_features='on'
    - split virQEMUCapsUpdateCPUDeprecatedFeatures update and
        qemuProcessUpdateGuestCPU changes

The intention of reporting deprecated features and modifying the guest
CPU model was to alleviate the user from the burden of preparing a guest
with the necessary amendments to assure migration to newer hardware.
While that goal was met by way of the "deprecated_features='on|off'"
attribute, it still adds an extra step that the user must be aware to
prepare a guest for migration and the errors that stem from an
unsuccessful migration (due to feature incompatibility) is not always
clear how to resolve.

These patches make s390 CPU *host models* migration ready from the get-go
by introducing a qemu.conf option for disabling deprecated features by
default.  They may still be disabled for other model types via the
respective attribute, or reenabled if desired.  The configured behavior
may be overridden by explicitly providing the attribute within the
guest XML.

Boris Fiuczynski (2):
  tests: new qemuxmlactive tests for s390x
  qemu: add default_cpu_deprecated_features configuration option

Collin Walling (3):
  docs: domain: document deprecated_features attribute
  qemu: caps: add virCPUFeaturePolicy param to
    virQEMUCapsUpdateCPUDeprecatedFeatures
  qemu: process: refactor deprecated features code

 docs/formatdomain.rst                         |  8 ++++
 src/qemu/libvirtd_qemu.aug                    |  3 ++
 src/qemu/qemu.conf.in                         | 14 ++++++
 src/qemu/qemu_capabilities.c                  |  6 +--
 src/qemu/qemu_capabilities.h                  |  3 +-
 src/qemu/qemu_conf.c                          | 33 +++++++++++++
 src/qemu/qemu_conf.h                          | 12 +++++
 src/qemu/qemu_driver.c                        |  3 +-
 src/qemu/qemu_process.c                       | 46 +++++++++++++++----
 src/qemu/test_libvirtd_qemu.aug.in            |  1 +
 ...cated-features-off-active.s390x-latest.xml | 25 ++++++++++
 ...ted-features-off-inactive.s390x-latest.xml | 25 ++++++++++
 ...ecated-features-on-active.s390x-latest.xml | 25 ++++++++++
 ...ated-features-on-inactive.s390x-latest.xml | 25 ++++++++++
 tests/qemuxmlactivetest.c                     | 10 +++-
 ...deprecated-features-none.s390x-latest.args | 32 +++++++++++++
 ...-deprecated-features-none.s390x-latest.xml | 25 ++++++++++
 .../cpu-model-deprecated-features-none.xml    | 15 ++++++
 ...l-deprecated-features-on.s390x-latest.args | 32 +++++++++++++
 ...el-deprecated-features-on.s390x-latest.xml | 25 ++++++++++
 .../cpu-model-deprecated-features-on.xml      | 15 ++++++
 ...default-video-type-s390x.s390x-latest.args |  2 +-
 ...vfio-zpci-ccw-memballoon.s390x-latest.args |  2 +-
 .../launch-security-s390-pv.s390x-latest.args |  2 +-
 ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args |  2 +-
 .../s390-defaultconsole.s390x-latest.args     |  2 +-
 .../s390-panic.s390x-latest.args              |  2 +-
 tests/qemuxmlconftest.c                       |  2 +
 28 files changed, 375 insertions(+), 22 deletions(-)
 create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-active.s390x-latest.xml
 create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-inactive.s390x-latest.xml
 create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-active.s390x-latest.xml
 create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-inactive.s390x-latest.xml
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.args
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.xml
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.xml
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.args
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.xml
 create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.xml

-- 
2.49.0
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Thomas Huth via Devel 4 months, 3 weeks ago
On 30/06/2025 05.19, Collin Walling wrote:
> Changelog
> 
>      v5
>      - dropped the "none" test in qemuxmlactivetest (see commit for
>          details)
>      - reordered patches to introduce some tests first, then add
>          qemu.conf changes
> 
>      v4
>      - added qemu.conf option to dictate the default behavior for the
>          deprecated_features attribute (Boris)
>      - added qemuxmlactivetests (Boris)
>      - snuck in missing documentation for deprecated_features in
>          formatdomain.rst
> 
>      v3
>      - added qemu caps check to avoid breaking s390 guests trying to
>          default deprecated_features='off' on QEMU versions that
>          do not support reporting these features
> 
>      v2
>      - changed behavior from disabling features on the host model to
>          instead flagging the guest CPU to disable deprecated features
>      - removed disabling deprecated features on host model in
>          virQEMUCapsInitCPUModelS390
>      - added flagging deprecated_feats in qemuProcessUpdateGuestCPU
>      - added tests for deprecated_features='on'
>      - split virQEMUCapsUpdateCPUDeprecatedFeatures update and
>          qemuProcessUpdateGuestCPU changes
> 
> The intention of reporting deprecated features and modifying the guest
> CPU model was to alleviate the user from the burden of preparing a guest
> with the necessary amendments to assure migration to newer hardware.
> While that goal was met by way of the "deprecated_features='on|off'"
> attribute, it still adds an extra step that the user must be aware to
> prepare a guest for migration and the errors that stem from an
> unsuccessful migration (due to feature incompatibility) is not always
> clear how to resolve.
> 
> These patches make s390 CPU *host models* migration ready from the get-go
> by introducing a qemu.conf option for disabling deprecated features by
> default.  They may still be disabled for other model types via the
> respective attribute, or reenabled if desired.  The configured behavior
> may be overridden by explicitly providing the attribute within the
> guest XML.

The patch series sounds reasonable to me, so FWIW:

Series
Acked-by: Thomas Huth <thuth@redhat.com>

Peter, Michal, could we still get this merged for libvirt 11.6 ?

  Thomas
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Collin Walling 4 months, 3 weeks ago
On 7/24/25 03:35, Thomas Huth via Devel wrote:
> On 30/06/2025 05.19, Collin Walling wrote:
>> Changelog
>>
>>      v5
>>      - dropped the "none" test in qemuxmlactivetest (see commit for
>>          details)
>>      - reordered patches to introduce some tests first, then add
>>          qemu.conf changes
>>
>>      v4
>>      - added qemu.conf option to dictate the default behavior for the
>>          deprecated_features attribute (Boris)
>>      - added qemuxmlactivetests (Boris)
>>      - snuck in missing documentation for deprecated_features in
>>          formatdomain.rst
>>
>>      v3
>>      - added qemu caps check to avoid breaking s390 guests trying to
>>          default deprecated_features='off' on QEMU versions that
>>          do not support reporting these features
>>
>>      v2
>>      - changed behavior from disabling features on the host model to
>>          instead flagging the guest CPU to disable deprecated features
>>      - removed disabling deprecated features on host model in
>>          virQEMUCapsInitCPUModelS390
>>      - added flagging deprecated_feats in qemuProcessUpdateGuestCPU
>>      - added tests for deprecated_features='on'
>>      - split virQEMUCapsUpdateCPUDeprecatedFeatures update and
>>          qemuProcessUpdateGuestCPU changes
>>
>> The intention of reporting deprecated features and modifying the guest
>> CPU model was to alleviate the user from the burden of preparing a guest
>> with the necessary amendments to assure migration to newer hardware.
>> While that goal was met by way of the "deprecated_features='on|off'"
>> attribute, it still adds an extra step that the user must be aware to
>> prepare a guest for migration and the errors that stem from an
>> unsuccessful migration (due to feature incompatibility) is not always
>> clear how to resolve.
>>
>> These patches make s390 CPU *host models* migration ready from the get-go
>> by introducing a qemu.conf option for disabling deprecated features by
>> default.  They may still be disabled for other model types via the
>> respective attribute, or reenabled if desired.  The configured behavior
>> may be overridden by explicitly providing the attribute within the
>> guest XML.
> 
> The patch series sounds reasonable to me, so FWIW:
> 
> Series
> Acked-by: Thomas Huth <thuth@redhat.com>
> 
> Peter, Michal, could we still get this merged for libvirt 11.6 ?
> 
>   Thomas

Thanks for the Ack and helping to move this along.

I've posted a patch to the list for NEWS mentioning this features in
case this series is accepted in time for 11.6.

-- 
Regards,
  Collin
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Jiri Denemark via Devel 4 months, 3 weeks ago
On Thu, Jul 24, 2025 at 14:39:02 -0400, Collin Walling wrote:
> On 7/24/25 03:35, Thomas Huth via Devel wrote:
> > On 30/06/2025 05.19, Collin Walling wrote:
> >> Changelog
> >>
> >>      v5
> >>      - dropped the "none" test in qemuxmlactivetest (see commit for
> >>          details)
> >>      - reordered patches to introduce some tests first, then add
> >>          qemu.conf changes
> >>
> >>      v4
> >>      - added qemu.conf option to dictate the default behavior for the
> >>          deprecated_features attribute (Boris)
> >>      - added qemuxmlactivetests (Boris)
> >>      - snuck in missing documentation for deprecated_features in
> >>          formatdomain.rst
> >>
> >>      v3
> >>      - added qemu caps check to avoid breaking s390 guests trying to
> >>          default deprecated_features='off' on QEMU versions that
> >>          do not support reporting these features
> >>
> >>      v2
> >>      - changed behavior from disabling features on the host model to
> >>          instead flagging the guest CPU to disable deprecated features
> >>      - removed disabling deprecated features on host model in
> >>          virQEMUCapsInitCPUModelS390
> >>      - added flagging deprecated_feats in qemuProcessUpdateGuestCPU
> >>      - added tests for deprecated_features='on'
> >>      - split virQEMUCapsUpdateCPUDeprecatedFeatures update and
> >>          qemuProcessUpdateGuestCPU changes
> >>
> >> The intention of reporting deprecated features and modifying the guest
> >> CPU model was to alleviate the user from the burden of preparing a guest
> >> with the necessary amendments to assure migration to newer hardware.
> >> While that goal was met by way of the "deprecated_features='on|off'"
> >> attribute, it still adds an extra step that the user must be aware to
> >> prepare a guest for migration and the errors that stem from an
> >> unsuccessful migration (due to feature incompatibility) is not always
> >> clear how to resolve.
> >>
> >> These patches make s390 CPU *host models* migration ready from the get-go
> >> by introducing a qemu.conf option for disabling deprecated features by
> >> default.  They may still be disabled for other model types via the
> >> respective attribute, or reenabled if desired.  The configured behavior
> >> may be overridden by explicitly providing the attribute within the
> >> guest XML.
> > 
> > The patch series sounds reasonable to me, so FWIW:
> > 
> > Series
> > Acked-by: Thomas Huth <thuth@redhat.com>
> > 
> > Peter, Michal, could we still get this merged for libvirt 11.6 ?
> > 
> >   Thomas
> 
> Thanks for the Ack and helping to move this along.
> 
> I've posted a patch to the list for NEWS mentioning this features in
> case this series is accepted in time for 11.6.

Both this series and the NEWS patch are pushed now.

Jirka
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Collin Walling 4 months, 3 weeks ago
On 7/25/25 09:53, Jiri Denemark via Devel wrote:
> On Thu, Jul 24, 2025 at 14:39:02 -0400, Collin Walling wrote:
>> On 7/24/25 03:35, Thomas Huth via Devel wrote:
>>> On 30/06/2025 05.19, Collin Walling wrote:
>>>> Changelog
>>>>
>>>>      v5
>>>>      - dropped the "none" test in qemuxmlactivetest (see commit for
>>>>          details)
>>>>      - reordered patches to introduce some tests first, then add
>>>>          qemu.conf changes
>>>>
>>>>      v4
>>>>      - added qemu.conf option to dictate the default behavior for the
>>>>          deprecated_features attribute (Boris)
>>>>      - added qemuxmlactivetests (Boris)
>>>>      - snuck in missing documentation for deprecated_features in
>>>>          formatdomain.rst
>>>>
>>>>      v3
>>>>      - added qemu caps check to avoid breaking s390 guests trying to
>>>>          default deprecated_features='off' on QEMU versions that
>>>>          do not support reporting these features
>>>>
>>>>      v2
>>>>      - changed behavior from disabling features on the host model to
>>>>          instead flagging the guest CPU to disable deprecated features
>>>>      - removed disabling deprecated features on host model in
>>>>          virQEMUCapsInitCPUModelS390
>>>>      - added flagging deprecated_feats in qemuProcessUpdateGuestCPU
>>>>      - added tests for deprecated_features='on'
>>>>      - split virQEMUCapsUpdateCPUDeprecatedFeatures update and
>>>>          qemuProcessUpdateGuestCPU changes
>>>>
>>>> The intention of reporting deprecated features and modifying the guest
>>>> CPU model was to alleviate the user from the burden of preparing a guest
>>>> with the necessary amendments to assure migration to newer hardware.
>>>> While that goal was met by way of the "deprecated_features='on|off'"
>>>> attribute, it still adds an extra step that the user must be aware to
>>>> prepare a guest for migration and the errors that stem from an
>>>> unsuccessful migration (due to feature incompatibility) is not always
>>>> clear how to resolve.
>>>>
>>>> These patches make s390 CPU *host models* migration ready from the get-go
>>>> by introducing a qemu.conf option for disabling deprecated features by
>>>> default.  They may still be disabled for other model types via the
>>>> respective attribute, or reenabled if desired.  The configured behavior
>>>> may be overridden by explicitly providing the attribute within the
>>>> guest XML.
>>>
>>> The patch series sounds reasonable to me, so FWIW:
>>>
>>> Series
>>> Acked-by: Thomas Huth <thuth@redhat.com>
>>>
>>> Peter, Michal, could we still get this merged for libvirt 11.6 ?
>>>
>>>   Thomas
>>
>> Thanks for the Ack and helping to move this along.
>>
>> I've posted a patch to the list for NEWS mentioning this features in
>> case this series is accepted in time for 11.6.
> 
> Both this series and the NEWS patch are pushed now.
> 
> Jirka

Thanks!

-- 
Regards,
  Collin
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Collin Walling 4 months, 3 weeks ago
On 6/29/25 23:19, Collin Walling wrote:

Pinging again, since it's been about three weeks since the last bump.
Unless these patches are satisfactory, please inform on what needs to
change.


-- 
Regards,
  Collin
Re: [PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
Posted by Collin Walling 5 months ago
On 6/29/25 11:19 PM, Collin Walling wrote:

Pinging this series once.  Would like to know if there's any further
feedback or if these patches are good enough.  Thanks for your time.

[...]


-- 
Regards,
  Collin