[PULL 00/11] 11.1 compat machines and s390x updates

Cornelia Huck posted 11 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260423094856.270215-1-cohuck@redhat.com
Maintainers: Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Laurent Vivier <laurent@vivier.eu>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>
MAINTAINERS                            |   6 +-
configs/targets/s390x-softmmu.mak      |   1 +
hw/arm/virt.c                          |   9 +-
hw/core/machine.c                      |   3 +
hw/i386/pc.c                           |   3 +
hw/i386/pc_piix.c                      |  13 ++-
hw/i386/pc_q35.c                       |  13 ++-
hw/m68k/virt.c                         |   9 +-
hw/ppc/spapr.c                         |  15 ++-
hw/s390x/s390-virtio-ccw.c             |  40 ++++++-
include/hw/core/boards.h               |   3 +
include/hw/i386/pc.h                   |   3 +
target/s390x/cpu-system.c              |   2 +-
target/s390x/kvm/kvm.c                 |  64 ++++--------
target/s390x/mmu_helper.c              |   5 +-
target/s390x/tcg/excp_helper.c         |  21 ++--
target/s390x/tcg/mem_helper.c          |  12 ++-
target/s390x/tcg/translate_vx.c.inc    |   2 +-
tests/functional/s390x/meson.build     |   1 +
tests/functional/s390x/test_boot_4k.py | 138 +++++++++++++++++++++++++
20 files changed, 287 insertions(+), 76 deletions(-)
create mode 100755 tests/functional/s390x/test_boot_4k.py
[PULL 00/11] 11.1 compat machines and s390x updates
Posted by Cornelia Huck 1 month, 1 week ago
The following changes since commit 98b060da3a4f92b2a994ead5b16a87e783baf77c:

  Update version for v11.0.0 release (2026-04-21 16:28:47 +0100)

are available in the Git repository at:

  https://gitlab.com/cohuck/qemu tags/s390x-20260423

for you to fetch changes up to 83f5164d25634f9104b5fb4a6772766ae646ad59:

  hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) (2026-04-22 11:28:03 +0200)

----------------------------------------------------------------
First batch of updates for 11.1:
- compat machines for 11.1
- s390x: simplifications, cleanups, and a new test

----------------------------------------------------------------

Cornelia Huck (1):
  hw: add compat machines for 11.1

Eric Farman (1):
  MAINTAINERS: Update s390 trees

Jaehoon Kim (1):
  hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+)

Philippe Mathieu-Daudé (6):
  target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (cpu)
  target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (mmu)
  target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (tcg)
  target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (kvm)
  configs/targets: Restrict the legacy ldst_phys() API on s390x target
  target/s390x: Prefer MO_128 definition over magic value

Thomas Huth (2):
  target/s390x/kvm: Simplify the async pfault handling code
  tests/functional/s390x: Add test for booting from a disk with 4k
    sectors

 MAINTAINERS                            |   6 +-
 configs/targets/s390x-softmmu.mak      |   1 +
 hw/arm/virt.c                          |   9 +-
 hw/core/machine.c                      |   3 +
 hw/i386/pc.c                           |   3 +
 hw/i386/pc_piix.c                      |  13 ++-
 hw/i386/pc_q35.c                       |  13 ++-
 hw/m68k/virt.c                         |   9 +-
 hw/ppc/spapr.c                         |  15 ++-
 hw/s390x/s390-virtio-ccw.c             |  40 ++++++-
 include/hw/core/boards.h               |   3 +
 include/hw/i386/pc.h                   |   3 +
 target/s390x/cpu-system.c              |   2 +-
 target/s390x/kvm/kvm.c                 |  64 ++++--------
 target/s390x/mmu_helper.c              |   5 +-
 target/s390x/tcg/excp_helper.c         |  21 ++--
 target/s390x/tcg/mem_helper.c          |  12 ++-
 target/s390x/tcg/translate_vx.c.inc    |   2 +-
 tests/functional/s390x/meson.build     |   1 +
 tests/functional/s390x/test_boot_4k.py | 138 +++++++++++++++++++++++++
 20 files changed, 287 insertions(+), 76 deletions(-)
 create mode 100755 tests/functional/s390x/test_boot_4k.py

-- 
2.53.0


Re: [PULL 00/11] 11.1 compat machines and s390x updates
Posted by Stefan Hajnoczi 1 month ago
On Thu, Apr 23, 2026 at 5:50 AM Cornelia Huck <cohuck@redhat.com> wrote:

> The following changes since commit
> 98b060da3a4f92b2a994ead5b16a87e783baf77c:
>
>   Update version for v11.0.0 release (2026-04-21 16:28:47 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/cohuck/qemu tags/s390x-20260423
>
> for you to fetch changes up to 83f5164d25634f9104b5fb4a6772766ae646ad59:
>
>   hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) (2026-04-22
> 11:28:03 +0200)
>
> ----------------------------------------------------------------
> First batch of updates for 11.1:
> - compat machines for 11.1
> - s390x: simplifications, cleanups, and a new test
>

Hi Cornelia,
There is an s390x timeout regression in this pull request that reproduces
both in the CI and locally:

$ make check-functional-s390x
13/13 qemu:func-thorough+func-s390x-thorough+thorough /
func-s390x-ccw_virtio         TIMEOUT        420.07s   killed by signal 15
SIGTERM
>>> MESON_TEST_ITERATION=1
QEMU_TEST_QEMU_BINARY=/home/stefanha/qemu/build/qemu-system-s390x
ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1
QEMU_TEST_QEMU_IMG=/home/stefanha/qemu/build/qemu-img
LD_LIBRARY_PATH=/home/stefanha/qemu/build/tests/tcg/plugins:/home/stefanha/qemu/build/contrib/plugins
RUST_BACKTRACE=1
UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
PYTHONPATH=/home/stefanha/qemu/python:/home/stefanha/qemu/tests/functional
QEMU_TEST_GDB=/usr/bin/gdb MALLOC_PERTURB_=1
MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
MESON_BUILD_ROOT=/home/stefanha/qemu/build G_TEST_SLOW=1
/home/stefanha/qemu/build/pyvenv/bin/python3
/home/stefanha/qemu/tests/functional/s390x/test_ccw_virtio.py

Please send a v2 pull request with the issue resolved. Thanks!

Stefan


>
> ----------------------------------------------------------------
>
> Cornelia Huck (1):
>   hw: add compat machines for 11.1
>
> Eric Farman (1):
>   MAINTAINERS: Update s390 trees
>
> Jaehoon Kim (1):
>   hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+)
>
> Philippe Mathieu-Daudé (6):
>   target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (cpu)
>   target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (mmu)
>   target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (tcg)
>   target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (kvm)
>   configs/targets: Restrict the legacy ldst_phys() API on s390x target
>   target/s390x: Prefer MO_128 definition over magic value
>
> Thomas Huth (2):
>   target/s390x/kvm: Simplify the async pfault handling code
>   tests/functional/s390x: Add test for booting from a disk with 4k
>     sectors
>
>  MAINTAINERS                            |   6 +-
>  configs/targets/s390x-softmmu.mak      |   1 +
>  hw/arm/virt.c                          |   9 +-
>  hw/core/machine.c                      |   3 +
>  hw/i386/pc.c                           |   3 +
>  hw/i386/pc_piix.c                      |  13 ++-
>  hw/i386/pc_q35.c                       |  13 ++-
>  hw/m68k/virt.c                         |   9 +-
>  hw/ppc/spapr.c                         |  15 ++-
>  hw/s390x/s390-virtio-ccw.c             |  40 ++++++-
>  include/hw/core/boards.h               |   3 +
>  include/hw/i386/pc.h                   |   3 +
>  target/s390x/cpu-system.c              |   2 +-
>  target/s390x/kvm/kvm.c                 |  64 ++++--------
>  target/s390x/mmu_helper.c              |   5 +-
>  target/s390x/tcg/excp_helper.c         |  21 ++--
>  target/s390x/tcg/mem_helper.c          |  12 ++-
>  target/s390x/tcg/translate_vx.c.inc    |   2 +-
>  tests/functional/s390x/meson.build     |   1 +
>  tests/functional/s390x/test_boot_4k.py | 138 +++++++++++++++++++++++++
>  20 files changed, 287 insertions(+), 76 deletions(-)
>  create mode 100755 tests/functional/s390x/test_boot_4k.py
>
> --
> 2.53.0
>
>
>
Re: [PULL 00/11] 11.1 compat machines and s390x updates
Posted by Matthew Rosato 1 month ago
On 4/23/26 7:20 PM, Stefan Hajnoczi wrote:
> On Thu, Apr 23, 2026 at 5:50 AM Cornelia Huck <cohuck@redhat.com> wrote:
> 
>> The following changes since commit
>> 98b060da3a4f92b2a994ead5b16a87e783baf77c:
>>
>>   Update version for v11.0.0 release (2026-04-21 16:28:47 +0100)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/cohuck/qemu tags/s390x-20260423
>>
>> for you to fetch changes up to 83f5164d25634f9104b5fb4a6772766ae646ad59:
>>
>>   hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) (2026-04-22
>> 11:28:03 +0200)
>>
>> ----------------------------------------------------------------
>> First batch of updates for 11.1:
>> - compat machines for 11.1
>> - s390x: simplifications, cleanups, and a new test
>>
> 
> Hi Cornelia,
> There is an s390x timeout regression in this pull request that reproduces
> both in the CI and locally:
> 
> $ make check-functional-s390x
> 13/13 qemu:func-thorough+func-s390x-thorough+thorough /
> func-s390x-ccw_virtio         TIMEOUT        420.07s   killed by signal 15
> SIGTERM


Hi Connie, it looks to me like the failure is due to disabling legacy
virtio-pci by default for s390x starting with 11.1.

I was able to get the test to pass again with the diff below.  But
wasn't sure, do we only care about the default/latest machine version
for functional tests? 

diff --git a/tests/functional/s390x/test_ccw_virtio.py b/tests/functional/s390x/test_ccw_virtio.py
index 0455337856..1d4958bbe2 100755
--- a/tests/functional/s390x/test_ccw_virtio.py
+++ b/tests/functional/s390x/test_ccw_virtio.py
@@ -136,7 +136,7 @@ def test_s390x_devices(self):
                     r'0x1af4')
         exec_command_and_wait_for_pattern(self,
                     r'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_device',
-                    r'0x0001')
+                    r'0x1100')
         # check fid propagation
         exec_command_and_wait_for_pattern(self,
                     r'cat /sys/bus/pci/devices/000a\:00\:00.0/function_id',
@@ -203,7 +203,7 @@ def test_s390x_fedora(self):
                         'while ! (dmesg | grep enP7p0s0) ; do sleep 1 ; done',
                         'virtio_net virtio0 enP7p0s0: renamed')
         exec_command_and_wait_for_pattern(self, 'lspci',
-                             '0007:00:00.0 Class 0200: Device 1af4:1000')
+                             '0007:00:00.0 Class 0200: Device 1af4:1041')
         exec_command_and_wait_for_pattern(self,
                              'cat /sys/class/net/enP7p0s0/address',
                              '02:ca:fe:fa:ce:12')



Re: [PULL 00/11] 11.1 compat machines and s390x updates
Posted by Cornelia Huck 1 month ago
On Thu, Apr 23 2026, Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> On 4/23/26 7:20 PM, Stefan Hajnoczi wrote:
>> On Thu, Apr 23, 2026 at 5:50 AM Cornelia Huck <cohuck@redhat.com> wrote:
>> 
>>> The following changes since commit
>>> 98b060da3a4f92b2a994ead5b16a87e783baf77c:
>>>
>>>   Update version for v11.0.0 release (2026-04-21 16:28:47 +0100)
>>>
>>> are available in the Git repository at:
>>>
>>>   https://gitlab.com/cohuck/qemu tags/s390x-20260423
>>>
>>> for you to fetch changes up to 83f5164d25634f9104b5fb4a6772766ae646ad59:
>>>
>>>   hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) (2026-04-22
>>> 11:28:03 +0200)
>>>
>>> ----------------------------------------------------------------
>>> First batch of updates for 11.1:
>>> - compat machines for 11.1
>>> - s390x: simplifications, cleanups, and a new test
>>>
>> 
>> Hi Cornelia,
>> There is an s390x timeout regression in this pull request that reproduces
>> both in the CI and locally:
>> 
>> $ make check-functional-s390x
>> 13/13 qemu:func-thorough+func-s390x-thorough+thorough /
>> func-s390x-ccw_virtio         TIMEOUT        420.07s   killed by signal 15
>> SIGTERM
>
>
> Hi Connie, it looks to me like the failure is due to disabling legacy
> virtio-pci by default for s390x starting with 11.1.

Duh, I thought I did run all tests, but apparently not.

>
> I was able to get the test to pass again with the diff below.  But
> wasn't sure, do we only care about the default/latest machine version
> for functional tests? 
>
> diff --git a/tests/functional/s390x/test_ccw_virtio.py b/tests/functional/s390x/test_ccw_virtio.py
> index 0455337856..1d4958bbe2 100755
> --- a/tests/functional/s390x/test_ccw_virtio.py
> +++ b/tests/functional/s390x/test_ccw_virtio.py
> @@ -136,7 +136,7 @@ def test_s390x_devices(self):
>                      r'0x1af4')
>          exec_command_and_wait_for_pattern(self,
>                      r'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_device',
> -                    r'0x0001')
> +                    r'0x1100')
>          # check fid propagation
>          exec_command_and_wait_for_pattern(self,
>                      r'cat /sys/bus/pci/devices/000a\:00\:00.0/function_id',
> @@ -203,7 +203,7 @@ def test_s390x_fedora(self):
>                          'while ! (dmesg | grep enP7p0s0) ; do sleep 1 ; done',
>                          'virtio_net virtio0 enP7p0s0: renamed')
>          exec_command_and_wait_for_pattern(self, 'lspci',
> -                             '0007:00:00.0 Class 0200: Device 1af4:1000')
> +                             '0007:00:00.0 Class 0200: Device 1af4:1041')
>          exec_command_and_wait_for_pattern(self,
>                               'cat /sys/class/net/enP7p0s0/address',
>                               '02:ca:fe:fa:ce:12')

AFAICS we always run with the default (latest) machine, so adapting to
any changed output there is probably the way to go -- unless we want to
test various permutations of older machines, but I think that would get
out of hand pretty quickly.

Can you send this with proper tags, I'll just go ahead and merge it.