From b172f44bec8fd4d5c053bc8e7292046dd375775294a6e8dca8938d8eff4cf28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 8 Apr 2015 22:46:22 +0000 Subject: [PATCH] Accepting request 295056 from home:a_faerber:branches:Virtualization Fix bios-tables-test failures on ppc OBS-URL: https://build.opensuse.org/request/show/295056 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=244 --- ...-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch | 48 +++++++++++++++++++ libcacard.changes | 7 +++ libcacard.spec | 2 + qemu-linux-user.changes | 7 +++ qemu-linux-user.spec | 2 + qemu.changes | 7 +++ qemu.spec | 2 + 7 files changed, 75 insertions(+) create mode 100644 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch diff --git a/0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch b/0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch new file mode 100644 index 00000000..6655834a --- /dev/null +++ b/0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch @@ -0,0 +1,48 @@ +From 4a886245fce97b79af5841d6b0849124c8d30243 Mon Sep 17 00:00:00 2001 +From: Peter Maydell +Date: Wed, 8 Apr 2015 20:57:09 +0100 +Subject: [PATCH] tcg/tcg-op.c: Fix ld/st of 64 bit values on 32-bit bigendian + hosts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit 951c6300f7 out-of-lined the 32-bit-host versions of +tcg_gen_{ld,st}_i64, but in the process it inadvertently changed +an #ifdef HOST_WORDS_BIGENDIAN to #ifdef TCG_TARGET_WORDS_BIGENDIAN. +Since the latter doesn't get defined anywhere this meant we always +took the "LE host" codepath, and stored the two halves of the value +in the wrong order on BE hosts. This typically breaks any 64-bit +guest on a 32-bit BE host completely, and will have possibly more +subtle effects even for 32-bit guests. + +Switch the ifdef back to HOST_WORDS_BIGENDIAN. + +Signed-off-by: Peter Maydell +Signed-off-by: Andreas Färber +--- + tcg/tcg-op.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c +index f7a2767..2b6be75 100644 +--- a/tcg/tcg-op.c ++++ b/tcg/tcg-op.c +@@ -808,7 +808,7 @@ void tcg_gen_ld_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset) + { + /* Since arg2 and ret have different types, + they cannot be the same temporary */ +-#ifdef TCG_TARGET_WORDS_BIGENDIAN ++#ifdef HOST_WORDS_BIGENDIAN + tcg_gen_ld_i32(TCGV_HIGH(ret), arg2, offset); + tcg_gen_ld_i32(TCGV_LOW(ret), arg2, offset + 4); + #else +@@ -819,7 +819,7 @@ void tcg_gen_ld_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset) + + void tcg_gen_st_i64(TCGv_i64 arg1, TCGv_ptr arg2, tcg_target_long offset) + { +-#ifdef TCG_TARGET_WORDS_BIGENDIAN ++#ifdef HOST_WORDS_BIGENDIAN + tcg_gen_st_i32(TCGV_HIGH(arg1), arg2, offset); + tcg_gen_st_i32(TCGV_LOW(arg1), arg2, offset + 4); + #else diff --git a/libcacard.changes b/libcacard.changes index d33100fd..d79eddbb 100644 --- a/libcacard.changes +++ b/libcacard.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 8 20:47:40 UTC 2015 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 +* Patches added: + 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch + ------------------------------------------------------------------- Wed Apr 8 13:10:27 UTC 2015 - afaerber@suse.de diff --git a/libcacard.spec b/libcacard.spec index d8b310eb..23694b14 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -158,6 +159,7 @@ This sub-package contains development files for the Smartcard library. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index fa9ccd98..85bea46c 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 8 20:47:36 UTC 2015 - afaerber@suse.de + +- Fix 64-bit TCG stores on 32-bit Big Endian hosts (ppc) + 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 + ------------------------------------------------------------------- Wed Apr 8 13:10:27 UTC 2015 - afaerber@suse.de diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index ceaa709d..1e85271a 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -152,6 +153,7 @@ run cross-architecture builds. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu.changes b/qemu.changes index e76b7ff8..5be66b99 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 8 20:47:32 UTC 2015 - afaerber@suse.de + +- Fix 64-bit TCG stores on 32-bit Big Endian hosts (ppc) + 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.3 + ------------------------------------------------------------------- Wed Apr 8 13:10:26 UTC 2015 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index f5a16c88..623e51b3 100644 --- a/qemu.spec +++ b/qemu.spec @@ -93,6 +93,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-tcg-tcg-op.c-Fix-ld-st-of-64-bit-va.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -510,6 +511,7 @@ This package provides a service file for starting and stopping KSM. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios