[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path |
Date: |
Sun, 18 Aug 2019 13:46:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/16/19 8:38 AM, address@hidden wrote:
> +static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)
> {
> + if ((op & MO_BSWAP) != mr->ops->endianness) {
> + switch (op & MO_SIZE) {
You'll want to use devend_memop() here, as previously discussed.
> @@ -2331,7 +2322,7 @@ void memory_region_add_eventfd(MemoryRegion *mr,
> }
>
> if (size) {
> - adjust_endianness(mr, &mrfd.data, size);
> + adjust_endianness(mr, &mrfd.data, size_memop(size));
> }
> memory_region_transaction_begin();
> for (i = 0; i < mr->ioeventfd_nb; ++i) {
> @@ -2366,7 +2357,7 @@ void memory_region_del_eventfd(MemoryRegion *mr,
> unsigned i;
>
> if (size) {
> - adjust_endianness(mr, &mrfd.data, size);
> + adjust_endianness(mr, &mrfd.data, size_memop(size));
> }
> memory_region_transaction_begin();
> for (i = 0; i < mr->ioeventfd_nb; ++i) {
To preserve behaviour it would appear that these need MO_TE.
r~
- [Qemu-devel] [PATCH v7 29/42] hw/ssi: Declare device little or big endian, (continued)
- [Qemu-devel] [PATCH v7 29/42] hw/ssi: Declare device little or big endian, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 32/42] exec: Map device_endian onto MemOp, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 30/42] hw/timer: Declare device little or big endian, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 34/42] exec: Delete device_endian, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 31/42] build: Correct non-common common-obj-* to obj-*, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 35/42] exec: Delete DEVICE_HOST_ENDIAN, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 36/42] memory: Access MemoryRegion with endianness, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 39/42] cpu: TLB_FLAGS_MASK bit to force memory slow path, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path, tony.nguyen, 2019/08/16
- Re: [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path,
Richard Henderson <=
- [Qemu-devel] [PATCH v7 40/42] cputlb: Byte swap memory transaction attribute, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 41/42] target/sparc: Add TLB entry with attributes, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 42/42] target/sparc: sun4u Invert Endian TTE bit, tony.nguyen, 2019/08/16
- [Qemu-devel] [PATCH v7 37/42] cputlb: Replace size and endian operands for MemOp, tony.nguyen, 2019/08/16
- Re: [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE, Philippe Mathieu-Daudé, 2019/08/16
- [Qemu-devel] [PATCH v7 33/42] exec: Replace device_endian with MemOp, tony.nguyen, 2019/08/16