From 3f9d158adfd9a3ed002537cad216c1346e85a6c76681991d3ed71f067acf44e7 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 13 Jul 2015 16:11:31 +0000 Subject: [PATCH] - Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 - Fix -kernel boot for AArch64 * Patches added: 0044-hw-arm-boot-Increase-fdt-alignment.patch - Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 - Fix -kernel boot for AArch64 * Patches added: 0044-hw-arm-boot-Increase-fdt-alignment.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=266 --- 0044-hw-arm-boot-Increase-fdt-alignment.patch | 43 +++++++++++++++++++ libcacard.spec | 2 + qemu-linux-user.spec | 2 + qemu-testsuite.changes | 8 ++++ qemu-testsuite.spec | 2 + qemu.changes | 8 ++++ qemu.spec | 2 + 7 files changed, 67 insertions(+) create mode 100644 0044-hw-arm-boot-Increase-fdt-alignment.patch diff --git a/0044-hw-arm-boot-Increase-fdt-alignment.patch b/0044-hw-arm-boot-Increase-fdt-alignment.patch new file mode 100644 index 00000000..27ffb2fe --- /dev/null +++ b/0044-hw-arm-boot-Increase-fdt-alignment.patch @@ -0,0 +1,43 @@ +From 90808c2a055b1e6332db307ca34ab682be60cfbf Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 13 Jul 2015 17:46:04 +0200 +Subject: [PATCH] hw/arm/boot: Increase fdt alignment + +The Linux kernel on aarch64 creates a page table entry at early bootup +that spans the 2MB range on memory spanning the fdt start address: + + [ ALIGN_DOWN(fdt, 2MB) ... ALIGN_DOWN(fdt, 2MB) + 2MB ] + +This means that when our current 4k alignment happens to fall at the end +of the aligned region, Linux tries to access memory that is not mapped. + +The easy fix is to instead increase the alignment to 2MB, making Linux's +logic always succeed. + +Reported-by: Andreas Schwab +Signed-off-by: Alexander Graf +--- + hw/arm/boot.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/hw/arm/boot.c b/hw/arm/boot.c +index a48d1b2..52cbd33 100644 +--- a/hw/arm/boot.c ++++ b/hw/arm/boot.c +@@ -739,12 +739,12 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) + * we point to the kernel args. + */ + if (have_dtb(info)) { +- /* Place the DTB after the initrd in memory. Note that some +- * kernels will trash anything in the 4K page the initrd +- * ends in, so make sure the DTB isn't caught up in that. ++ /* Place the DTB after the initrd in memory. Note that the kernel ++ * maps [ ALIGN_DOWN(fdt, 2MB) ... ALGIN_DOWN(fdt, 2MB) + 2MB ] ++ * and thus needs the fdt be preferably in its own 2MB window. + */ + hwaddr dtb_start = QEMU_ALIGN_UP(info->initrd_start + initrd_size, +- 4096); ++ 2 * 1024 * 1024); + if (load_dtb(dtb_start, info, 0) < 0) { + exit(1); + } diff --git a/libcacard.spec b/libcacard.spec index ad7e5499..ce1ad113 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -68,6 +68,7 @@ Patch0040: 0040-s390x-Add-interlocked-access-facili.patch Patch0041: 0041-fdc-force-the-fifo-access-to-be-in-.patch Patch0042: 0042-rules.mak-Force-CFLAGS-for-all-obje.patch Patch0043: 0043-qcow2-Set-MIN_L2_CACHE_SIZE-to-2.patch +Patch0044: 0044-hw-arm-boot-Increase-fdt-alignment.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -170,6 +171,7 @@ This sub-package contains development files for the Smartcard library. %patch0041 -p1 %patch0042 -p1 %patch0043 -p1 +%patch0044 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index 4787f056..c861f279 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -68,6 +68,7 @@ Patch0040: 0040-s390x-Add-interlocked-access-facili.patch Patch0041: 0041-fdc-force-the-fifo-access-to-be-in-.patch Patch0042: 0042-rules.mak-Force-CFLAGS-for-all-obje.patch Patch0043: 0043-qcow2-Set-MIN_L2_CACHE_SIZE-to-2.patch +Patch0044: 0044-hw-arm-boot-Increase-fdt-alignment.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -164,6 +165,7 @@ run cross-architecture builds. %patch0041 -p1 %patch0042 -p1 %patch0043 -p1 +%patch0044 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 27b06774..fbe3c4bd 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 13 16:10:13 UTC 2015 - agraf@suse.com + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 +- Fix -kernel boot for AArch64 +* Patches added: + 0044-hw-arm-boot-Increase-fdt-alignment.patch + ------------------------------------------------------------------- Sat Jul 4 18:14:27 UTC 2015 - crrodriguez@opensuse.org diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index f3b28597..12eb4502 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -99,6 +99,7 @@ Patch0040: 0040-s390x-Add-interlocked-access-facili.patch Patch0041: 0041-fdc-force-the-fifo-access-to-be-in-.patch Patch0042: 0042-rules.mak-Force-CFLAGS-for-all-obje.patch Patch0043: 0043-qcow2-Set-MIN_L2_CACHE_SIZE-to-2.patch +Patch0044: 0044-hw-arm-boot-Increase-fdt-alignment.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -604,6 +605,7 @@ This package provides a service file for starting and stopping KSM. %patch0041 -p1 %patch0042 -p1 %patch0043 -p1 +%patch0044 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios diff --git a/qemu.changes b/qemu.changes index 27b06774..fbe3c4bd 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 13 16:10:13 UTC 2015 - agraf@suse.com + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 +- Fix -kernel boot for AArch64 +* Patches added: + 0044-hw-arm-boot-Increase-fdt-alignment.patch + ------------------------------------------------------------------- Sat Jul 4 18:14:27 UTC 2015 - crrodriguez@opensuse.org diff --git a/qemu.spec b/qemu.spec index ff3f21d8..01537e47 100644 --- a/qemu.spec +++ b/qemu.spec @@ -99,6 +99,7 @@ Patch0040: 0040-s390x-Add-interlocked-access-facili.patch Patch0041: 0041-fdc-force-the-fifo-access-to-be-in-.patch Patch0042: 0042-rules.mak-Force-CFLAGS-for-all-obje.patch Patch0043: 0043-qcow2-Set-MIN_L2_CACHE_SIZE-to-2.patch +Patch0044: 0044-hw-arm-boot-Increase-fdt-alignment.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -604,6 +605,7 @@ This package provides a service file for starting and stopping KSM. %patch0041 -p1 %patch0042 -p1 %patch0043 -p1 +%patch0044 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios