[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-riscv] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap
From: |
Richard Henderson |
Subject: |
Re: [Qemu-riscv] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path |
Date: |
Fri, 26 Jul 2019 07:29:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 7/26/19 2:26 AM, Paolo Bonzini wrote:
> On 26/07/19 08:47, address@hidden wrote:
>> + op = SIZE_MEMOP(size);
>> + if (need_bswap(big_endian)) {
>> + op ^= MO_BSWAP;
>> + }
>
> And this has the same issue as the first version. It should be
>
> op = SIZE_MEMOP(size) | (big_endian ? MO_BE : MO_LE);
>
> and everything should work. If it doesn't (and indeed it doesn't :)) it
> means you have bugs somewhere else.
As I mentioned against patch 9, which also touches this area, it should be
using the MemOp that is already passed in to this function instead of building
a new one from scratch.
But, yes, any failure in that would mean bugs somewhere else. ;-)
r~
- Re: [Qemu-riscv] [Qemu-devel] [PATCH v5 08/15] exec: Access MemoryRegion with MemOp, (continued)
- [Qemu-riscv] [Qemu-devel] [PATCH v5 09/15] cputlb: Access MemoryRegion with MemOp, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 10/15] memory: Access MemoryRegion with MemOp semantics, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 12/15] cpu: TLB_FLAGS_MASK bit to force memory slow path, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 13/15] cputlb: Byte swap memory transaction attribute, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 14/15] target/sparc: Add TLB entry with attributes, tony.nguyen, 2019/07/26
- [Qemu-riscv] [Qemu-devel] [PATCH v5 15/15] target/sparc: sun4u Invert Endian TTE bit, tony.nguyen, 2019/07/26