From baf18f05fddde80ddd86abe3470463ac7d7d4b8e Mon Sep 17 00:00:00 2001 From: Jon Maloy Date: Wed, 12 Nov 2025 12:56:14 -0500 Subject: [PATCH] * Wed Nov 12 2025 Jon Maloy - 10.1.0-3 - kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch [RHEL-73009] - kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch [RHEL-73009] - kvm-vfio-rename-field-to-num_initial_regions.patch [RHEL-122919] - kvm-vfio-only-check-region-info-cache-for-initial-region.patch [RHEL-122919] - kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch [RHEL-105902] - Resolves: RHEL-73009 ([IBM 9.8 FEAT] KVM: Implement Control Program Identification (qemu)) - Resolves: RHEL-122919 ([RHEL 9.8] Windows 11 VM fails to boot up with ramfb='on' with QEMU 10.1) - Resolves: RHEL-105902 (Add new -rhel9.8.0 machine type to qemu-kvm [x86_64]) --- ...0x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch | 87 ++++++ ...ctional-add-tests-for-SCLP-event-CPI.patch | 76 ++++++ ...region-info-cache-for-initial-region.patch | 83 ++++++ ...-rename-field-to-num_initial_regions.patch | 253 ++++++++++++++++++ ...new-pc-q35-machine-type-for-rhel-9.8.patch | 65 +++++ qemu-kvm.spec | 25 +- 6 files changed, 588 insertions(+), 1 deletion(-) create mode 100644 kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch create mode 100644 kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch create mode 100644 kvm-vfio-only-check-region-info-cache-for-initial-region.patch create mode 100644 kvm-vfio-rename-field-to-num_initial_regions.patch create mode 100644 kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch diff --git a/kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch b/kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch new file mode 100644 index 0000000..91ecb42 --- /dev/null +++ b/kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch @@ -0,0 +1,87 @@ +From 7a20dca1405b6d7c202fa852b1f3dd505baab7e5 Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Thu, 16 Oct 2025 14:17:07 +0200 +Subject: [PATCH 1/5] qapi/machine-s390x: add QAPI event + SCLP_CPI_INFO_AVAILABLE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Thomas Huth +RH-MergeRequest: 415: Patches for the Control Program Identification feature on s390x +RH-Jira: RHEL-73009 +RH-Acked-by: Cédric Le Goater +RH-Acked-by: Miroslav Rezanina +RH-Commit: [1/2] 8fb4f174652f3ca889d7623df09eb6c202c0c5cc (thuth/qemu-kvm-cs) + +JIRA: https://issues.redhat.com/browse/RHEL-73009 + +Add QAPI event SCLP_CPI_INFO_AVAILABLE to notify the availability +of Control-Program Identification data in QOM. + +Signed-off-by: Shalini Chellathurai Saroja +Suggested-by: Thomas Huth +Reviewed-by: Hendrik Brueckner +Reviewed-by: Thomas Huth +Message-ID: <20251016121708.334133-1-shalini@linux.ibm.com> +Signed-off-by: Thomas Huth +(cherry picked from commit 0ce63280dc6fe9fce1d89922f2d17dcae77827e6) +--- + hw/s390x/sclpcpi.c | 4 ++++ + qapi/machine-s390x.json | 21 +++++++++++++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c +index 7aa039d510..68fc1b809b 100644 +--- a/hw/s390x/sclpcpi.c ++++ b/hw/s390x/sclpcpi.c +@@ -54,6 +54,7 @@ + #include "hw/s390x/event-facility.h" + #include "hw/s390x/ebcdic.h" + #include "qapi/qapi-visit-machine.h" ++#include "qapi/qapi-events-machine-s390x.h" + #include "migration/vmstate.h" + + typedef struct Data { +@@ -106,6 +107,9 @@ static int write_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr) + e->timestamp = qemu_clock_get_ns(QEMU_CLOCK_HOST); + + cpim->ebh.flags = SCLP_EVENT_BUFFER_ACCEPTED; ++ ++ qapi_event_send_sclp_cpi_info_available(); ++ + return SCLP_RC_NORMAL_COMPLETION; + } + +diff --git a/qapi/machine-s390x.json b/qapi/machine-s390x.json +index 966dbd61d2..8412668b67 100644 +--- a/qapi/machine-s390x.json ++++ b/qapi/machine-s390x.json +@@ -119,3 +119,24 @@ + { 'command': 'query-s390x-cpu-polarization', 'returns': 'CpuPolarizationInfo', + 'features': [ 'unstable' ] + } ++ ++## ++# @SCLP_CPI_INFO_AVAILABLE: ++# ++# Emitted when the Control-Program Identification data is available ++# in the QOM tree. ++# ++# Features: ++# ++# @unstable: This event is experimental. ++# ++# Since: 10.2 ++# ++# .. qmp-example:: ++# ++# <- { "event": "SCLP_CPI_INFO_AVAILABLE", ++# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } ++## ++{ 'event': 'SCLP_CPI_INFO_AVAILABLE', ++ 'features': [ 'unstable' ] ++} +-- +2.50.1 + diff --git a/kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch b/kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch new file mode 100644 index 0000000..22fd29b --- /dev/null +++ b/kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch @@ -0,0 +1,76 @@ +From d2dd32d1a91ed51e4704e02ffc5f518c3faff076 Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Thu, 16 Oct 2025 14:17:08 +0200 +Subject: [PATCH 2/5] tests/functional: add tests for SCLP event CPI +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Thomas Huth +RH-MergeRequest: 415: Patches for the Control Program Identification feature on s390x +RH-Jira: RHEL-73009 +RH-Acked-by: Cédric Le Goater +RH-Acked-by: Miroslav Rezanina +RH-Commit: [2/2] 291362fe226f583c66ddc480b2f0f6be9c6cbf3f (thuth/qemu-kvm-cs) + +JIRA: https://issues.redhat.com/browse/RHEL-73009 + +Add tests for SCLP event type Control-Program Identification. + +Signed-off-by: Shalini Chellathurai Saroja +Suggested-by: Thomas Huth +Reviewed-by: Hendrik Brueckner +Reviewed-by Thomas Huth +Message-ID: <20251016121708.334133-2-shalini@linux.ibm.com> +Signed-off-by: Thomas Huth +(cherry picked from commit bc436b739c3c8683ef5e8c22391952dcaa95242e) +--- + tests/functional/test_s390x_ccw_virtio.py | 26 +++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/tests/functional/test_s390x_ccw_virtio.py b/tests/functional/test_s390x_ccw_virtio.py +index 453711aa0f..0455337856 100755 +--- a/tests/functional/test_s390x_ccw_virtio.py ++++ b/tests/functional/test_s390x_ccw_virtio.py +@@ -15,6 +15,7 @@ + import tempfile + + from qemu_test import QemuSystemTest, Asset ++from qemu_test import exec_command + from qemu_test import exec_command_and_wait_for_pattern + from qemu_test import wait_for_console_pattern + +@@ -270,5 +271,30 @@ def test_s390x_fedora(self): + 'while ! (dmesg -c | grep Start.virtcrypto_remove) ; do' + ' sleep 1 ; done', 'Start virtcrypto_remove.') + ++ # Test SCLP event Control-Program Identification (CPI) ++ cpi = '/sys/firmware/cpi/' ++ sclpcpi = '/machine/sclp/s390-sclp-event-facility/sclpcpi' ++ self.log.info("Test SCLP event CPI") ++ exec_command(self, 'echo TESTVM > ' + cpi + 'system_name') ++ exec_command(self, 'echo LINUX > ' + cpi + 'system_type') ++ exec_command(self, 'echo TESTPLEX > ' + cpi + 'sysplex_name') ++ exec_command(self, 'echo 0x001a000000060b00 > ' + cpi + 'system_level') ++ exec_command_and_wait_for_pattern(self, ++ 'echo 1 > ' + cpi + 'set', ':/#') ++ try: ++ event = self.vm.event_wait('SCLP_CPI_INFO_AVAILABLE') ++ except TimeoutError: ++ self.fail('Timed out waiting for the SCLP_CPI_INFO_AVAILABLE event') ++ ts = self.vm.cmd('qom-get', path=sclpcpi, property='timestamp') ++ self.assertNotEqual(ts, 0) ++ name = self.vm.cmd('qom-get', path=sclpcpi, property='system_name') ++ self.assertEqual(name.strip(), 'TESTVM') ++ typ = self.vm.cmd('qom-get', path=sclpcpi, property='system_type') ++ self.assertEqual(typ.strip(), 'LINUX') ++ sysplex = self.vm.cmd('qom-get', path=sclpcpi, property='sysplex_name') ++ self.assertEqual(sysplex.strip(), 'TESTPLEX') ++ level = self.vm.cmd('qom-get', path=sclpcpi, property='system_level') ++ self.assertEqual(level, 0x001a000000060b00) ++ + if __name__ == '__main__': + QemuSystemTest.main() +-- +2.50.1 + diff --git a/kvm-vfio-only-check-region-info-cache-for-initial-region.patch b/kvm-vfio-only-check-region-info-cache-for-initial-region.patch new file mode 100644 index 0000000..5a2b57d --- /dev/null +++ b/kvm-vfio-only-check-region-info-cache-for-initial-region.patch @@ -0,0 +1,83 @@ +From 55538f619363b8535d459306eb22880c1bae6668 Mon Sep 17 00:00:00 2001 +From: John Levon +Date: Tue, 14 Oct 2025 17:12:27 +0200 +Subject: [PATCH 4/5] vfio: only check region info cache for initial regions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Cédric Le Goater +RH-MergeRequest: 418: [rhel 9.8] Fixes for vfio region cache +RH-Jira: RHEL-122919 +RH-Acked-by: Eric Auger +RH-Acked-by: Thomas Huth +RH-Commit: [2/2] 44f5fd7713ab2711c926ef3da0471d432830feb6 (clegoate/qemu-kvm-centos) + +It is semantically valid for a VFIO device to increase the number of +regions after initialization. In this case, we'd attempt to check for +cached region info past the size of the ->reginfo array. Check for the +region index and skip the cache in these cases. + +This also works around some VGPU use cases which appear to be a bug, +where VFIO_DEVICE_QUERY_GFX_PLANE returns a region index beyond the +reported ->num_regions. + +Fixes: 95cdb024 ("vfio: add region info cache") +Signed-off-by: John Levon +Reviewed-by: Cédric Le Goater +Reviewed-by: Alex Williamson +Link: https://lore.kernel.org/qemu-devel/20251014151227.2298892-3-john.levon@nutanix.com +Signed-off-by: Cédric Le Goater +(cherry picked from commit ecbe424a63c9f860a901d6a4a75724b046abd796) +--- + hw/vfio/device.c | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +diff --git a/hw/vfio/device.c b/hw/vfio/device.c +index 0b459c0f7c..7ebf41c95e 100644 +--- a/hw/vfio/device.c ++++ b/hw/vfio/device.c +@@ -205,10 +205,19 @@ int vfio_device_get_region_info(VFIODevice *vbasedev, int index, + int fd = -1; + int ret; + +- /* check cache */ +- if (vbasedev->reginfo[index] != NULL) { +- *info = vbasedev->reginfo[index]; +- return 0; ++ /* ++ * We only set up the region info cache for the initial number of regions. ++ * ++ * Since a VFIO device may later increase the number of regions then use ++ * such regions with an index past ->num_initial_regions, don't attempt to ++ * use the info cache in those cases. ++ */ ++ if (index < vbasedev->num_initial_regions) { ++ /* check cache */ ++ if (vbasedev->reginfo[index] != NULL) { ++ *info = vbasedev->reginfo[index]; ++ return 0; ++ } + } + + *info = g_malloc0(argsz); +@@ -236,10 +245,12 @@ retry: + goto retry; + } + +- /* fill cache */ +- vbasedev->reginfo[index] = *info; +- if (vbasedev->region_fds != NULL) { +- vbasedev->region_fds[index] = fd; ++ if (index < vbasedev->num_initial_regions) { ++ /* fill cache */ ++ vbasedev->reginfo[index] = *info; ++ if (vbasedev->region_fds != NULL) { ++ vbasedev->region_fds[index] = fd; ++ } + } + + return 0; +-- +2.50.1 + diff --git a/kvm-vfio-rename-field-to-num_initial_regions.patch b/kvm-vfio-rename-field-to-num_initial_regions.patch new file mode 100644 index 0000000..0e97f9d --- /dev/null +++ b/kvm-vfio-rename-field-to-num_initial_regions.patch @@ -0,0 +1,253 @@ +From 0f8fdd302d8d849b3d428245e1205f83c18309fb Mon Sep 17 00:00:00 2001 +From: John Levon +Date: Tue, 14 Oct 2025 17:12:26 +0200 +Subject: [PATCH 3/5] vfio: rename field to "num_initial_regions" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Cédric Le Goater +RH-MergeRequest: 418: [rhel 9.8] Fixes for vfio region cache +RH-Jira: RHEL-122919 +RH-Acked-by: Eric Auger +RH-Acked-by: Thomas Huth +RH-Commit: [1/2] 029ef0bf2c6e2268f231f4ccd2b8db61624e468d (clegoate/qemu-kvm-centos) + +We set VFIODevice::num_regions at initialization time, and do not +otherwise refresh it. As it is valid in theory for a VFIO device to +later increase the number of supported regions, rename the field to +"num_initial_regions" to better reflect its semantics. + +Signed-off-by: John Levon +Reviewed-by: Cédric Le Goater +Reviewed-by: Alex Williamson +Link: https://lore.kernel.org/qemu-devel/20251014151227.2298892-2-john.levon@nutanix.com +Signed-off-by: Cédric Le Goater +(cherry picked from commit aaca725884b57c9245528a0afb3f32e078543faf) + +Conflicts: Modified hw/core/sysbus-fdt.c and hw/vfio/platform.c +--- + hw/core/sysbus-fdt.c | 14 +++++++------- + hw/vfio-user/device.c | 2 +- + hw/vfio/ccw.c | 4 ++-- + hw/vfio/device.c | 12 ++++++------ + hw/vfio/iommufd.c | 3 ++- + hw/vfio/pci.c | 4 ++-- + hw/vfio/platform.c | 10 +++++----- + include/hw/vfio/vfio-device.h | 2 +- + 8 files changed, 26 insertions(+), 25 deletions(-) + +diff --git a/hw/core/sysbus-fdt.c b/hw/core/sysbus-fdt.c +index c339a27875..1e1966813f 100644 +--- a/hw/core/sysbus-fdt.c ++++ b/hw/core/sysbus-fdt.c +@@ -236,15 +236,15 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) + + qemu_fdt_setprop(fdt, nodename, "dma-coherent", "", 0); + +- reg_attr = g_new(uint32_t, vbasedev->num_regions * 2); +- for (i = 0; i < vbasedev->num_regions; i++) { ++ reg_attr = g_new(uint32_t, vbasedev->num_initial_regions * 2); ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + mmio_base = platform_bus_get_mmio_addr(pbus, sbdev, i); + reg_attr[2 * i] = cpu_to_be32(mmio_base); + reg_attr[2 * i + 1] = cpu_to_be32( + memory_region_size(vdev->regions[i]->mem)); + } + qemu_fdt_setprop(fdt, nodename, "reg", reg_attr, +- vbasedev->num_regions * 2 * sizeof(uint32_t)); ++ vbasedev->num_initial_regions * 2 * sizeof(uint32_t)); + + irq_attr = g_new(uint32_t, vbasedev->num_irqs * 3); + for (i = 0; i < vbasedev->num_irqs; i++) { +@@ -330,7 +330,7 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev, void *opaque) + + g_free(dt_name); + +- if (vbasedev->num_regions != 5) { ++ if (vbasedev->num_initial_regions != 5) { + error_report("%s Does the host dt node combine XGBE/PHY?", __func__); + exit(1); + } +@@ -374,15 +374,15 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev, void *opaque) + guest_clock_phandles[0], + guest_clock_phandles[1]); + +- reg_attr = g_new(uint32_t, vbasedev->num_regions * 2); +- for (i = 0; i < vbasedev->num_regions; i++) { ++ reg_attr = g_new(uint32_t, vbasedev->num_initial_regions * 2); ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + mmio_base = platform_bus_get_mmio_addr(pbus, sbdev, i); + reg_attr[2 * i] = cpu_to_be32(mmio_base); + reg_attr[2 * i + 1] = cpu_to_be32( + memory_region_size(vdev->regions[i]->mem)); + } + qemu_fdt_setprop(guest_fdt, nodename, "reg", reg_attr, +- vbasedev->num_regions * 2 * sizeof(uint32_t)); ++ vbasedev->num_initial_regions * 2 * sizeof(uint32_t)); + + irq_attr = g_new(uint32_t, vbasedev->num_irqs * 3); + for (i = 0; i < vbasedev->num_irqs; i++) { +diff --git a/hw/vfio-user/device.c b/hw/vfio-user/device.c +index 0609a7dc25..64ef35b320 100644 +--- a/hw/vfio-user/device.c ++++ b/hw/vfio-user/device.c +@@ -134,7 +134,7 @@ static int vfio_user_device_io_get_region_info(VFIODevice *vbasedev, + VFIOUserFDs fds = { 0, 1, fd}; + int ret; + +- if (info->index > vbasedev->num_regions) { ++ if (info->index > vbasedev->num_initial_regions) { + return -EINVAL; + } + +diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c +index 9560b8d851..4d9588e7aa 100644 +--- a/hw/vfio/ccw.c ++++ b/hw/vfio/ccw.c +@@ -484,9 +484,9 @@ static bool vfio_ccw_get_region(VFIOCCWDevice *vcdev, Error **errp) + * We always expect at least the I/O region to be present. We also + * may have a variable number of regions governed by capabilities. + */ +- if (vdev->num_regions < VFIO_CCW_CONFIG_REGION_INDEX + 1) { ++ if (vdev->num_initial_regions < VFIO_CCW_CONFIG_REGION_INDEX + 1) { + error_setg(errp, "vfio: too few regions (%u), expected at least %u", +- vdev->num_regions, VFIO_CCW_CONFIG_REGION_INDEX + 1); ++ vdev->num_initial_regions, VFIO_CCW_CONFIG_REGION_INDEX + 1); + return false; + } + +diff --git a/hw/vfio/device.c b/hw/vfio/device.c +index 52a1996dc4..0b459c0f7c 100644 +--- a/hw/vfio/device.c ++++ b/hw/vfio/device.c +@@ -257,7 +257,7 @@ int vfio_device_get_region_info_type(VFIODevice *vbasedev, uint32_t type, + { + int i; + +- for (i = 0; i < vbasedev->num_regions; i++) { ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + struct vfio_info_cap_header *hdr; + struct vfio_region_info_cap_type *cap_type; + +@@ -466,7 +466,7 @@ void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainerBase *bcontainer, + int i; + + vbasedev->num_irqs = info->num_irqs; +- vbasedev->num_regions = info->num_regions; ++ vbasedev->num_initial_regions = info->num_regions; + vbasedev->flags = info->flags; + vbasedev->reset_works = !!(info->flags & VFIO_DEVICE_FLAGS_RESET); + +@@ -476,10 +476,10 @@ void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainerBase *bcontainer, + QLIST_INSERT_HEAD(&vfio_device_list, vbasedev, global_next); + + vbasedev->reginfo = g_new0(struct vfio_region_info *, +- vbasedev->num_regions); ++ vbasedev->num_initial_regions); + if (vbasedev->use_region_fds) { +- vbasedev->region_fds = g_new0(int, vbasedev->num_regions); +- for (i = 0; i < vbasedev->num_regions; i++) { ++ vbasedev->region_fds = g_new0(int, vbasedev->num_initial_regions); ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + vbasedev->region_fds[i] = -1; + } + } +@@ -489,7 +489,7 @@ void vfio_device_unprepare(VFIODevice *vbasedev) + { + int i; + +- for (i = 0; i < vbasedev->num_regions; i++) { ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + g_free(vbasedev->reginfo[i]); + if (vbasedev->region_fds != NULL && vbasedev->region_fds[i] != -1) { + close(vbasedev->region_fds[i]); +diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c +index 48c590b6a9..dbcd861b27 100644 +--- a/hw/vfio/iommufd.c ++++ b/hw/vfio/iommufd.c +@@ -668,7 +668,8 @@ found_container: + vfio_iommufd_cpr_register_device(vbasedev); + + trace_iommufd_cdev_device_info(vbasedev->name, devfd, vbasedev->num_irqs, +- vbasedev->num_regions, vbasedev->flags); ++ vbasedev->num_initial_regions, ++ vbasedev->flags); + return true; + + err_listener_register: +diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c +index 48da233cb2..9486521a90 100644 +--- a/hw/vfio/pci.c ++++ b/hw/vfio/pci.c +@@ -2933,9 +2933,9 @@ bool vfio_pci_populate_device(VFIOPCIDevice *vdev, Error **errp) + return false; + } + +- if (vbasedev->num_regions < VFIO_PCI_CONFIG_REGION_INDEX + 1) { ++ if (vbasedev->num_initial_regions < VFIO_PCI_CONFIG_REGION_INDEX + 1) { + error_setg(errp, "unexpected number of io regions %u", +- vbasedev->num_regions); ++ vbasedev->num_initial_regions); + return false; + } + +diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c +index 5c1795a26f..c9349ba7b7 100644 +--- a/hw/vfio/platform.c ++++ b/hw/vfio/platform.c +@@ -148,7 +148,7 @@ static void vfio_mmap_set_enabled(VFIOPlatformDevice *vdev, bool enabled) + { + int i; + +- for (i = 0; i < vdev->vbasedev.num_regions; i++) { ++ for (i = 0; i < vdev->vbasedev.num_initial_regions; i++) { + vfio_region_mmaps_set_enabled(vdev->regions[i], enabled); + } + } +@@ -453,9 +453,9 @@ static bool vfio_populate_device(VFIODevice *vbasedev, Error **errp) + return false; + } + +- vdev->regions = g_new0(VFIORegion *, vbasedev->num_regions); ++ vdev->regions = g_new0(VFIORegion *, vbasedev->num_initial_regions); + +- for (i = 0; i < vbasedev->num_regions; i++) { ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + char *name = g_strdup_printf("VFIO %s region %d\n", vbasedev->name, i); + + vdev->regions[i] = g_new0(VFIORegion, 1); +@@ -499,7 +499,7 @@ irq_err: + g_free(intp); + } + reg_error: +- for (i = 0; i < vbasedev->num_regions; i++) { ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + if (vdev->regions[i]) { + vfio_region_finalize(vdev->regions[i]); + } +@@ -608,7 +608,7 @@ static void vfio_platform_realize(DeviceState *dev, Error **errp) + } + } + +- for (i = 0; i < vbasedev->num_regions; i++) { ++ for (i = 0; i < vbasedev->num_initial_regions; i++) { + if (vfio_region_mmap(vdev->regions[i])) { + warn_report("%s mmap unsupported, performance may be slow", + memory_region_name(vdev->regions[i]->mem)); +diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h +index 9290774299..df81d319b2 100644 +--- a/include/hw/vfio/vfio-device.h ++++ b/include/hw/vfio/vfio-device.h +@@ -74,7 +74,7 @@ typedef struct VFIODevice { + VFIODeviceOps *ops; + VFIODeviceIOOps *io_ops; + unsigned int num_irqs; +- unsigned int num_regions; ++ unsigned int num_initial_regions; + unsigned int flags; + VFIOMigration *migration; + Error *migration_blocker; +-- +2.50.1 + diff --git a/kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch b/kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch new file mode 100644 index 0000000..7530ec0 --- /dev/null +++ b/kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch @@ -0,0 +1,65 @@ +From 39b03eb8d0a385412f4869fee1119bbac060e55d Mon Sep 17 00:00:00 2001 +From: Sebastian Ott +Date: Wed, 22 Oct 2025 17:09:27 +0200 +Subject: [PATCH 5/5] x86: create new pc-q35 machine type for rhel 9.8 + +RH-Author: Sebastian Ott +RH-MergeRequest: 413: x86: create new pc-q35 machine type for rhel 9.8 +RH-Jira: RHEL-105902 +RH-Acked-by: Thomas Huth +RH-Acked-by: Cornelia Huck +RH-Acked-by: Igor Mammedov +RH-Commit: [1/1] a18e7e378b691d92d9ec538e0efdd1a003f88972 (seott1/cos-qemu-kvm) + +Signed-off-by: Sebastian Ott +--- + hw/i386/pc_q35.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c +index a241f27c93..60c03c3102 100644 +--- a/hw/i386/pc_q35.c ++++ b/hw/i386/pc_q35.c +@@ -690,23 +690,35 @@ DEFINE_Q35_MACHINE(2, 6); + + /* Red Hat Enterprise Linux machine types */ + +-static void pc_q35_rhel_machine_9_6_0_options(MachineClass *m) ++static void pc_q35_rhel_machine_9_8_0_options(MachineClass *m) + { + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); + pc_q35_machine_options(m); +- m->desc = "RHEL-9.6.0 PC (Q35 + ICH9, 2009)"; ++ m->desc = "RHEL-9.8.0 PC (Q35 + ICH9, 2009)"; + pcmc->smbios_stream_product = "RHEL"; +- pcmc->smbios_stream_version = "9.6.0"; ++ pcmc->smbios_stream_version = "9.8.0"; + + /* NB: remember to move this line to the *latest* RHEL 9 machine */ + compat_props_add(m->compat_props, hw_compat_rhel_9, hw_compat_rhel_9_len); ++} ++DEFINE_Q35_MACHINE_AS_LATEST(9, 8, 0); ++ ++static void pc_q35_rhel_machine_9_6_0_options(MachineClass *m) ++{ ++ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); ++ pc_q35_rhel_machine_9_8_0_options(m); ++ m->desc = "RHEL-9.6.0 PC (Q35 + ICH9, 2009)"; ++ m->alias = NULL; ++ pcmc->smbios_stream_product = "RHEL"; ++ pcmc->smbios_stream_version = "9.6.0"; ++ + compat_props_add(m->compat_props, hw_compat_rhel_9_8, + hw_compat_rhel_9_8_len); + compat_props_add(m->compat_props, pc_rhel_9_8_compat, + pc_rhel_9_8_compat_len); + } + +-DEFINE_Q35_MACHINE_AS_LATEST(9, 6, 0); ++DEFINE_Q35_MACHINE(9, 6, 0); + + static void pc_q35_rhel_machine_9_4_0_options(MachineClass *m) + { +-- +2.50.1 + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index a474936..16b0138 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -149,7 +149,7 @@ Obsoletes: %{name}-block-ssh <= %{epoch}:%{version} \ Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 10.1.0 -Release: 2%{?rcrel}%{?dist}%{?cc_suffix} +Release: 3%{?rcrel}%{?dist}%{?cc_suffix} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped # Epoch 15 used for RHEL 8 # Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5) @@ -204,6 +204,16 @@ Patch29: 0029-target-i386-add-compatibility-property-for-pdcm-feat.patch Patch30: 0030-arm-create-new-virt-machine-type-for-rhel-9.8.patch # For RHEL-119369 - [rhel9] Backport "arm/kvm: report registers we failed to set" Patch31: kvm-arm-kvm-report-registers-we-failed-to-set.patch +# For RHEL-73009 - [IBM 9.8 FEAT] KVM: Implement Control Program Identification (qemu) +Patch32: kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch +# For RHEL-73009 - [IBM 9.8 FEAT] KVM: Implement Control Program Identification (qemu) +Patch33: kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch +# For RHEL-122919 - [RHEL 9.8] Windows 11 VM fails to boot up with ramfb='on' with QEMU 10.1 +Patch34: kvm-vfio-rename-field-to-num_initial_regions.patch +# For RHEL-122919 - [RHEL 9.8] Windows 11 VM fails to boot up with ramfb='on' with QEMU 10.1 +Patch35: kvm-vfio-only-check-region-info-cache-for-initial-region.patch +# For RHEL-105902 - Add new -rhel9.8.0 machine type to qemu-kvm [x86_64] +Patch36: kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch # For RHEL-11424 - [IBM 9.6 FEAT] KVM: Full boot order support - qemu part @@ -1918,6 +1928,19 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Wed Nov 12 2025 Jon Maloy - 10.1.0-3 +- kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch [RHEL-73009] +- kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch [RHEL-73009] +- kvm-vfio-rename-field-to-num_initial_regions.patch [RHEL-122919] +- kvm-vfio-only-check-region-info-cache-for-initial-region.patch [RHEL-122919] +- kvm-x86-create-new-pc-q35-machine-type-for-rhel-9.8.patch [RHEL-105902] +- Resolves: RHEL-73009 + ([IBM 9.8 FEAT] KVM: Implement Control Program Identification (qemu)) +- Resolves: RHEL-122919 + ([RHEL 9.8] Windows 11 VM fails to boot up with ramfb='on' with QEMU 10.1) +- Resolves: RHEL-105902 + (Add new -rhel9.8.0 machine type to qemu-kvm [x86_64]) + * Mon Nov 03 2025 Jon Maloy - 10.1.0-2 - kvm-arm-kvm-report-registers-we-failed-to-set.patch [RHEL-119369] - Resolves: RHEL-119369