Re: [Xen-devel] [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread tony.nguyen
Hi Phillippe, On 8/16/19 7:58 PM, Philippe Mathieu-Daudé wrote: >On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: >> This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. >> >> v7: >[...] >> - Re-declared many native endian devices as little or big endian. This is why >> v7 has +1

[Xen-devel] [Qemu-devel] [PATCH v7 42/42] target/sparc: sun4u Invert Endian TTE bit

2019-08-16 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen Reviewed-by: Rich

[Xen-devel] [Qemu-devel] [PATCH v7 41/42] target/sparc: Add TLB entry with attributes

2019-08-16 Thread tony.nguyen
Append MemTxAttrs to interfaces so we can pass along up coming Invert Endian TTE bit on SPARC64. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- target/sparc/mmu_helper.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/

[Xen-devel] [Qemu-devel] [PATCH v7 39/42] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-08-16 Thread tony.nguyen
The fast path is taken when TLB_FLAGS_MASK is all zero. TLB_FORCE_SLOW is simply a TLB_FLAGS_MASK bit to force the slow path, there are no other side effects. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-all.h | 10 -- 1 file changed, 8 insertions(+),

[Xen-devel] [Qemu-devel] [PATCH v7 40/42] cputlb: Byte swap memory transaction attribute

2019-08-16 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Suggested-by: Richard Henderson Signed-off-by: Tony Nguyen Reviewed-by: Richard Hender

[Xen-devel] [Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path

2019-08-16 Thread tony.nguyen
Now that MemOp has been pushed down into the memory API, and callers are encoding endianness, we can collapse byte swaps along the I/O path into the accelerator and target independent adjust_endianness. Collapsing byte swaps along the I/O path enables additional endian inversion logic, e.g. SPARC6

[Xen-devel] [Qemu-devel] [PATCH v7 37/42] cputlb: Replace size and endian operands for MemOp

2019-08-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 172 +-- include/exec/memop.h | 6 ++ memory.c | 11 +--- 3 files changed, 90 ins

[Xen-devel] [Qemu-devel] [PATCH v7 35/42] exec: Delete DEVICE_HOST_ENDIAN

2019-08-16 Thread tony.nguyen
DEVICE_HOST_ENDIAN is conditional upon HOST_WORDS_BIGENDIAN. Code is cleaner if the single use of DEVICE_HOST_ENDIAN is instead directly conditional upon HOST_WORDS_BIGENDIAN. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 memory.c | 2 +- 2 files change

[Xen-devel] [Qemu-devel] [PATCH v7 36/42] memory: Access MemoryRegion with endianness

2019-08-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Call memory_region_dispatch_{read|write} with endianness encoded into the "MemOp op" operand. This patch does not change any behaviour as memory_region_dispatch_{read|write} is yet to handle the endi

[Xen-devel] [Qemu-devel] [PATCH v7 31/42] build: Correct non-common common-obj-* to obj-*

2019-08-16 Thread tony.nguyen
Preparation for replacing device_endian with MemOp. Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to comp

[Xen-devel] [Qemu-devel] [PATCH v7 34/42] exec: Delete device_endian

2019-08-16 Thread tony.nguyen
device_endian has been made redundant by MemOp. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-common.h | 8 1 file changed, 8 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 01a29ba..7eeb78c 100644 --- a/include/ex

[Xen-devel] [Qemu-devel] [PATCH v7 32/42] exec: Map device_endian onto MemOp

2019-08-16 Thread tony.nguyen
Preparation to replace device_endian with MemOp. Mapping device_endian onto MemOp limits behaviour changes to this relatively smaller patch. The next patch will replace all device_endian usages with the equivalent MemOp. That patch will be large but have no behaviour changes. A subsequent patch

[Xen-devel] [Qemu-devel] [PATCH v7 29/42] hw/ssi: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 30/42] hw/timer: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 26/42] hw/net: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 28/42] hw/sd: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 27/42] hw/pci-host: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 25/42] hw/misc: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 24/42] hw/isa: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 20/42] hw/gpio: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 21/42] hw/i2c: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 23/42] hw/intc: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 22/42] hw/input: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 19/42] hw/dma: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 16/42] hw/block: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 18/42] hw/display: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 17/42] hw/char: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 15/42] hw/audio: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Xen-devel] [Qemu-devel] [PATCH v7 14/42] exec: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v7 11/42] memory: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
Convert memory_region_dispatch_{read|write} operand "unsigned size" into a "MemOp op". Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/memop.h | 20 ++-- include/exec/memory.h | 9 + memory.c | 7 +-- 3 files changed, 24 ins

[Xen-devel] [Qemu-devel] [PATCH v7 13/42] target/mips: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v7 12/42] hw/s390x: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v7 08/42] hw/vfio: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 10/42] cputlb: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 09/42] exec: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 07/42] hw/virtio: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 06/42] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 03/42] memory: Introduce size_memop

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Ng

[Xen-devel] [Qemu-devel] [PATCH v7 05/42] hw/s390x: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 04/42] target/mips: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v7 01/42] configure: Define TARGET_ALIGNED_ONLY

2019-08-16 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poisoned TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe M

[Xen-devel] [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-15 Thread tony.nguyen
This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. It is an attempt of the instructions outlined by Richard Henderson to Mark Cave-Ayland. Tested with OpenBSD on sun4u. Solaris 10 is my actual goal, but unfortunately a separate keyboard issue remains in the way. On 01/11/17

Re: [Xen-devel] [Qemu-devel] [PATCH v6 26/26] target/sparc: sun4u Invert Endian TTE bit

2019-08-07 Thread tony.nguyen
Sorry, I missed a tag.? Tested-by: Mark Cave-Ayland ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH v6 09/26] exec: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Sorry, I missed a tag. Reviewed-by: Philippe Mathieu-Daudé ? ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH v6 06/26] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Sorry, I missed a tag. Reviewed-by: Philippe Mathieu-Daudé ? ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH v6 04/26] target/mips: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Sorry, I missed a tag. Reviewed-by: Philippe Mathieu-Daudé ? ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH v6 10/26] cputlb: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Sorry, I missed a tag. Reviewed-by: Philippe Mathieu-Daudé ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE

2019-08-07 Thread tony.nguyen
On 8/7/19 8:37 PM, Philippe Mathieu-Daudé wrote: > I'm confused I think I already reviewed various patches of your previous ?> series but don't see my Reviewed-by tags.? Apologies Philippe! I am the confused one here =/ Will append. Thank you very much for the reviews and qemu-devel newbie t

[Xen-devel] [Qemu-devel] [PATCH v6 26/26] target/sparc: sun4u Invert Endian TTE bit

2019-08-07 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen Reviewed-by: Rich

[Xen-devel] [Qemu-devel] [PATCH v6 25/26] target/sparc: Add TLB entry with attributes

2019-08-07 Thread tony.nguyen
Append MemTxAttrs to interfaces so we can pass along up coming Invert Endian TTE bit on SPARC64. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- target/sparc/mmu_helper.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/

[Xen-devel] [Qemu-devel] [PATCH v6 24/26] cputlb: Byte swap memory transaction attribute

2019-08-07 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Suggested-by: Richard Henderson Signed-off-by: Tony Nguyen Reviewed-by: Richard Hender

[Xen-devel] [Qemu-devel] [PATCH v6 22/26] memory: Single byte swap along the I/O path

2019-08-07 Thread tony.nguyen
Now that MemOp has been pushed down into the memory API, and callers are encoding endianness, we can collapse byte swaps along the I/O path into the accelerator and target independent adjust_endianness. Collapsing byte swaps along the I/O path enables additional endian inversion logic, e.g. SPARC6

[Xen-devel] [Qemu-devel] [PATCH v6 23/26] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-08-07 Thread tony.nguyen
The fast path is taken when TLB_FLAGS_MASK is all zero. TLB_FORCE_SLOW is simply a TLB_FLAGS_MASK bit to force the slow path, there are no other side effects. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-all.h | 10 -- 1 file changed, 8 insertions(+),

[Xen-devel] [Qemu-devel] [PATCH v6 20/26] memory: Access MemoryRegion with endianness

2019-08-07 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Call memory_region_dispatch_{read|write} with endianness encoded into the "MemOp op" operand. This patch does not change any behaviour as memory_region_dispatch_{read|write} is yet to handle the endi

[Xen-devel] [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp

2019-08-07 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 170 +-- include/exec/memop.h | 6 ++ memory.c | 11 +--- 3 files changed, 90 ins

[Xen-devel] [Qemu-devel] [PATCH v6 09/26] exec: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 19/26] exec: Delete DEVICE_HOST_ENDIAN

2019-08-07 Thread tony.nguyen
DEVICE_HOST_ENDIAN is conditional upon HOST_WORDS_BIGENDIAN. Code is cleaner if the single use of DEVICE_HOST_ENDIAN is instead directly conditional upon HOST_WORDS_BIGENDIAN. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 memory.c | 6 +- 2 files ch

[Xen-devel] [Qemu-devel] [PATCH v6 04/26] target/mips: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 15/26] build: Correct non-common common-obj-* to obj-*

2019-08-07 Thread tony.nguyen
Preparation for replacing device_endian with MemOp. Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to comp

[Xen-devel] [Qemu-devel] [PATCH v6 11/26] memory: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Convert memory_region_dispatch_{read|write} operand "unsigned size" into a "MemOp op". Signed-off-by: Tony Nguyen --- include/exec/memop.h | 18 +- include/exec/memory.h | 9 + memory.c | 7 +-- 3 files changed, 23 insertions(+), 11 deletions(-) diff

[Xen-devel] [Qemu-devel] [PATCH v6 18/26] exec: Delete device_endian

2019-08-07 Thread tony.nguyen
device_endian has been made redundant by MemOp. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 1 file changed, 8 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 01a29ba..7eeb78c 100644 --- a/include/exec/cpu-common.h +++ b/include/ex

[Xen-devel] [Qemu-devel] [PATCH v6 08/26] hw/vfio: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 16/26] exec: Map device_endian onto MemOp

2019-08-07 Thread tony.nguyen
Preparation to replace device_endian with MemOp. Mapping device_endian onto MemOp limits behaviour changes to this relatively smaller patch. The next patch will replace all device_endian usages with the equivalent MemOp. That patch will be large but have no behaviour changes. A subsequent patch

[Xen-devel] [Qemu-devel] [PATCH v6 05/26] hw/s390x: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 01/26] configure: Define TARGET_ALIGNED_ONLY

2019-08-07 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poisoned TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe M

[Xen-devel] [Qemu-devel] [PATCH v6 10/26] cputlb: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 07/26] hw/virtio: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Xen-devel] [Qemu-devel] [PATCH v6 03/26] memory: Introduce size_memop

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Ng

[Xen-devel] [Qemu-devel] [PATCH v6 12/26] hw/s390x: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE

2019-08-07 Thread tony.nguyen
This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. It is an attempt of the instructions outlined by Richard Henderson to Mark Cave-Ayland. Tested with OpenBSD on sun4u. Solaris 10 is my actual goal, but unfortunately a separate keyboard issue remains in the way. On 01/11/17

[Xen-devel] [Qemu-devel] [PATCH v6 14/26] exec: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v6 13/26] target/mips: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Xen-devel] [Qemu-devel] [PATCH v6 06/26] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver