qemu-kvm/kvm-pc-bios-s390-ccw-Don-t-generate-TEXTRELs.patch

84 lines
3.0 KiB
Diff
Raw Normal View History

* Mon Nov 11 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.1.0-2 - kvm-hw-s390x-ipl-Provide-more-memory-to-the-s390-ccw.img.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Use-the-libc-from-SLOF-and-remove-s.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Link-the-netboot-code-into-the-main.patch [RHEL-11424] - kvm-redhat-Remove-the-s390-netboot.img-from-the-spec-fil.patch [RHEL-11424] - kvm-hw-s390x-Remove-the-possibility-to-load-the-s390-net.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Merge-netboot.mak-into-the-main-Mak.patch [RHEL-11424] - kvm-docs-system-s390x-bootdevices-Update-the-documentati.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Remove-panics-from-ISO-IPL-path.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Remove-panics-from-ECKD-IPL-path.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Remove-panics-from-SCSI-IPL-path.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Remove-panics-from-DASD-IPL-path.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Remove-panics-from-Netboot-IPL-path.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Enable-failed-IPL-to-return-after-e.patch [RHEL-11424] - kvm-include-hw-s390x-Add-include-files-for-common-IPL-st.patch [RHEL-11424] - kvm-s390x-Add-individual-loadparm-assignment-to-CCW-devi.patch [RHEL-11424] - kvm-hw-s390x-Build-an-IPLB-for-each-boot-device.patch [RHEL-11424] - kvm-s390x-Rebuild-IPLB-for-SCSI-device-directly-from-DIA.patch [RHEL-11424] - kvm-pc-bios-s390x-Enable-multi-device-boot-loop.patch [RHEL-11424] - kvm-docs-system-Update-documentation-for-s390x-IPL.patch [RHEL-11424] - kvm-tests-qtest-Add-s390x-boot-order-tests-to-cdrom-test.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Clarify-alignment-is-in-bytes.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Don-t-generate-TEXTRELs.patch [RHEL-11424] - kvm-pc-bios-s390-ccw-Introduce-EXTRA_LDFLAGS.patch [RHEL-11424] - kvm-vfio-migration-Report-only-stop-copy-size-in-vfio_st.patch [RHEL-64307] - kvm-vfio-migration-Change-trace-formats-from-hex-to-deci.patch [RHEL-64307] - kvm-kvm-Allow-kvm_arch_get-put_registers-to-accept-Error.patch [RHEL-60914] - kvm-target-i386-kvm-Report-which-action-failed-in-kvm_ar.patch [RHEL-60914] - Resolves: RHEL-11424 ([IBM 9.6 FEAT] KVM: Full boot order support - qemu part) - Resolves: RHEL-64307 (High threshold value observed in vGPU live migration) - Resolves: RHEL-60914 (Fail migration properly when put cpu register fails)
2024-11-11 13:48:00 +00:00
From 7a5f9ea3bb8ff78bd93eb2cee9b8be876e745346 Mon Sep 17 00:00:00 2001
From: Jens Remus <jremus@linux.ibm.com>
Date: Tue, 1 Oct 2024 17:36:17 +0200
Subject: [PATCH 22/27] pc-bios/s390-ccw: Don't generate TEXTRELs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Thomas Huth <thuth@redhat.com>
RH-MergeRequest: 277: Full boot order support for s390x [CentOS 9]
RH-Jira: RHEL-11424
RH-Acked-by: Cédric Le Goater <clg@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [22/23] 8d8b2959be6c798f24e1991252fe6c680a6c6025 (thuth/qemu-kvm-cs9)
Commit 7cd50cbe4ca3 ("pc-bios/s390-ccw: Don't use __bss_start with the
"larl" instruction") introduced the address constant bss_start_literal
for __bss_start in the .text section, which introduced a relocation in
code (i.e. TEXTREL). The dedicated constant is required, as __bss_start
may not necessarily be aligned on a 2-byte boundary (see subject commit
for details).
Move the constant to the .data section to get rid of the relocation in
the .text section. Add the linker option -z text to prevent TEXTRELs to
get introduced in the future.
Note that the R_390_RELATIVE relocations are taken care of by function
glue() in include/hw/elf_ops.h.inc introduced by commit 5dce07e1cb67
("elf-loader: Provide the possibility to relocate s390 ELF files").
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-ID: <20241001153618.17791-3-mhartmay@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 3259b4424a85d9cdfd1a33ed6030a6c51c1b9b8b)
---
pc-bios/s390-ccw/Makefile | 2 +-
pc-bios/s390-ccw/start.S | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
index db9e8f0892..38254e22df 100644
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -46,7 +46,7 @@ EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables
EXTRA_CFLAGS += -msoft-float
EXTRA_CFLAGS += -std=gnu99
EXTRA_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
-LDFLAGS += -Wl,-pie -nostdlib -z noexecstack
+LDFLAGS += -Wl,-pie -nostdlib -z noexecstack -z text
cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>/dev/null
cc-option = if $(call cc-test, $1); then \
diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S
index 576fc12c06..b70213e412 100644
--- a/pc-bios/s390-ccw/start.S
+++ b/pc-bios/s390-ccw/start.S
@@ -113,8 +113,6 @@ io_new_code:
br %r14
.balign 8
-bss_start_literal:
- .quad __bss_start
disabled_wait_psw:
.quad 0x0002000180000000,0x0000000000000000
enabled_wait_psw:
@@ -124,6 +122,11 @@ external_new_mask:
io_new_mask:
.quad 0x0000000180000000
+.data
+ .balign 8
+bss_start_literal:
+ .quad __bss_start
+
.bss
.balign 8
stack:
--
2.39.3