Commit 9f1248f823 for qemu.org

commit 9f1248f823b2d74c54be0f3338dbb497a4aeb219
Author: Joshua Daley <jdaley@linux.ibm.com>
Date:   Thu Sep 3 17:58:04 2026 +0200

    tests/functional/s390x/test_secure_ipl: Skip test if SIPL not supported by hypervisor

    Currently, if secure IPL is not supported by the hypervisor, the test
    will fail because "Verified component" never appears. One must inspect
    the console log to observe the cause of the failure.

    Add a check that skips the test if the host CPU model is missing the
    secure IPL facilities.

    Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
    Reviewed-by: Jared Rossi <jrossi@linux.ibm.com>
    Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
    Reviewed-by: Zhuoying Cai <zycai@linux.ibm.com>
    Link: https://lore.kernel.org/qemu-devel/20260903155805.1881366-3-jdaley@linux.ibm.com
    Signed-off-by: Eric Farman <farman@linux.ibm.com>

diff --git a/tests/functional/s390x/test_secure_ipl.py b/tests/functional/s390x/test_secure_ipl.py
index 06fc93e404..5af36b91d8 100755
--- a/tests/functional/s390x/test_secure_ipl.py
+++ b/tests/functional/s390x/test_secure_ipl.py
@@ -29,6 +29,22 @@ def __init__(self, *args, **kwargs):
         self.cert_path = None
         self.prompt = None

+    def _require_host_secure_ipl_support(self, vm):
+        """
+        Skip the test if the host CPU model does not expose the Secure IPL
+        facilities (sipl, sclaf, cstore).
+        """
+        props = vm.cmd('query-cpu-model-expansion',
+                       model={'name': 'host'},
+                       type='full')['model']['props']
+        missing = [f for f in ('sipl', 'sclaf', 'cstore')
+                   if not props.get(f)]
+        if missing:
+            self.skipTest(
+                f"Host CPU does not support Secure IPL: "
+                f"missing feature(s): {', '.join(missing)}. "
+                f"Secure IPL requires a z16+ host.")
+
     def _create_certificate(self, vm):
         """Generate x509 certificate"""
         exec_command_and_wait_for_pattern(self,
@@ -107,6 +123,8 @@ def setup_s390x_secure_ipl(self):
                          '-device', 'virtio-blk-ccw,drive=drive0,bootindex=1')
         temp_vm.launch()

+        self._require_host_secure_ipl_support(temp_vm)
+
         # Initial root account setup (Fedora first boot screen)
         self.root_password = 'fedora40password'
         wait_for_console_pattern(self, 'Please make a selection from the above',