peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0036-tci-Fix-qemu-alpha-on-32-bit-hosts-wrong-assertions.patch

298366
From 5c20c1ffe791ca29840fd9607ea034ea24ad7bdd Mon Sep 17 00:00:00 2001
298366
From: Stefan Weil <sw@weilnetz.de>
298366
Date: Thu, 12 Sep 2013 20:17:50 +0200
298366
Subject: [PATCH] tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)
298366
298366
Debian busybox-static for alpha has a load address of 0x0000000120000000
298366
which is mapped to 0x0000000020000000 for 32 bit hosts.
298366
298366
qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and
298366
qemu_st64 which all raise the assertion (taddr == host_addr).
298366
298366
Remove all assertions of this type because they are either wrong or
298366
unnecessary (when sizeof(tcg_target_ulong) >= sizeof(target_ulong)).
298366
298366
Cc: qemu-stable <qemu-stable@nongnu.org>
298366
Signed-off-by: Stefan Weil <sw@weilnetz.de>
298366
Reviewed-by: Richard Henderson <rth@twiddle.net>
298366
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
298366
(cherry picked from commit 07ac4dc5db22a31e47b149abdbc5ea99013cf4de)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 tci.c | 12 ------------
298366
 1 file changed, 12 deletions(-)
298366
298366
diff --git a/tci.c b/tci.c
298366
index c742c8d..af58576 100644
298366
--- a/tci.c
298366
+++ b/tci.c
298366
@@ -1085,7 +1085,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp8 = *(uint8_t *)(host_addr + GUEST_BASE);
298366
 #endif
298366
             tci_write_reg8(t0, tmp8);
298366
@@ -1097,7 +1096,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp8 = *(uint8_t *)(host_addr + GUEST_BASE);
298366
 #endif
298366
             tci_write_reg8s(t0, tmp8);
298366
@@ -1109,7 +1107,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp16 = tswap16(*(uint16_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg16(t0, tmp16);
298366
@@ -1121,7 +1118,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp16 = tswap16(*(uint16_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg16s(t0, tmp16);
298366
@@ -1134,7 +1130,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg32(t0, tmp32);
298366
@@ -1146,7 +1141,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg32s(t0, tmp32);
298366
@@ -1159,7 +1153,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg32(t0, tmp32);
298366
@@ -1174,7 +1167,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             tmp64 = helper_ldq_mmu(env, taddr, tci_read_i(&tb_ptr));
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             tmp64 = tswap64(*(uint64_t *)(host_addr + GUEST_BASE));
298366
 #endif
298366
             tci_write_reg(t0, tmp64);
298366
@@ -1190,7 +1182,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             helper_stb_mmu(env, taddr, t0, t2);
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             *(uint8_t *)(host_addr + GUEST_BASE) = t0;
298366
 #endif
298366
             break;
298366
@@ -1202,7 +1193,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             helper_stw_mmu(env, taddr, t0, t2);
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             *(uint16_t *)(host_addr + GUEST_BASE) = tswap16(t0);
298366
 #endif
298366
             break;
298366
@@ -1214,7 +1204,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             helper_stl_mmu(env, taddr, t0, t2);
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             *(uint32_t *)(host_addr + GUEST_BASE) = tswap32(t0);
298366
 #endif
298366
             break;
298366
@@ -1226,7 +1215,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
298366
             helper_stq_mmu(env, taddr, tmp64, t2);
298366
 #else
298366
             host_addr = (tcg_target_ulong)taddr;
298366
-            assert(taddr == host_addr);
298366
             *(uint64_t *)(host_addr + GUEST_BASE) = tswap64(tmp64);
298366
 #endif
298366
             break;