On Wed, Sep 11, 2019 at 09:22:39AM -0400, Richard Henderson wrote:
> I would be hesitant to call this just "lduw_be"; I think that's confusing when
> it's calling lduw_be_p. But perhaps "wrap_*" or "wide_*"?
Agree, some hamming distance is needed.
"wrap_*", "wide_*", or "direct_*" all works for
On Tue, Sep 10, 2019 at 09:43:53PM -0400, Richard Henderson wrote:
> Handle bswap on ram directly in load/store_helper. This fixes a
> bug with the previous implementation in that one cannot use the
> I/O path for RAM.
>
> Fixes: a26fc6f5152b47f1
> Signed-off-by: Richard Henderson
> ---
> inclu
rchState *env,
> target_ulong addr,
>TCGMemOpIdx oi, uintptr_t retaddr)
> {
> return load_helper(env, addr, oi, retaddr, MO_BEUL, true,
> - full_be_ldul_cmmu);
> + full_be_ldul_cmmu, direct_ldul_be);
> }
>
> uint32_t helper_be_ldl_cmmu(CPUArchState *env, target_ulong addr,
> @@ -1866,12 +1871,12 @@ uint64_t helper_le_ldq_cmmu(CPUArchState *env,
> target_ulong addr,
> TCGMemOpIdx oi, uintptr_t retaddr)
> {
> return load_helper(env, addr, oi, retaddr, MO_LEQ, true,
> - helper_le_ldq_cmmu);
> + helper_le_ldq_cmmu, ldq_le_p);
> }
>
> uint64_t helper_be_ldq_cmmu(CPUArchState *env, target_ulong addr,
> TCGMemOpIdx oi, uintptr_t retaddr)
> {
> return load_helper(env, addr, oi, retaddr, MO_BEQ, true,
> - helper_be_ldq_cmmu);
> + helper_be_ldq_cmmu, ldq_be_p);
> }
> --
> 2.17.1
>
>
Reviewed-by: Tony Nguyen
On Tue, Sep 03, 2019 at 05:50:56PM +0100, Peter Maydell wrote:
> Do you have a backtrace of QEMU from the segfault? I'm having trouble
> thinking of what the situation is when we'd try to invoke the
> read handler on io_mem_notdirty...
Using tcg-next
https://github.com/rth7680/qemu/commit/c25c283
On Tue, Sep 03, 2019 at 11:25:28AM +0100, Peter Maydell wrote:
> On Mon, 2 Sep 2019 at 02:36, Tony Nguyen wrote:
> >
> > Existing read rejecting validator was mistakenly cleared.
> >
> > Reads dispatched to io_mem_notdirty then segfaults as there is no read
> &
Existing read rejecting validator was mistakenly cleared.
Reads dispatched to io_mem_notdirty then segfaults as there is no read
handler.
Signed-off-by: Tony Nguyen
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index 1df966d17a..05d664541f
Hi Maxim,
On Mon, Aug 26, 2019 at 04:50:51PM +0300, Maxim Levitsky wrote:
> 2. is it portable enought for us to use malloc_usable_size
> to get the size of malloced pointer in the autofree callback?
> This function is aviable in glibc (but no wrapper in glib).
We will also need to consider host p
kefile.include b/tests/Makefile.include
> index 49684fd4f4..f5ac09549c 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -1135,7 +1135,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
> AVOCADO_SHOW=app
> AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter
> %-softmmu,$(TARGET_DIRS)))
>
> -ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2)
> +ifneq ($(PYTHON2),y)
> $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
> $(call quiet-command, \
> $(PYTHON) -m venv --system-site-packages $@, \
> --
> 2.21.0
>
>
Reviewed-by: Tony Nguyen
-off-by: Tony Nguyen
---
hw/timer/a9gtimer.c | 4 ++--
hw/timer/arm_mptimer.c | 4 ++--
hw/timer/arm_timer.c| 4 ++--
hw/timer/armv7m_systick.c | 2 +-
hw/timer/aspeed_rtc.c | 2 +-
hw/timer/cadence_ttc.c | 2 +-
hw/timer/grlib_gptimer.c| 2 +-
hw/timer/hpet.c
-off-by: Tony Nguyen
---
hw/pci-host/bonito.c| 2 +-
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index ceee463a11..c4bb9239b0 100644
--- a/hw/pci-host/bonito.c
+++ b
-off-by: Tony Nguyen
---
hw/ssi/mss-spi.c | 2 +-
hw/ssi/pl022.c | 2 +-
hw/ssi/stm32f2xx_spi.c | 2 +-
hw/ssi/xilinx_spips.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ssi/mss-spi.c b/hw/ssi/mss-spi.c
index 3050fabb69..914f90f3ad 100644
--- a/hw/ssi
-off-by: Tony Nguyen
---
hw/net/allwinner_emac.c | 2 +-
hw/net/imx_fec.c| 2 +-
hw/net/lan9118.c| 4 ++--
hw/net/lance.c | 2 +-
hw/net/smc91c111.c | 2 +-
hw/net/stellaris_enet.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/net
-off-by: Tony Nguyen
---
hw/sd/pl181.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 8033fe455d..f19d8764e8 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -451,7 +451,7 @@ static void pl181_write(void *opaque, hwaddr offset,
static
-off-by: Tony Nguyen
---
hw/misc/a9scu.c| 2 +-
hw/misc/applesmc.c | 6 +++---
hw/misc/arm11scu.c | 2 +-
hw/misc/arm_integrator_debug.c | 2 +-
hw/misc/arm_l2x0.c | 2 +-
hw/misc/edu.c | 2 +-
hw/misc/mos6522.c | 2
-off-by: Tony Nguyen
---
hw/intc/arm_gic.c | 12 ++--
hw/intc/arm_gicv3.c| 4 ++--
hw/intc/arm_gicv3_its_common.c | 2 +-
hw/intc/etraxfs_pic.c | 2 +-
hw/intc/imx_avic.c | 2 +-
hw/intc/imx_gpcv2.c| 2 +-
hw/intc/pl190.c
-off-by: Tony Nguyen
---
hw/input/pl050.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 1123037b38..873f44abad 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -139,7 +139,7 @@ static void pl050_write(void *opaque, hwaddr
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 compile.
Signed-off-by: Tony Nguyen
---
hw/block
-off-by: Tony Nguyen
---
hw/ipack/tpci200.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/ipack/tpci200.c b/hw/ipack/tpci200.c
index f931d4df62..c90fabab7c 100644
--- a/hw/ipack/tpci200.c
+++ b/hw/ipack/tpci200.c
@@ -526,7 +526,7 @@ static void tpci200_write_las3
-off-by: Tony Nguyen
---
hw/dma/bcm2835_dma.c | 4 ++--
hw/dma/etraxfs_dma.c | 14 +++---
hw/dma/i8257.c | 4 ++--
hw/dma/pl080.c | 2 +-
hw/dma/pl330.c | 2 +-
hw/dma/puv3_dma.c| 2 +-
hw/dma/sparc32_dma.c | 2 +-
7 files changed, 15 insertions(+), 15 deletions
-off-by: Tony Nguyen
---
hw/gpio/pl061.c | 2 +-
hw/gpio/puv3_gpio.c | 2 +-
hw/gpio/zaurus.c| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index 2a828260bd..25371d6c5a 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -341,7
-off-by: Tony Nguyen
---
hw/isa/vt82c686.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 50bd28fa82..400f2b3c87 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -109,7 +109,7 @@ static uint64_t superio_ioport_readb(void
-off-by: Tony Nguyen
---
hw/core/empty_slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c
index 3ba450e1ca..2785b6acf9 100644
--- a/hw/core/empty_slot.c
+++ b/hw/core/empty_slot.c
@@ -49,7 +49,7 @@ static void empty_slot_write(void
-off-by: Tony Nguyen
---
hw/display/exynos4210_fimd.c | 2 +-
hw/display/jazz_led.c| 2 +-
hw/display/pl110.c | 2 +-
hw/display/tc6393xb.c| 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c
-off-by: Tony Nguyen
---
hw/char/cadence_uart.c | 2 +-
hw/char/escc.c | 2 +-
hw/char/etraxfs_ser.c| 2 +-
hw/char/grlib_apbuart.c | 2 +-
hw/char/imx_serial.c | 2 +-
hw/char/lm32_uart.c | 2 +-
hw/char/milkymist-uart.c | 2 +-
hw/char/pl011.c | 2 +-
8 files
-off-by: Tony Nguyen
Acked-by: David Gibson
---
hw/i2c/exynos4210_i2c.c | 2 +-
hw/i2c/imx_i2c.c| 2 +-
hw/i2c/mpc_i2c.c| 2 +-
hw/i2c/versatile_i2c.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/i2c/exynos4210_i2c.c b/hw/i2c/exynos4210_i2c.c
index
- if just a bit bucket, re-declare as DEVICE_HOST_ENDIAN
- if PCI, re-declare as DEVICE_LITTLE_ENDIAN.
- if for {ARM|unicore32} only, re-declare as DEVICE_LITTLE_ENDIAN.
- if for SPARC only, re-declare as DEVICE_BIG_ENDIAN.
Likely still not %100 correct, but I think more than before.
Since RFC:
- A
-off-by: Tony Nguyen
---
hw/block/fdc.c | 4 ++--
hw/block/onenand.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index ac5d31e8c1..2745586982 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -984,13 +984,13 @@ static void
-off-by: Tony Nguyen
---
hw/audio/cs4231.c | 2 +-
hw/audio/intel-hda.c | 2 +-
hw/audio/marvell_88w8618.c | 2 +-
hw/audio/milkymist-ac97.c | 2 +-
hw/audio/pl041.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231
device_endian has been made redundant by MemOp.
Signed-off-by: Tony Nguyen
---
include/exec/memory.h | 3 ---
memory.c | 19 +--
memory_ldst.inc.c | 18 ++
3 files changed, 7 insertions(+), 33 deletions(-)
diff --git a/include/exec/memory.h b
memory_region_big_endian is no longer useful now we are consistently
using MemOp for endianness.
Signed-off-by: Tony Nguyen
---
memory.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/memory.c b/memory.c
index ee7559a18c..b647a8d3dd 100644
--- a/memory.c
+++ b
Simplify code with MemOp short hand for host endianness, 0.
typedef enum MemOp {
/* snip */
#ifdef HOST_WORDS_BIGENDIAN
MO_LE= MO_BSWAP,
MO_BE= 0,
#else
MO_LE= 0,
MO_BE= MO_BSWAP,
#endif
/* snip */
};
Signed-off-by: Tony Nguyen
---
include
Simplify endianness comparisons with consistent use of the more
expressive MemOp.
Suggested-by: Richard Henderson
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
exec.c | 8 +++
hw/adc/stm32f2xx_adc.c | 2 +-
hw/arm
Simplify endianness comparisons with consistent use of the more
expressive MemOp.
Suggested-by: Richard Henderson
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
hw/audio/cs4231.c | 2 +-
hw/audio/milkymist-ac97.c | 2 +-
hw/char/escc.c
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 01a29ba571..7eeb78c48b 100644
--- a
Simplify endianness comparisons with consistent use of the more
expressive MemOp.
Suggested-by: Richard Henderson
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
hw/char/serial.c | 2 +-
include/exec/memory.h| 6 +++---
include/hw/char
will then delete unused device_endian.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
hw/char/serial.c | 18 ++
include/exec/cpu-common.h | 10 +++---
memory.c | 1 -
3 files changed, 13 insertions(+), 16 deletions(-)
diff --git a
bit in SPARCv9 MMU TTE
Based-on:
[RFC PATCH 00/17] Declare device little or big endian
Tony Nguyen (9):
exec: Map device_endian onto MemOp
exec: Replace DEVICE_NATIVE_ENDIAN with MO_TE
exec: Replace DEVICE_LITTLE_ENDIAN with MO_LE
exec: Replace DEVICE_BIG_ENDIAN with MO_BE
exec
=)
Signed-off-by: Tony Nguyen
---
hw/timer/a9gtimer.c | 4 ++--
hw/timer/arm_mptimer.c | 4 ++--
hw/timer/arm_timer.c| 4 ++--
hw/timer/armv7m_systick.c | 2 +-
hw/timer/aspeed_rtc.c | 2 +-
hw/timer/cadence_ttc.c | 2 +-
hw/timer/grlib_gptimer.c| 2 +-
hw/timer
=)
Signed-off-by: Tony Nguyen
---
hw/ssi/mss-spi.c | 2 +-
hw/ssi/pl022.c | 2 +-
hw/ssi/stm32f2xx_spi.c | 2 +-
hw/ssi/xilinx_spips.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ssi/mss-spi.c b/hw/ssi/mss-spi.c
index 3050fabb69..914f90f3ad 100644
--- a/hw/ssi
=)
Signed-off-by: Tony Nguyen
---
hw/pci-host/q35.c | 2 +-
hw/pci-host/versatile.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 158d270b9f..485e2a02af 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -289,7 +289,7
=)
Signed-off-by: Tony Nguyen
---
hw/sd/pl181.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 8033fe455d..f19d8764e8 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -451,7 +451,7 @@ static void pl181_write(void *opaque, hwaddr offset,
static
=)
Signed-off-by: Tony Nguyen
---
hw/net/allwinner_emac.c | 2 +-
hw/net/imx_fec.c| 2 +-
hw/net/lan9118.c| 4 ++--
hw/net/lance.c | 2 +-
hw/net/smc91c111.c | 2 +-
hw/net/stellaris_enet.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/net
=)
Signed-off-by: Tony Nguyen
---
hw/isa/vt82c686.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 50bd28fa82..400f2b3c87 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -109,7 +109,7 @@ static uint64_t superio_ioport_readb(void
=)
Signed-off-by: Tony Nguyen
---
hw/intc/arm_gic.c | 12 ++--
hw/intc/arm_gicv3.c | 4 ++--
hw/intc/etraxfs_pic.c | 2 +-
hw/intc/imx_avic.c| 2 +-
hw/intc/imx_gpcv2.c | 2 +-
hw/intc/pl190.c | 2 +-
hw/intc/puv3_intc.c | 2 +-
7 files changed, 13 insertions(+), 13
=)
Signed-off-by: Tony Nguyen
---
hw/audio/cs4231.c | 2 +-
hw/audio/marvell_88w8618.c | 2 +-
hw/audio/milkymist-ac97.c | 2 +-
hw/audio/pl041.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c
index b5d3e895ce..1ff9093efa
enuinely native endian devices
being incorrectly declared as little or big endian, but should not
introduce regressions for current targets.
Please help spot devices which are genuinely native endian.
Thanks!
Tony Nguyen (17):
hw/audio: Declare device little or big endian
hw/block: Declare device
=)
Signed-off-by: Tony Nguyen
---
hw/i2c/imx_i2c.c | 2 +-
hw/i2c/mpc_i2c.c | 2 +-
hw/i2c/versatile_i2c.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/i2c/imx_i2c.c b/hw/i2c/imx_i2c.c
index 30b9aea247..cc2689d967 100644
--- a/hw/i2c/imx_i2c.c
+++ b/hw/i2c
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 compile.
Signed-off-by: Tony Nguyen
---
hw/audio
=)
Signed-off-by: Tony Nguyen
---
hw/gpio/pl061.c | 2 +-
hw/gpio/zaurus.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index 2a828260bd..25371d6c5a 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -341,7 +341,7 @@ static void
=)
Signed-off-by: Tony Nguyen
---
hw/misc/a9scu.c| 2 +-
hw/misc/applesmc.c | 6 +++---
hw/misc/arm11scu.c | 2 +-
hw/misc/arm_l2x0.c | 2 +-
hw/misc/puv3_pm.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c
index 45c91db303..59335ca72f 100644
=)
Signed-off-by: Tony Nguyen
---
hw/dma/bcm2835_dma.c | 4 ++--
hw/dma/etraxfs_dma.c | 2 +-
hw/dma/pl080.c | 2 +-
hw/dma/pl330.c | 2 +-
hw/dma/puv3_dma.c| 2 +-
hw/dma/sparc32_dma.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/dma/bcm2835_dma.c b/hw/dma
=)
Signed-off-by: Tony Nguyen
---
hw/input/pl050.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 1123037b38..873f44abad 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -139,7 +139,7 @@ static void pl050_write(void *opaque, hwaddr
=)
Signed-off-by: Tony Nguyen
---
hw/display/pl110.c| 2 +-
hw/display/tc6393xb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/pl110.c b/hw/display/pl110.c
index c2991a28d2..3831505165 100644
--- a/hw/display/pl110.c
+++ b/hw/display/pl110.c
@@ -473,7 +473,7
=)
Signed-off-by: Tony Nguyen
---
hw/char/cadence_uart.c | 2 +-
hw/char/escc.c | 2 +-
hw/char/etraxfs_ser.c| 2 +-
hw/char/grlib_apbuart.c | 2 +-
hw/char/imx_serial.c | 2 +-
hw/char/lm32_uart.c | 2 +-
hw/char/milkymist-uart.c | 2 +-
hw/char/pl011.c | 2 +-
8 files
=)
Signed-off-by: Tony Nguyen
---
hw/block/onenand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index fcc5a69b90..95fc0443d3 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -771,7 +771,7 @@ static void onenand_write(void *opaque
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
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
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
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
. SPARC64 Invert Endian TTE bit, with redundant
byte swaps cancelling out.
Suggested-by: Richard Henderson
Signed-off-by: Tony Nguyen
---
accel/tcg/cputlb.c | 42 ++--
exec.c | 17 +++-
hw/virtio/virtio-pci.c | 10 +++
memory.c | 33
handle the endianness.
Once it does handle endianness, callers with byte swaps can collapse
them into adjust_endianness.
Signed-off-by: Tony Nguyen
---
accel/tcg/cputlb.c | 8 ++--
exec.c | 13 +++--
hw/intc/armv7m_nvic.c| 15 ---
hw/s390x/s390-
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
memory_ldst.inc.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/memory_ldst.inc.c b/memory_ldst.inc.c
index 1e8a2fc3ba..de658c40c4 100644
--- a/memory_ldst.inc.c
+++ b/memory_ldst.inc.c
@@ -
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Aleksandar Markovic
---
target/mips/op_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 1f0e88364a..34bcc8d884 100644
--- a/target/mi
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 +--
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
accel/tcg/cputlb.c | 8
1 file changed, 4 insertions(+)
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/s390x/s390-pci-inst.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 0c958fc391..0e92a372ca 100644
--- a/hw/s390x/s390
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
exec.c| 6 --
memory_ldst.inc.c | 18 +-
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/vfio/pci-quirks.c | 6 --
1 file changed, 4 insertions(+),
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/virtio/virtio-pci.c | 7 +--
1 file changed, 5 insertions(+)
Preparation for collapsing the two byte swaps adjust_endianness and
handle_bswap into the former.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
accel/tcg/cputlb.c | 170 +--
include/exec/memop.h | 6 ++
2 files changed, 87 insertions
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/s390x/s390-pci-inst.c | 8 +---
1 file changed, 5 insertions(+
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
hw/intc/armv7m_nvic.c | 12
1 file changed, 8 ins
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Reviewed-by: Aleksandar Markovic
---
target/mips/op_helper.c | 5 +
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.
Preparation for collapsing the two byte swaps, adjust_endianness and
handle_bswap, along the I/O path.
Target dependant attributes are conditionalized upon NEED_CPU_H.
Signed-off-by: Tony Nguyen
Acked-by: David Gibson
Reviewed-by: Richard Henderson
Acked-by: Cornelia Huck
---
MAINTAINERS
From: 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
Preparation for collapsing the two byte swaps, adjust_endianness and
handle_bswap, along the I/O path.
Target dependant attributes are conditionalized upon NEED_CPU_H.
Signed-off-by: Tony Nguyen
Acked-by: David Gibson
Reviewed-by: Richard Henderson
Acked-by: Cornelia Huck
---
MAINTAINERS
. SPARC64 Invert Endian TTE bit, with redundant
byte swaps cancelling out.
Suggested-by: Richard Henderson
Signed-off-by: Tony Nguyen
---
accel/tcg/cputlb.c | 42 ++--
exec.c | 17 +++-
hw/virtio/virtio-pci.c | 10 +++
memory.c | 33
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
memory_ldst.inc.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/memory_ldst.inc.c b/memory_ldst.inc.c
index 1e8a2fc3ba..de658c40c4 100644
--- a/memory_ldst.inc.c
+++ b/memory_ldst.inc.c
@@ -
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
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
target/mips/op_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 1f0e88364a..34bcc8d884 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_
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
alls.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/s390x/s390-pci-inst.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 0c958fc391..0e92a372ca 100644
--- a/hw/s390x/s390
Preparation for collapsing the two byte swaps adjust_endianness and
handle_bswap into the former.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
---
accel/tcg/cputlb.c | 170 +--
include/exec/memop.h | 6 ++
2 files changed, 87 insertions
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/vfio/pci-quirks.c | 6 --
1 file changed, 4 insertions(+),
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
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 +--
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/virtio/virtio-pci.c | 7 +--
1 file changed, 5 insertions(+)
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
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Richard Henderson
Reviewed-by: Cornelia Huck
---
hw/s390x/s390-pci-inst.c | 8 +---
1 file changed, 5 insertions(+
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
exec.c| 6 --
memory_ldst.inc.c | 18 +-
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
hw/intc/armv7m_nvic.c | 12
1 file changed, 8 ins
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
accel/tcg/cputlb.c | 8
1 file changed, 4 insertions(+)
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.
ot;unsigned size"
will be converted into a "MemOp op".
As size_memop is a no-op, this patch does not change any behaviour.
Signed-off-by: Tony Nguyen
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/mips/op_helper.c | 5 +++--
1 file changed, 3 insertions
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
96 matches
Mail list logo