commit:     b42da7ebd3516c4f32c1724e59d01c85b6b0ef35
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 15 17:46:02 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Jun 15 17:47:02 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b42da7eb

app-emulation/qemu: rearrange patches

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 app-emulation/qemu/Manifest                        |   2 +-
 .../qemu-2.12.0-tcg-instruction-overflow.patch     | 183 ---------------------
 app-emulation/qemu/qemu-2.12.0-r3.ebuild           |   3 +-
 3 files changed, 2 insertions(+), 186 deletions(-)

diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index 735a99a99de..c93f84bcbf9 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -1,4 +1,4 @@
 DIST qemu-2.11.1-patches-r1.tar.xz 2064 BLAKE2B 
533c916b01c014bcfa6c733b76aa6da1f12cdf5f0d4ae33136453705a8aca9fdfeef998747cfdc72d19e08fa40ea97e2fd4c21412c030af314605059282f49ef
 SHA512 
12de7b4777ec98871d0786291534f61b37534feef64b556caeab72e020ff14d61fe19d24cb151ebfdb912df2a7ba72c0d882566b368d88d02c9f1354c2adae4a
 DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 
6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9
 SHA512 
1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354
-DIST qemu-2.12.0-patches-r3.tar.xz 2936 BLAKE2B 
dd4d7e5d3f48df43d21a990129ff4a9bfb25a2e208166b0b8fc2d1d7d2e6c1b944178f2a6b724fba21c6f12e332ff135a0ab152d525a5141bf8b7a216a984074
 SHA512 
a2dd1c716c189ac8f98472f6a36d1494606ae6f09f0fd20818cf714ba058f526370f727a170592c3b029ce013de481b70e0ba6947bf2afb712340834d45aaff8
+DIST qemu-2.12.0-patches-r4.tar.xz 5376 BLAKE2B 
7abc107b7971798c039cb99546dced0807a1904064e8397d93ba35b7b2ea22bdccf0c4f5ff8233ea7932534bd7320b506eff1ff7bb969d67d2752a7d8f81fbea
 SHA512 
71c03ef3d6f9021d775201330ed08ace0bc34c7c3c4632a30486d54872fa457f8256e055034bbe2efcd98d718a7d714f00710961b3819568678444db6b457d92
 DIST qemu-2.12.0.tar.bz2 41196232 BLAKE2B 
f258e570558249ea647c3571908f90b8bacdcef9a1814009b98571cf0e96406194d44aa041fd0a97c9b673f39a9eaae8d873824745509778a6784cd85f8398b0
 SHA512 
91d829f44c431e4c1cd335f3efea5afff9da62d832b0296a92417463ea0826d09ce226c2ea8ac167fe7b99b6bb976c7cb1357aaf17735ee57af6602161e46346

diff --git 
a/app-emulation/qemu/files/qemu-2.12.0-tcg-instruction-overflow.patch 
b/app-emulation/qemu/files/qemu-2.12.0-tcg-instruction-overflow.patch
deleted file mode 100644
index 24df138a777..00000000000
--- a/app-emulation/qemu/files/qemu-2.12.0-tcg-instruction-overflow.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-diff -ru qemu-2.12.0/tcg/aarch64/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/aarch64/tcg-target.inc.c
---- qemu-2.12.0/tcg/aarch64/tcg-target.inc.c   2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/aarch64/tcg-target.inc.c  2018-06-15 
15:47:20.557969818 +0200
-@@ -1733,7 +1733,7 @@
-             tcg_out_insn(s, 3305, LDR, offset, TCG_REG_TMP);
-         }
-         tcg_out_insn(s, 3207, BR, TCG_REG_TMP);
--        s->tb_jmp_reset_offset[a0] = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, a0);
-         break;
- 
-     case INDEX_op_goto_ptr:
-diff -ru qemu-2.12.0/tcg/arm/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/arm/tcg-target.inc.c
---- qemu-2.12.0/tcg/arm/tcg-target.inc.c       2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/arm/tcg-target.inc.c      2018-06-15 
15:47:20.557969818 +0200
-@@ -1822,7 +1822,7 @@
-                 tcg_out_movi32(s, COND_AL, base, ptr - dil);
-             }
-             tcg_out_ld32_12(s, COND_AL, TCG_REG_PC, base, dil);
--            s->tb_jmp_reset_offset[args[0]] = tcg_current_code_size(s);
-+            set_jmp_reset_offset(s, args[0]);
-         }
-         break;
-     case INDEX_op_goto_ptr:
-diff -ru qemu-2.12.0/tcg/i386/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/i386/tcg-target.inc.c
---- qemu-2.12.0/tcg/i386/tcg-target.inc.c      2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/i386/tcg-target.inc.c     2018-06-15 
15:47:20.558969815 +0200
-@@ -2245,7 +2245,7 @@
-             tcg_out_modrm_offset(s, OPC_GRP5, EXT5_JMPN_Ev, -1,
-                                  (intptr_t)(s->tb_jmp_target_addr + a0));
-         }
--        s->tb_jmp_reset_offset[a0] = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, a0);
-         break;
-     case INDEX_op_goto_ptr:
-         /* jmp to the given host address (could be epilogue) */
-diff -ru qemu-2.12.0/tcg/mips/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/mips/tcg-target.inc.c
---- qemu-2.12.0/tcg/mips/tcg-target.inc.c      2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/mips/tcg-target.inc.c     2018-06-15 
15:47:20.558969815 +0200
-@@ -1744,7 +1744,7 @@
-             tcg_out_opc_reg(s, OPC_JR, 0, TCG_TMP0, 0);
-         }
-         tcg_out_nop(s);
--        s->tb_jmp_reset_offset[a0] = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, a0);
-         break;
-     case INDEX_op_goto_ptr:
-         /* jmp to the given host address (could be epilogue) */
-diff -ru qemu-2.12.0/tcg/ppc/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/ppc/tcg-target.inc.c
---- qemu-2.12.0/tcg/ppc/tcg-target.inc.c       2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/ppc/tcg-target.inc.c      2018-06-15 
15:47:20.558969815 +0200
-@@ -2025,10 +2025,10 @@
-         }
-         tcg_out32(s, MTSPR | RS(TCG_REG_TB) | CTR);
-         tcg_out32(s, BCCTR | BO_ALWAYS);
--        s->tb_jmp_reset_offset[args[0]] = c = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, args[0]);
-         if (USE_REG_TB) {
-             /* For the unlinked case, need to reset TCG_REG_TB.  */
--            c = -c;
-+            c = -tcg_current_code_size(s);
-             assert(c == (int16_t)c);
-             tcg_out32(s, ADDI | TAI(TCG_REG_TB, TCG_REG_TB, c));
-         }
-diff -ru qemu-2.12.0/tcg/s390/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/s390/tcg-target.inc.c
---- qemu-2.12.0/tcg/s390/tcg-target.inc.c      2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/s390/tcg-target.inc.c     2018-06-15 
15:47:20.558969815 +0200
-@@ -1783,7 +1783,7 @@
-             /* and go there */
-             tcg_out_insn(s, RR, BCR, S390_CC_ALWAYS, TCG_REG_TB);
-         }
--        s->tb_jmp_reset_offset[a0] = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, a0);
- 
-         /* For the unlinked path of goto_tb, we need to reset
-            TCG_REG_TB to the beginning of this TB.  */
-diff -ru qemu-2.12.0/tcg/sparc/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/sparc/tcg-target.inc.c
---- qemu-2.12.0/tcg/sparc/tcg-target.inc.c     2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/sparc/tcg-target.inc.c    2018-06-15 
15:47:20.559969811 +0200
-@@ -1388,12 +1388,12 @@
-             tcg_out_arithi(s, TCG_REG_G0, TCG_REG_TB, 0, JMPL);
-             tcg_out_nop(s);
-         }
--        s->tb_jmp_reset_offset[a0] = c = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, a0);
- 
-         /* For the unlinked path of goto_tb, we need to reset
-            TCG_REG_TB to the beginning of this TB.  */
-         if (USE_REG_TB) {
--            c = -c;
-+            c = -tcg_current_code_size(s);
-             if (check_fit_i32(c, 13)) {
-                 tcg_out_arithi(s, TCG_REG_TB, TCG_REG_TB, c, ARITH_ADD);
-             } else {
-diff -ru qemu-2.12.0/tcg/tcg.c qemu-2.12.0-modified/tcg/tcg.c
---- qemu-2.12.0/tcg/tcg.c      2018-04-24 18:30:47.000000000 +0200
-+++ qemu-2.12.0-modified/tcg/tcg.c     2018-06-15 16:02:55.042712421 +0200
-@@ -293,6 +293,14 @@
-     return l;
- }
- 
-+static void set_jmp_reset_offset(TCGContext *s, int which)
-+{
-+    size_t off = tcg_current_code_size(s);
-+    s->tb_jmp_reset_offset[which] = off;
-+    /* Make sure that we didn't overflow the stored offset.  */
-+    assert(s->tb_jmp_reset_offset[which] == off);
-+}
-+
- #include "tcg-target.inc.c"
- 
- static void tcg_region_bounds(size_t curr_region, void **pstart, void **pend)
-@@ -866,6 +874,7 @@
-     /* No temps have been previously allocated for size or locality.  */
-     memset(s->free_temps, 0, sizeof(s->free_temps));
- 
-+    s->nb_ops = 0;
-     s->nb_labels = 0;
-     s->current_frame_offset = s->frame_start;
- 
-@@ -1983,6 +1992,7 @@
- {
-     QTAILQ_REMOVE(&s->ops, op, link);
-     QTAILQ_INSERT_TAIL(&s->free_ops, op, link);
-+    s->nb_ops--;
- 
- #ifdef CONFIG_PROFILER
-     atomic_set(&s->prof.del_op_count, s->prof.del_op_count + 1);
-@@ -2002,6 +2012,7 @@
-     }
-     memset(op, 0, offsetof(TCGOp, link));
-     op->opc = opc;
-+    s->nb_ops++;
- 
-     return op;
- }
-@@ -3351,7 +3362,10 @@
-             break;
-         case INDEX_op_insn_start:
-             if (num_insns >= 0) {
--                s->gen_insn_end_off[num_insns] = tcg_current_code_size(s);
-+                size_t off = tcg_current_code_size(s);
-+                s->gen_insn_end_off[num_insns] = off;
-+                /* Assert that we do not overflow our stored offset.  */
-+                assert(s->gen_insn_end_off[num_insns] == off);
-             }
-             num_insns++;
-             for (i = 0; i < TARGET_INSN_START_WORDS; ++i) {
-Only in qemu-2.12.0-modified/tcg: tcg.c.orig
-diff -ru qemu-2.12.0/tcg/tcg.h qemu-2.12.0-modified/tcg/tcg.h
---- qemu-2.12.0/tcg/tcg.h      2018-06-15 16:03:35.881570182 +0200
-+++ qemu-2.12.0-modified/tcg/tcg.h     2018-06-15 16:04:06.514463493 +0200
-@@ -655,6 +655,7 @@
-     int nb_globals;
-     int nb_temps;
-     int nb_indirects;
-+    int nb_ops;
- 
-     /* goto_tb support */
-     tcg_insn_unit *code_buf;
-@@ -844,7 +845,7 @@
- /* Test for whether to terminate the TB for using too many opcodes.  */
- static inline bool tcg_op_buf_full(void)
- {
--    return false;
-+    return tcg_ctx->nb_ops >= 4000;
- }
- 
- /* pool based memory allocation */
-Only in qemu-2.12.0-modified/tcg: tcg.h.orig
-Only in qemu-2.12.0-modified/tcg: tcg.h.rej
-diff -ru qemu-2.12.0/tcg/tci/tcg-target.inc.c 
qemu-2.12.0-modified/tcg/tci/tcg-target.inc.c
---- qemu-2.12.0/tcg/tci/tcg-target.inc.c       2018-04-24 18:30:47.000000000 
+0200
-+++ qemu-2.12.0-modified/tcg/tci/tcg-target.inc.c      2018-06-15 
15:47:20.559969811 +0200
-@@ -574,7 +574,7 @@
-             /* Indirect jump method. */
-             TODO();
-         }
--        s->tb_jmp_reset_offset[args[0]] = tcg_current_code_size(s);
-+        set_jmp_reset_offset(s, args[0]);
-         break;
-     case INDEX_op_br:
-         tci_out_label(s, arg_label(args[0]));

diff --git a/app-emulation/qemu/qemu-2.12.0-r3.ebuild 
b/app-emulation/qemu/qemu-2.12.0-r3.ebuild
index 8a89d0ca6da..9e4303a6042 100644
--- a/app-emulation/qemu/qemu-2.12.0-r3.ebuild
+++ b/app-emulation/qemu/qemu-2.12.0-r3.ebuild
@@ -22,7 +22,7 @@ else
        KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
 
        # Gentoo specific patchsets:
-       SRC_URI+=" 
https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r3.tar.xz";
+       SRC_URI+=" 
https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r4.tar.xz";
 fi
 
 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
@@ -216,7 +216,6 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.5.0-cflags.patch
        "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
        "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
-       "${FILESDIR}"/${P}-tcg-instruction-overflow.patch # Will be fixed in 
2.12.1
        "${WORKDIR}"/patches
 )
 

Reply via email to