* Fri Jun 20 2025 Miroslav Rezanina <mrezanin@redhat.com> - 10.0.0-6
- kvm-scsi-disk-Add-native-FUA-write-support.patch [RHEL-71962] - kvm-Fix-handling-of-have_block_rbd.patch [RHEL-96057] - kvm-Delete-obsolete-references-to-architectures.patch [RHEL-96057] - kvm-Fix-arch-list-for-vgabios-and-ipxe-roms.patch [RHEL-96057] - kvm-Disable-virtio-net-pci-romfile-loading-on-riscv64.patch [RHEL-96057] - Resolves: RHEL-71962 ([RFE] Implement FUA support in scsi-disk) - Resolves: RHEL-96057 (qemu-kvm: Various small issues in the spec file)
This commit is contained in:
		
							parent
							
								
									fe4735fa0b
								
							
						
					
					
						commit
						8624cb6a2b
					
				
							
								
								
									
										54
									
								
								kvm-Disable-virtio-net-pci-romfile-loading-on-riscv64.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								kvm-Disable-virtio-net-pci-romfile-loading-on-riscv64.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,54 @@ | ||||
| From 12720b4c0434d9549f0e41ed5951890fdd9aedd4 Mon Sep 17 00:00:00 2001 | ||||
| From: Andrea Bolognani <abologna@redhat.com> | ||||
| Date: Tue, 10 Jun 2025 14:27:29 +0200 | ||||
| Subject: [PATCH 5/5] Disable virtio-net-pci romfile loading on riscv64 | ||||
| 
 | ||||
| RH-Author: Andrea Bolognani <None> | ||||
| RH-MergeRequest: 373: Various small fixes | ||||
| RH-Jira: RHEL-96057 | ||||
| RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com> | ||||
| RH-Commit: [4/4] b490ef3c3ab6a47f90c67016f685e19a65d97100 (abologna/centos-stream-qemu-kvm) | ||||
| 
 | ||||
| Same motivation for disabling it as on aarch64. | ||||
| 
 | ||||
| Signed-off-by: Andrea Bolognani <abologna@redhat.com> | ||||
| ---
 | ||||
|  hw/riscv/virt.c | 15 +++++++++++++++ | ||||
|  1 file changed, 15 insertions(+) | ||||
| 
 | ||||
| diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
 | ||||
| index b8d20575af..5b9291a906 100644
 | ||||
| --- a/hw/riscv/virt.c
 | ||||
| +++ b/hw/riscv/virt.c
 | ||||
| @@ -59,6 +59,18 @@
 | ||||
|  #include "hw/virtio/virtio-iommu.h" | ||||
|  #include "hw/uefi/var-service-api.h" | ||||
|   | ||||
| +/*
 | ||||
| + * virtio-net-pci variant romfiles are not needed because edk2 does
 | ||||
| + * fully support the pxe boot. Besides virtio romfiles are not shipped
 | ||||
| + * on rhel/riscv64.
 | ||||
| + */
 | ||||
| +static GlobalProperty riscv_virt_compat[] = {
 | ||||
| +    {"virtio-net-pci", "romfile", "" },
 | ||||
| +    {"virtio-net-pci-transitional", "romfile", "" },
 | ||||
| +    {"virtio-net-pci-non-transitional", "romfile", "" },
 | ||||
| +};
 | ||||
| +const size_t riscv_virt_compat_len = G_N_ELEMENTS(riscv_virt_compat);
 | ||||
| +
 | ||||
|  /* KVM AIA only supports APLIC MSI. APLIC Wired is always emulated by QEMU. */ | ||||
|  static bool virt_use_kvm_aia_aplic_imsic(RISCVVirtAIAType aia_type) | ||||
|  { | ||||
| @@ -1977,6 +1989,9 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
 | ||||
|                                NULL, NULL); | ||||
|      object_class_property_set_description(oc, "iommu-sys", | ||||
|                                            "Enable IOMMU platform device"); | ||||
| +
 | ||||
| +    compat_props_add(mc->compat_props, riscv_virt_compat,
 | ||||
| +                     riscv_virt_compat_len);
 | ||||
|  } | ||||
|   | ||||
|  static const TypeInfo virt_machine_typeinfo = { | ||||
| -- 
 | ||||
| 2.39.3 | ||||
| 
 | ||||
							
								
								
									
										169
									
								
								kvm-scsi-disk-Add-native-FUA-write-support.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										169
									
								
								kvm-scsi-disk-Add-native-FUA-write-support.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,169 @@ | ||||
| From 776febe2ec5735280ea562309cddf54b1b93a673 Mon Sep 17 00:00:00 2001 | ||||
| From: Alberto Faria <afaria@redhat.com> | ||||
| Date: Fri, 2 May 2025 13:11:14 +0100 | ||||
| Subject: [PATCH 1/5] scsi-disk: Add native FUA write support | ||||
| 
 | ||||
| RH-Author: Alberto Faria <None> | ||||
| RH-MergeRequest: 374: scsi-disk: Add FUA write support | ||||
| RH-Jira: RHEL-71962 | ||||
| RH-Acked-by: Kevin Wolf <kwolf@redhat.com> | ||||
| RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com> | ||||
| RH-Commit: [1/1] c51c618a2d8f027422b603b9ced89d000cbf5fa1 | ||||
| 
 | ||||
| Simply propagate the FUA flag on write requests to the driver. The block | ||||
| layer will emulate it if necessary. | ||||
| 
 | ||||
| Signed-off-by: Alberto Faria <afaria@redhat.com> | ||||
| Message-ID: <20250502121115.3613717-2-afaria@redhat.com> | ||||
| Reviewed-by: Kevin Wolf <kwolf@redhat.com> | ||||
| Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||||
| (cherry picked from commit e460991883d7209d52d0fdb534d9cd8cce0f9cce) | ||||
| Signed-off-by: Alberto Faria <afaria@redhat.com> | ||||
| ---
 | ||||
|  hw/scsi/scsi-disk.c | 53 +++++++++++++-------------------------------- | ||||
|  1 file changed, 15 insertions(+), 38 deletions(-) | ||||
| 
 | ||||
| diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
 | ||||
| index e59632e9b1..40cf379017 100644
 | ||||
| --- a/hw/scsi/scsi-disk.c
 | ||||
| +++ b/hw/scsi/scsi-disk.c
 | ||||
| @@ -74,7 +74,7 @@ struct SCSIDiskClass {
 | ||||
|       */ | ||||
|      DMAIOFunc       *dma_readv; | ||||
|      DMAIOFunc       *dma_writev; | ||||
| -    bool            (*need_fua_emulation)(SCSICommand *cmd);
 | ||||
| +    bool            (*need_fua)(SCSICommand *cmd);
 | ||||
|      void            (*update_sense)(SCSIRequest *r); | ||||
|  }; | ||||
|   | ||||
| @@ -85,7 +85,7 @@ typedef struct SCSIDiskReq {
 | ||||
|      uint32_t sector_count; | ||||
|      uint32_t buflen; | ||||
|      bool started; | ||||
| -    bool need_fua_emulation;
 | ||||
| +    bool need_fua;
 | ||||
|      struct iovec iov; | ||||
|      QEMUIOVector qiov; | ||||
|      BlockAcctCookie acct; | ||||
| @@ -389,24 +389,6 @@ static bool scsi_is_cmd_fua(SCSICommand *cmd)
 | ||||
|      } | ||||
|  } | ||||
|   | ||||
| -static void scsi_write_do_fua(SCSIDiskReq *r)
 | ||||
| -{
 | ||||
| -    SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
 | ||||
| -
 | ||||
| -    assert(r->req.aiocb == NULL);
 | ||||
| -    assert(!r->req.io_canceled);
 | ||||
| -
 | ||||
| -    if (r->need_fua_emulation) {
 | ||||
| -        block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct, 0,
 | ||||
| -                         BLOCK_ACCT_FLUSH);
 | ||||
| -        r->req.aiocb = blk_aio_flush(s->qdev.conf.blk, scsi_aio_complete, r);
 | ||||
| -        return;
 | ||||
| -    }
 | ||||
| -
 | ||||
| -    scsi_req_complete(&r->req, GOOD);
 | ||||
| -    scsi_req_unref(&r->req);
 | ||||
| -}
 | ||||
| -
 | ||||
|  static void scsi_dma_complete_noio(SCSIDiskReq *r, int ret) | ||||
|  { | ||||
|      assert(r->req.aiocb == NULL); | ||||
| @@ -416,12 +398,7 @@ static void scsi_dma_complete_noio(SCSIDiskReq *r, int ret)
 | ||||
|   | ||||
|      r->sector += r->sector_count; | ||||
|      r->sector_count = 0; | ||||
| -    if (r->req.cmd.mode == SCSI_XFER_TO_DEV) {
 | ||||
| -        scsi_write_do_fua(r);
 | ||||
| -        return;
 | ||||
| -    } else {
 | ||||
| -        scsi_req_complete(&r->req, GOOD);
 | ||||
| -    }
 | ||||
| +    scsi_req_complete(&r->req, GOOD);
 | ||||
|   | ||||
|  done: | ||||
|      scsi_req_unref(&r->req); | ||||
| @@ -564,7 +541,7 @@ static void scsi_read_data(SCSIRequest *req)
 | ||||
|   | ||||
|      first = !r->started; | ||||
|      r->started = true; | ||||
| -    if (first && r->need_fua_emulation) {
 | ||||
| +    if (first && r->need_fua) {
 | ||||
|          block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct, 0, | ||||
|                           BLOCK_ACCT_FLUSH); | ||||
|          r->req.aiocb = blk_aio_flush(s->qdev.conf.blk, scsi_do_read_cb, r); | ||||
| @@ -589,8 +566,7 @@ static void scsi_write_complete_noio(SCSIDiskReq *r, int ret)
 | ||||
|      r->sector += n; | ||||
|      r->sector_count -= n; | ||||
|      if (r->sector_count == 0) { | ||||
| -        scsi_write_do_fua(r);
 | ||||
| -        return;
 | ||||
| +        scsi_req_complete(&r->req, GOOD);
 | ||||
|      } else { | ||||
|          scsi_init_iovec(r, SCSI_DMA_BUF_SIZE); | ||||
|          trace_scsi_disk_write_complete_noio(r->req.tag, r->qiov.size); | ||||
| @@ -623,6 +599,7 @@ static void scsi_write_data(SCSIRequest *req)
 | ||||
|      SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); | ||||
|      SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); | ||||
|      SCSIDiskClass *sdc = (SCSIDiskClass *) object_get_class(OBJECT(s)); | ||||
| +    BlockCompletionFunc *cb;
 | ||||
|   | ||||
|      /* No data transfer may already be in progress */ | ||||
|      assert(r->req.aiocb == NULL); | ||||
| @@ -648,11 +625,10 @@ static void scsi_write_data(SCSIRequest *req)
 | ||||
|   | ||||
|      if (r->req.cmd.buf[0] == VERIFY_10 || r->req.cmd.buf[0] == VERIFY_12 || | ||||
|          r->req.cmd.buf[0] == VERIFY_16) { | ||||
| -        if (r->req.sg) {
 | ||||
| -            scsi_dma_complete_noio(r, 0);
 | ||||
| -        } else {
 | ||||
| -            scsi_write_complete_noio(r, 0);
 | ||||
| -        }
 | ||||
| +        block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct, 0,
 | ||||
| +                         BLOCK_ACCT_FLUSH);
 | ||||
| +        cb = r->req.sg ? scsi_dma_complete : scsi_write_complete;
 | ||||
| +        r->req.aiocb = blk_aio_flush(s->qdev.conf.blk, cb, r);
 | ||||
|          return; | ||||
|      } | ||||
|   | ||||
| @@ -2391,7 +2367,7 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf)
 | ||||
|          scsi_check_condition(r, SENSE_CODE(LBA_OUT_OF_RANGE)); | ||||
|          return 0; | ||||
|      } | ||||
| -    r->need_fua_emulation = sdc->need_fua_emulation(&r->req.cmd);
 | ||||
| +    r->need_fua = sdc->need_fua(&r->req.cmd);
 | ||||
|      if (r->sector_count == 0) { | ||||
|          scsi_req_complete(&r->req, GOOD); | ||||
|      } | ||||
| @@ -3137,7 +3113,8 @@ BlockAIOCB *scsi_dma_writev(int64_t offset, QEMUIOVector *iov,
 | ||||
|  { | ||||
|      SCSIDiskReq *r = opaque; | ||||
|      SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); | ||||
| -    return blk_aio_pwritev(s->qdev.conf.blk, offset, iov, 0, cb, cb_opaque);
 | ||||
| +    int flags = r->need_fua ? BDRV_REQ_FUA : 0;
 | ||||
| +    return blk_aio_pwritev(s->qdev.conf.blk, offset, iov, flags, cb, cb_opaque);
 | ||||
|  } | ||||
|   | ||||
|  static char *scsi_property_get_loadparm(Object *obj, Error **errp) | ||||
| @@ -3186,7 +3163,7 @@ static void scsi_disk_base_class_initfn(ObjectClass *klass, void *data)
 | ||||
|      device_class_set_legacy_reset(dc, scsi_disk_reset); | ||||
|      sdc->dma_readv = scsi_dma_readv; | ||||
|      sdc->dma_writev = scsi_dma_writev; | ||||
| -    sdc->need_fua_emulation = scsi_is_cmd_fua;
 | ||||
| +    sdc->need_fua  = scsi_is_cmd_fua;
 | ||||
|  } | ||||
|   | ||||
|  static const TypeInfo scsi_disk_base_info = { | ||||
| @@ -3338,7 +3315,7 @@ static void scsi_block_class_initfn(ObjectClass *klass, void *data)
 | ||||
|      sdc->dma_readv   = scsi_block_dma_readv; | ||||
|      sdc->dma_writev  = scsi_block_dma_writev; | ||||
|      sdc->update_sense = scsi_block_update_sense; | ||||
| -    sdc->need_fua_emulation = scsi_block_no_fua;
 | ||||
| +    sdc->need_fua    = scsi_block_no_fua;
 | ||||
|      dc->desc = "SCSI block device passthrough"; | ||||
|      device_class_set_props(dc, scsi_block_properties); | ||||
|      dc->vmsd  = &vmstate_scsi_disk_state; | ||||
| -- 
 | ||||
| 2.39.3 | ||||
| 
 | ||||
| @ -57,7 +57,7 @@ | ||||
|     %global tools_only 1 | ||||
| %endif | ||||
| 
 | ||||
| %ifnarch %{ix86} x86_64 aarch64 | ||||
| %ifnarch x86_64 aarch64 | ||||
|     %global have_usbredir 0 | ||||
| %endif | ||||
| 
 | ||||
| @ -66,13 +66,10 @@ | ||||
| %ifarch s390x | ||||
|     %global modprobe_kvm_conf %{_sourcedir}/kvm-s390x.conf | ||||
| %endif | ||||
| %ifarch %{ix86} x86_64 | ||||
| %ifarch x86_64 | ||||
|     %global modprobe_kvm_conf %{_sourcedir}/kvm-x86.conf | ||||
| %endif | ||||
| 
 | ||||
| %ifarch %{ix86} | ||||
|     %global kvm_target    i386 | ||||
| %endif | ||||
| %ifarch x86_64 | ||||
|     %global kvm_target    x86_64 | ||||
| %else | ||||
| @ -86,9 +83,6 @@ | ||||
|     %global kvm_target    s390x | ||||
|     %global have_modules_load 1 | ||||
| %endif | ||||
| %ifarch ppc | ||||
|     %global kvm_target    ppc | ||||
| %endif | ||||
| %ifarch aarch64 | ||||
|     %global kvm_target    aarch64 | ||||
| %endif | ||||
| @ -124,7 +118,9 @@ Requires: %{name}-device-usb-host = %{epoch}:%{version}-%{release}   \ | ||||
| Requires: %{name}-device-usb-redirect = %{epoch}:%{version}-%{release}   \ | ||||
| %endif                                                           \ | ||||
| Requires: %{name}-block-blkio = %{epoch}:%{version}-%{release}   \ | ||||
| %if %{have_block_rbd} \ | ||||
| Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release}     \ | ||||
| %endif \ | ||||
| Requires: %{name}-audio-pa = %{epoch}:%{version}-%{release} | ||||
| 
 | ||||
| # Since SPICE is removed from RHEL-9, the following Obsoletes: | ||||
| @ -147,7 +143,7 @@ Obsoletes: %{name}-block-ssh <= %{epoch}:%{version}                    \ | ||||
| Summary: QEMU is a machine emulator and virtualizer | ||||
| Name: qemu-kvm | ||||
| Version: 10.0.0 | ||||
| Release: 5%{?rcrel}%{?dist}%{?cc_suffix} | ||||
| Release: 6%{?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) | ||||
| @ -262,6 +258,10 @@ Patch47: kvm-util-qemu-sockets-Refactor-inet_parse-to-use-QemuOpt.patch | ||||
| Patch48: kvm-util-qemu-sockets-Introduce-inet-socket-options-cont.patch | ||||
| # For RHEL-67706 - postcopy on the destination host can't switch into pause status under the network issue if boot VM with '-S' | ||||
| Patch49: kvm-tests-unit-test-util-sockets-fix-mem-leak-on-error-o.patch | ||||
| # For RHEL-71962 - [RFE] Implement FUA support in scsi-disk | ||||
| Patch50: kvm-scsi-disk-Add-native-FUA-write-support.patch | ||||
| # For RHEL-96057 - qemu-kvm: Various small issues in the spec file | ||||
| Patch51: kvm-Disable-virtio-net-pci-romfile-loading-on-riscv64.patch | ||||
| 
 | ||||
| %if %{have_clang} | ||||
| BuildRequires: clang | ||||
| @ -362,7 +362,7 @@ Summary: %{name} core components | ||||
| %{obsoletes_some_modules} | ||||
| Requires: %{name}-common = %{epoch}:%{version}-%{release} | ||||
| Requires: qemu-img = %{epoch}:%{version}-%{release} | ||||
| %ifarch %{ix86} x86_64 | ||||
| %ifarch x86_64 | ||||
| Requires: edk2-ovmf | ||||
| %endif | ||||
| %ifarch aarch64 | ||||
| @ -402,10 +402,10 @@ Requires(post): /usr/sbin/useradd | ||||
| Requires(post): systemd-units | ||||
| Requires(preun): systemd-units | ||||
| Requires(postun): systemd-units | ||||
| %ifarch %{ix86} x86_64 | ||||
| %ifarch x86_64 | ||||
| Requires: seabios-bin >= 1.10.2-1 | ||||
| %endif | ||||
| %ifnarch aarch64 s390x | ||||
| %ifarch x86_64 %{power64} | ||||
| Requires: seavgabios-bin >= 1.12.0-3 | ||||
| Requires: ipxe-roms-qemu >= %{ipxe_version} | ||||
| %endif | ||||
| @ -1344,6 +1344,17 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ | ||||
| %endif | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Jun 20 2025 Miroslav Rezanina <mrezanin@redhat.com> - 10.0.0-6 | ||||
| - kvm-scsi-disk-Add-native-FUA-write-support.patch [RHEL-71962] | ||||
| - kvm-Fix-handling-of-have_block_rbd.patch [RHEL-96057] | ||||
| - kvm-Delete-obsolete-references-to-architectures.patch [RHEL-96057] | ||||
| - kvm-Fix-arch-list-for-vgabios-and-ipxe-roms.patch [RHEL-96057] | ||||
| - kvm-Disable-virtio-net-pci-romfile-loading-on-riscv64.patch [RHEL-96057] | ||||
| - Resolves: RHEL-71962 | ||||
|   ([RFE] Implement FUA support in scsi-disk) | ||||
| - Resolves: RHEL-96057 | ||||
|   (qemu-kvm: Various small issues in the spec file) | ||||
| 
 | ||||
| * Mon Jun 09 2025 Miroslav Rezanina <mrezanin@redhat.com> - 10.0.0-5 | ||||
| - kvm-file-posix-Define-DM_MPATH_PROBE_PATHS.patch [RHEL-65852] | ||||
| - kvm-file-posix-Probe-paths-and-retry-SG_IO-on-potential-.patch [RHEL-65852] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user