All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1564123667210.66446@bt.com>

diff --git a/a/content_digest b/N1/content_digest
index d476af0..b72f6aa 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,37 +1,36 @@
  "ref\03106a3c959c4498fad13a5799c89ba7b@tpw09926dag18e.domain1.systemhost.net\0"
  "From\0<tony.nguyen@bt.com>\0"
- "Subject\0[Qemu-riscv] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path\0"
+ "Subject\0[Qemu-arm] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path\0"
  "Date\0Fri, 26 Jul 2019 06:47:47 +0000\0"
  "To\0<qemu-devel@nongnu.org>\0"
- "Cc\0<peter.maydell@linaro.org>"
-  <walling@linux.ibm.com>
-  <sagark@eecs.berkeley.edu>
-  <david@redhat.com>
-  <palmer@sifive.com>
-  <mark.cave-ayland@ilande.co.uk>
-  <Alistair.Francis@wdc.com>
-  <edgar.iglesias@gmail.com>
-  <arikalo@wavecomp.com>
-  <mst@redhat.com>
-  <pasic@linux.ibm.com>
-  <borntraeger@de.ibm.com>
-  <rth@twiddle.net>
-  <atar4qemu@gmail.com>
-  <ehabkost@redhat.com>
-  <alex.williamson@redhat.com>
-  <qemu-arm@nongnu.org>
-  <stefanha@redhat.com>
-  <shorne@gmail.com>
-  <david@gibson.dropbear.id.au>
-  <qemu-riscv@nongnu.org>
-  <qemu-s390x@nongnu.org>
-  <kbastian@mail.uni-paderborn.de>
-  <cohuck@redhat.com>
-  <laurent@vivier.eu>
-  <qemu-ppc@nongnu.org>
-  <amarkovic@wavecomp.com>
-  <pbonzini@redhat.com>
- " <aurelien@aurel32.net>\0"
+ "Cc\0peter.maydell@linaro.org"
+  walling@linux.ibm.com
+  sagark@eecs.berkeley.edu
+  mst@redhat.com
+  palmer@sifive.com
+  mark.cave-ayland@ilande.co.uk
+  laurent@vivier.eu
+  Alistair.Francis@wdc.com
+  arikalo@wavecomp.com
+  david@redhat.com
+  pasic@linux.ibm.com
+  borntraeger@de.ibm.com
+  rth@twiddle.net
+  atar4qemu@gmail.com
+  ehabkost@redhat.com
+  qemu-s390x@nongnu.org
+  qemu-arm@nongnu.org
+  stefanha@redhat.com
+  shorne@gmail.com
+  david@gibson.dropbear.id.au
+  qemu-riscv@nongnu.org
+  kbastian@mail.uni-paderborn.de
+  cohuck@redhat.com
+  alex.williamson@redhat.com
+  qemu-ppc@nongnu.org
+  amarkovic@wavecomp.com
+  pbonzini@redhat.com
+ " aurelien@aurel32.net\0"
  "\01:1\0"
  "b\0"
  "Now that MemOp has been pushed down into the memory API, we can\n"
@@ -425,4 +424,4 @@
  "</body>\r\n"
  "</html>\r\n"
 
-6ff50145499a748040d63cb3e485e5136668890ad8e10636a93138011ac4f013
+b5e11ae275d7859489664e2aee7ff07000f0b9d60b2c119c3bf1fedec40ddd70

diff --git a/a/2.bin b/a/2.bin
deleted file mode 100644
index aa9a1c4..0000000
--- a/a/2.bin
+++ /dev/null
@@ -1,203 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<style type="text/css" style="display:none"><!-- P { margin-top: 0px; margin-bottom: 0px; } .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(128, 0, 0); }--></style>
-</head>
-<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
-<p></p>
-<div><span style="font-size: 12pt;">Now that MemOp has been pushed down into the memory API, we can</span><br>
-</div>
-<div>collapse the two byte swaps adjust_endianness and handle_bswap into</div>
-<div>the former.</div>
-<div><br>
-</div>
-<div>Collapsing byte swaps along the I/O path enables additional endian</div>
-<div>inversion logic, e.g. SPARC64 Invert Endian TTE bit, with redundant</div>
-<div>byte swaps cancelling out.</div>
-<div><br>
-</div>
-<div>Signed-off-by: Tony Nguyen &lt;tony.nguyen@bt.com&gt;</div>
-<div>---</div>
-<div>&nbsp;accel/tcg/cputlb.c | 41 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;----------------------</div>
-<div>&nbsp;memory.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 30 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-------------</div>
-<div>&nbsp;2 files changed, 36 insertions(&#43;), 35 deletions(-)</div>
-<div><br>
-</div>
-<div>diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c</div>
-<div>index 5d88cec..e61b1eb 100644</div>
-<div>--- a/accel/tcg/cputlb.c</div>
-<div>&#43;&#43;&#43; b/accel/tcg/cputlb.c</div>
-<div>@@ -1209,26 &#43;1209,13 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,</div>
-<div>&nbsp;#endif</div>
-<div>&nbsp;</div>
-<div>&nbsp;/*</div>
-<div>- * Byte Swap Helper</div>
-<div>&#43; * Byte Swap Checker</div>
-<div>&nbsp; *</div>
-<div>- * This should all dead code away depending on the build host and</div>
-<div>- * access type.</div>
-<div>&#43; * Dead code should all go away depending on the build host and access type.</div>
-<div>&nbsp; */</div>
-<div>-</div>
-<div>-static inline uint64_t handle_bswap(uint64_t val, int size, bool big_endian)</div>
-<div>&#43;static inline bool need_bswap(bool big_endian)</div>
-<div>&nbsp;{</div>
-<div>- &nbsp; &nbsp;if ((big_endian &amp;&amp; NEED_BE_BSWAP) || (!big_endian &amp;&amp; NEED_LE_BSWAP)) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;switch (size) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 1: return val;</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 2: return bswap16(val);</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 4: return bswap32(val);</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 8: return bswap64(val);</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;default:</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g_assert_not_reached();</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>- &nbsp; &nbsp;} else {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;return val;</div>
-<div>- &nbsp; &nbsp;}</div>
-<div>&#43; &nbsp; &nbsp;return (big_endian &amp;&amp; NEED_BE_BSWAP) || (!big_endian &amp;&amp; NEED_LE_BSWAP);</div>
-<div>&nbsp;}</div>
-<div>&nbsp;</div>
-<div>&nbsp;/*</div>
-<div>@@ -1259,6 &#43;1246,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,</div>
-<div>&nbsp; &nbsp; &nbsp;unsigned a_bits = get_alignment_bits(get_memop(oi));</div>
-<div>&nbsp; &nbsp; &nbsp;void *haddr;</div>
-<div>&nbsp; &nbsp; &nbsp;uint64_t res;</div>
-<div>&#43; &nbsp; &nbsp;MemOp op;</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;/* Handle CPU specific unaligned behaviour */</div>
-<div>&nbsp; &nbsp; &nbsp;if (addr &amp; ((1 &lt;&lt; a_bits) - 1)) {</div>
-<div>@@ -1304,9 &#43;1292,13 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;res = io_readx(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index],</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mmu_idx, addr, retaddr, access_type, SIZE_MEMOP(size));</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;return handle_bswap(res, size, big_endian);</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op = SIZE_MEMOP(size);</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;if (need_bswap(big_endian)) {</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&#43;</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;return io_readx(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index],</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mmu_idx, addr, retaddr, access_type, op);</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;/* Handle slow unaligned access (it spans two pages or IO). &nbsp;*/</div>
-<div>@@ -1507,6 &#43;1499,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,</div>
-<div>&nbsp; &nbsp; &nbsp;const size_t tlb_off = offsetof(CPUTLBEntry, addr_write);</div>
-<div>&nbsp; &nbsp; &nbsp;unsigned a_bits = get_alignment_bits(get_memop(oi));</div>
-<div>&nbsp; &nbsp; &nbsp;void *haddr;</div>
-<div>&#43; &nbsp; &nbsp;MemOp op;</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;/* Handle CPU specific unaligned behaviour */</div>
-<div>&nbsp; &nbsp; &nbsp;if (addr &amp; ((1 &lt;&lt; a_bits) - 1)) {</div>
-<div>@@ -1552,9 &#43;1545,13 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op = SIZE_MEMOP(size);</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;if (need_bswap(big_endian)) {</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&#43;</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;io_writex(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index], mmu_idx,</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;handle_bswap(val, size, big_endian),</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;addr, retaddr, SIZE_MEMOP(size));</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;val, addr, retaddr, op);</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>diff --git a/memory.c b/memory.c</div>
-<div>index 6982e19..0277d3d 100644</div>
-<div>--- a/memory.c</div>
-<div>&#43;&#43;&#43; b/memory.c</div>
-<div>@@ -352,7 &#43;352,7 @@ static bool memory_region_big_endian(MemoryRegion *mr)</div>
-<div>&nbsp;#endif</div>
-<div>&nbsp;}</div>
-<div>&nbsp;</div>
-<div>-static bool memory_region_wrong_endianness(MemoryRegion *mr)</div>
-<div>&#43;static bool memory_region_endianness_inverted(MemoryRegion *mr)</div>
-<div>&nbsp;{</div>
-<div>&nbsp;#ifdef TARGET_WORDS_BIGENDIAN</div>
-<div>&nbsp; &nbsp; &nbsp;return mr-&gt;ops-&gt;endianness == DEVICE_LITTLE_ENDIAN;</div>
-<div>@@ -361,23 &#43;361,27 @@ static bool memory_region_wrong_endianness(MemoryRegion *mr)</div>
-<div>&nbsp;#endif</div>
-<div>&nbsp;}</div>
-<div>&nbsp;</div>
-<div>-static void adjust_endianness(MemoryRegion *mr, uint64_t *data, unsigned size)</div>
-<div>&#43;static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)</div>
-<div>&nbsp;{</div>
-<div>- &nbsp; &nbsp;if (memory_region_wrong_endianness(mr)) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;switch (size) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 1:</div>
-<div>&#43; &nbsp; &nbsp;if (memory_region_endianness_inverted(mr)) {</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>
-<div>&#43; &nbsp; &nbsp;}</div>
-<div>&#43;</div>
-<div>&#43; &nbsp; &nbsp;if (op &amp; MO_BSWAP) {</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;switch (op &amp; MO_SIZE) {</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_8:</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 2:</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_16:</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap16(*data);</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 4:</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_32:</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap32(*data);</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 8:</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_64:</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap64(*data);</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default:</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;abort();</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g_assert_not_reached();</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;}</div>
-<div>@@ -1451,7 &#43;1455,7 @@ MemTxResult memory_region_dispatch_read(MemoryRegion *mr,</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;r = memory_region_dispatch_read1(mr, addr, pval, size, attrs);</div>
-<div>- &nbsp; &nbsp;adjust_endianness(mr, pval, size);</div>
-<div>&#43; &nbsp; &nbsp;adjust_endianness(mr, pval, op);</div>
-<div>&nbsp; &nbsp; &nbsp;return r;</div>
-<div>&nbsp;}</div>
-<div>&nbsp;</div>
-<div>@@ -1494,7 &#43;1498,7 @@ MemTxResult memory_region_dispatch_write(MemoryRegion *mr,</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return MEMTX_DECODE_ERROR;</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>- &nbsp; &nbsp;adjust_endianness(mr, &amp;data, size);</div>
-<div>&#43; &nbsp; &nbsp;adjust_endianness(mr, &amp;data, op);</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;if ((!kvm_eventfds_enabled()) &amp;&amp;</div>
-<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;memory_region_dispatch_write_eventfds(mr, addr, data, size, attrs)) {</div>
-<div>@@ -2340,7 &#43;2344,7 @@ void memory_region_add_eventfd(MemoryRegion *mr,</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;if (size) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, size);</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, SIZE_MEMOP(size));</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp; &nbsp; &nbsp;memory_region_transaction_begin();</div>
-<div>&nbsp; &nbsp; &nbsp;for (i = 0; i &lt; mr-&gt;ioeventfd_nb; &#43;&#43;i) {</div>
-<div>@@ -2375,7 &#43;2379,7 @@ void memory_region_del_eventfd(MemoryRegion *mr,</div>
-<div>&nbsp; &nbsp; &nbsp;unsigned i;</div>
-<div>&nbsp;</div>
-<div>&nbsp; &nbsp; &nbsp;if (size) {</div>
-<div>- &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, size);</div>
-<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, SIZE_MEMOP(size));</div>
-<div>&nbsp; &nbsp; &nbsp;}</div>
-<div>&nbsp; &nbsp; &nbsp;memory_region_transaction_begin();</div>
-<div>&nbsp; &nbsp; &nbsp;for (i = 0; i &lt; mr-&gt;ioeventfd_nb; &#43;&#43;i) {</div>
-<div>--&nbsp;</div>
-<div>1.8.3.1</div>
-<div><br>
-<br>
-</div>
-<p><br>
-</p>
-</body>
-</html>
diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index e54d0ae..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,2 +0,0 @@
-Content-Type: text/html; charset="iso-8859-1"
-Content-Transfer-Encoding: quoted-printable
diff --git a/a/content_digest b/N2/content_digest
index d476af0..bcd27b3 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -1,38 +1,38 @@
  "ref\03106a3c959c4498fad13a5799c89ba7b@tpw09926dag18e.domain1.systemhost.net\0"
  "From\0<tony.nguyen@bt.com>\0"
- "Subject\0[Qemu-riscv] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path\0"
+ "Subject\0[Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path\0"
  "Date\0Fri, 26 Jul 2019 06:47:47 +0000\0"
  "To\0<qemu-devel@nongnu.org>\0"
- "Cc\0<peter.maydell@linaro.org>"
-  <walling@linux.ibm.com>
-  <sagark@eecs.berkeley.edu>
-  <david@redhat.com>
-  <palmer@sifive.com>
-  <mark.cave-ayland@ilande.co.uk>
-  <Alistair.Francis@wdc.com>
-  <edgar.iglesias@gmail.com>
-  <arikalo@wavecomp.com>
-  <mst@redhat.com>
-  <pasic@linux.ibm.com>
-  <borntraeger@de.ibm.com>
-  <rth@twiddle.net>
-  <atar4qemu@gmail.com>
-  <ehabkost@redhat.com>
-  <alex.williamson@redhat.com>
-  <qemu-arm@nongnu.org>
-  <stefanha@redhat.com>
-  <shorne@gmail.com>
-  <david@gibson.dropbear.id.au>
-  <qemu-riscv@nongnu.org>
-  <qemu-s390x@nongnu.org>
-  <kbastian@mail.uni-paderborn.de>
-  <cohuck@redhat.com>
-  <laurent@vivier.eu>
-  <qemu-ppc@nongnu.org>
-  <amarkovic@wavecomp.com>
-  <pbonzini@redhat.com>
- " <aurelien@aurel32.net>\0"
- "\01:1\0"
+ "Cc\0peter.maydell@linaro.org"
+  walling@linux.ibm.com
+  sagark@eecs.berkeley.edu
+  mst@redhat.com
+  palmer@sifive.com
+  mark.cave-ayland@ilande.co.uk
+  laurent@vivier.eu
+  Alistair.Francis@wdc.com
+  edgar.iglesias@gmail.com
+  arikalo@wavecomp.com
+  david@redhat.com
+  pasic@linux.ibm.com
+  borntraeger@de.ibm.com
+  rth@twiddle.net
+  atar4qemu@gmail.com
+  ehabkost@redhat.com
+  qemu-s390x@nongnu.org
+  qemu-arm@nongnu.org
+  stefanha@redhat.com
+  shorne@gmail.com
+  david@gibson.dropbear.id.au
+  qemu-riscv@nongnu.org
+  kbastian@mail.uni-paderborn.de
+  cohuck@redhat.com
+  alex.williamson@redhat.com
+  qemu-ppc@nongnu.org
+  amarkovic@wavecomp.com
+  pbonzini@redhat.com
+ " aurelien@aurel32.net\0"
+ "\00:1\0"
  "b\0"
  "Now that MemOp has been pushed down into the memory API, we can\n"
  "collapse the two byte swaps adjust_endianness and handle_bswap into\n"
@@ -219,210 +219,5 @@
  "     for (i = 0; i < mr->ioeventfd_nb; ++i) {\n"
  "--\n"
  1.8.3.1
- "\01:2\0"
- "b\0"
- "<html>\r\n"
- "<head>\r\n"
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n"
- "<style type=\"text/css\" style=\"display:none\"><!-- P { margin-top: 0px; margin-bottom: 0px; } .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(128, 0, 0); }--></style>\r\n"
- "</head>\r\n"
- "<body dir=\"ltr\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n"
- "<p></p>\r\n"
- "<div><span style=\"font-size: 12pt;\">Now that MemOp has been pushed down into the memory API, we can</span><br>\r\n"
- "</div>\r\n"
- "<div>collapse the two byte swaps adjust_endianness and handle_bswap into</div>\r\n"
- "<div>the former.</div>\r\n"
- "<div><br>\r\n"
- "</div>\r\n"
- "<div>Collapsing byte swaps along the I/O path enables additional endian</div>\r\n"
- "<div>inversion logic, e.g. SPARC64 Invert Endian TTE bit, with redundant</div>\r\n"
- "<div>byte swaps cancelling out.</div>\r\n"
- "<div><br>\r\n"
- "</div>\r\n"
- "<div>Signed-off-by: Tony Nguyen &lt;tony.nguyen@bt.com&gt;</div>\r\n"
- "<div>---</div>\r\n"
- "<div>&nbsp;accel/tcg/cputlb.c | 41 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;----------------------</div>\r\n"
- "<div>&nbsp;memory.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 30 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-------------</div>\r\n"
- "<div>&nbsp;2 files changed, 36 insertions(&#43;), 35 deletions(-)</div>\r\n"
- "<div><br>\r\n"
- "</div>\r\n"
- "<div>diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c</div>\r\n"
- "<div>index 5d88cec..e61b1eb 100644</div>\r\n"
- "<div>--- a/accel/tcg/cputlb.c</div>\r\n"
- "<div>&#43;&#43;&#43; b/accel/tcg/cputlb.c</div>\r\n"
- "<div>@@ -1209,26 &#43;1209,13 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,</div>\r\n"
- "<div>&nbsp;#endif</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp;/*</div>\r\n"
- "<div>- * Byte Swap Helper</div>\r\n"
- "<div>&#43; * Byte Swap Checker</div>\r\n"
- "<div>&nbsp; *</div>\r\n"
- "<div>- * This should all dead code away depending on the build host and</div>\r\n"
- "<div>- * access type.</div>\r\n"
- "<div>&#43; * Dead code should all go away depending on the build host and access type.</div>\r\n"
- "<div>&nbsp; */</div>\r\n"
- "<div>-</div>\r\n"
- "<div>-static inline uint64_t handle_bswap(uint64_t val, int size, bool big_endian)</div>\r\n"
- "<div>&#43;static inline bool need_bswap(bool big_endian)</div>\r\n"
- "<div>&nbsp;{</div>\r\n"
- "<div>- &nbsp; &nbsp;if ((big_endian &amp;&amp; NEED_BE_BSWAP) || (!big_endian &amp;&amp; NEED_LE_BSWAP)) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;switch (size) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 1: return val;</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 2: return bswap16(val);</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 4: return bswap32(val);</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 8: return bswap64(val);</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;default:</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g_assert_not_reached();</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>- &nbsp; &nbsp;} else {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;return val;</div>\r\n"
- "<div>- &nbsp; &nbsp;}</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;return (big_endian &amp;&amp; NEED_BE_BSWAP) || (!big_endian &amp;&amp; NEED_LE_BSWAP);</div>\r\n"
- "<div>&nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp;/*</div>\r\n"
- "<div>@@ -1259,6 &#43;1246,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;unsigned a_bits = get_alignment_bits(get_memop(oi));</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;void *haddr;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;uint64_t res;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;MemOp op;</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;/* Handle CPU specific unaligned behaviour */</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;if (addr &amp; ((1 &lt;&lt; a_bits) - 1)) {</div>\r\n"
- "<div>@@ -1304,9 &#43;1292,13 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;res = io_readx(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index],</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mmu_idx, addr, retaddr, access_type, SIZE_MEMOP(size));</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;return handle_bswap(res, size, big_endian);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op = SIZE_MEMOP(size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;if (need_bswap(big_endian)) {</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&#43;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;return io_readx(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index],</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mmu_idx, addr, retaddr, access_type, op);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;/* Handle slow unaligned access (it spans two pages or IO). &nbsp;*/</div>\r\n"
- "<div>@@ -1507,6 &#43;1499,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;const size_t tlb_off = offsetof(CPUTLBEntry, addr_write);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;unsigned a_bits = get_alignment_bits(get_memop(oi));</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;void *haddr;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;MemOp op;</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;/* Handle CPU specific unaligned behaviour */</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;if (addr &amp; ((1 &lt;&lt; a_bits) - 1)) {</div>\r\n"
- "<div>@@ -1552,9 &#43;1545,13 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op = SIZE_MEMOP(size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;if (need_bswap(big_endian)) {</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&#43;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;io_writex(env, &amp;env_tlb(env)-&gt;d[mmu_idx].iotlb[index], mmu_idx,</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;handle_bswap(val, size, big_endian),</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;addr, retaddr, SIZE_MEMOP(size));</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;val, addr, retaddr, op);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>diff --git a/memory.c b/memory.c</div>\r\n"
- "<div>index 6982e19..0277d3d 100644</div>\r\n"
- "<div>--- a/memory.c</div>\r\n"
- "<div>&#43;&#43;&#43; b/memory.c</div>\r\n"
- "<div>@@ -352,7 &#43;352,7 @@ static bool memory_region_big_endian(MemoryRegion *mr)</div>\r\n"
- "<div>&nbsp;#endif</div>\r\n"
- "<div>&nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>-static bool memory_region_wrong_endianness(MemoryRegion *mr)</div>\r\n"
- "<div>&#43;static bool memory_region_endianness_inverted(MemoryRegion *mr)</div>\r\n"
- "<div>&nbsp;{</div>\r\n"
- "<div>&nbsp;#ifdef TARGET_WORDS_BIGENDIAN</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;return mr-&gt;ops-&gt;endianness == DEVICE_LITTLE_ENDIAN;</div>\r\n"
- "<div>@@ -361,23 &#43;361,27 @@ static bool memory_region_wrong_endianness(MemoryRegion *mr)</div>\r\n"
- "<div>&nbsp;#endif</div>\r\n"
- "<div>&nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>-static void adjust_endianness(MemoryRegion *mr, uint64_t *data, unsigned size)</div>\r\n"
- "<div>&#43;static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)</div>\r\n"
- "<div>&nbsp;{</div>\r\n"
- "<div>- &nbsp; &nbsp;if (memory_region_wrong_endianness(mr)) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;switch (size) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 1:</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;if (memory_region_endianness_inverted(mr)) {</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;op ^= MO_BSWAP;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;}</div>\r\n"
- "<div>&#43;</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;if (op &amp; MO_BSWAP) {</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;switch (op &amp; MO_SIZE) {</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_8:</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 2:</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_16:</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap16(*data);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 4:</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_32:</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap32(*data);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;case 8:</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;case MO_64:</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*data = bswap64(*data);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default:</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;abort();</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g_assert_not_reached();</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;}</div>\r\n"
- "<div>@@ -1451,7 &#43;1455,7 @@ MemTxResult memory_region_dispatch_read(MemoryRegion *mr,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;r = memory_region_dispatch_read1(mr, addr, pval, size, attrs);</div>\r\n"
- "<div>- &nbsp; &nbsp;adjust_endianness(mr, pval, size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;adjust_endianness(mr, pval, op);</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;return r;</div>\r\n"
- "<div>&nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>@@ -1494,7 &#43;1498,7 @@ MemTxResult memory_region_dispatch_write(MemoryRegion *mr,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return MEMTX_DECODE_ERROR;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>- &nbsp; &nbsp;adjust_endianness(mr, &amp;data, size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp;adjust_endianness(mr, &amp;data, op);</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;if ((!kvm_eventfds_enabled()) &amp;&amp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;memory_region_dispatch_write_eventfds(mr, addr, data, size, attrs)) {</div>\r\n"
- "<div>@@ -2340,7 &#43;2344,7 @@ void memory_region_add_eventfd(MemoryRegion *mr,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;if (size) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, SIZE_MEMOP(size));</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;memory_region_transaction_begin();</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;for (i = 0; i &lt; mr-&gt;ioeventfd_nb; &#43;&#43;i) {</div>\r\n"
- "<div>@@ -2375,7 &#43;2379,7 @@ void memory_region_del_eventfd(MemoryRegion *mr,</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;unsigned i;</div>\r\n"
- "<div>&nbsp;</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;if (size) {</div>\r\n"
- "<div>- &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, size);</div>\r\n"
- "<div>&#43; &nbsp; &nbsp; &nbsp; &nbsp;adjust_endianness(mr, &amp;mrfd.data, SIZE_MEMOP(size));</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;}</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;memory_region_transaction_begin();</div>\r\n"
- "<div>&nbsp; &nbsp; &nbsp;for (i = 0; i &lt; mr-&gt;ioeventfd_nb; &#43;&#43;i) {</div>\r\n"
- "<div>--&nbsp;</div>\r\n"
- "<div>1.8.3.1</div>\r\n"
- "<div><br>\r\n"
- "<br>\r\n"
- "</div>\r\n"
- "<p><br>\r\n"
- "</p>\r\n"
- "</body>\r\n"
- "</html>\r\n"
 
-6ff50145499a748040d63cb3e485e5136668890ad8e10636a93138011ac4f013
+91fc513389ae8f75e6b2ce9d11f4bae7c2cf3898ab44f7ad8b27ccbe1b22e74c

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.