[Qemu-devel] [PATCH v3 11/30] target/s390x: implement MOVE NUMERICS

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h

[Qemu-devel] [PATCH v3 14/30] target/s390x: improve 24-bit and 31-bit addresses read

2017-05-31 Thread Aurelien Jarno
-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 71 +-- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 95f701dae2

[Qemu-devel] [PATCH v3 13/30] target/s390x: implement MOVE ZONES

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h

[Qemu-devel] [PATCH v3 00/30] target/s390x: fix, improve and implement some more instructions

2017-05-31 Thread Aurelien Jarno
t in STORE PAIR TO QUADWORD using MO_ALIGN16 - remove side effect flags from COMPARE AND SIGNAL helpers - pass the tst value as an argument ot the TRANSLATE ONE/TWO TO ONE/TWO helper and check for the M3 value - add a patch to enable the ETF2-Enhancement Facility Aurelien Jarno (30): target/s390x: r

[Qemu-devel] [PATCH v3 01/30] target/s390x: remove dead code in translate.c

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Aurelien Jarno --- target/s390x/translate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 97ca639a34..f7598184a6 100644 --- a

[Qemu-devel] [PATCH v3 02/30] target/s390x: remove some Linux assumptions from IPTE

2017-05-31 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/cpu.h| 2 ++ target/s390x/mem_helper.c | 17 ++--- target/s390x/mmu_helper.c | 2 -- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 79235cfa45..ba3d50b8e0 100644

[Qemu-devel] [PATCH v3 23/30] target/s390x: implement PACK ASCII

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 35 +++ target/s390x/translate.c | 16 4 files changed, 54 insertions(+) diff

[Qemu-devel] [PATCH v3 18/30] target/s390x: implement COMPARE LOGICAL LONG

2017-05-31 Thread Aurelien Jarno
As CLCL and CLCLE mostly differ by their operands, use a common do_clcl helper. Another difference is that CLCL is not interruptible. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x

[Qemu-devel] [PATCH v3 30/30] target/s390x: update maximum TCG model to z800

2017-05-31 Thread Aurelien Jarno
At the same time fix the TCG version of get_max_cpu_model to return the maximum model like on KVM. Remove the ETF2 and long-displacement facilities from the additional features as it is included in the z800. Signed-off-by: Aurelien Jarno --- target/s390x/cpu_models.c | 13 ++--- 1 file

[Qemu-devel] [PATCH v3 26/30] target/s390x: implement UNPACK UNICODE

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 49 -- target/s390x/translate.c | 18 + 4 files changed, 60

[Qemu-devel] [PATCH v3 21/30] target/s390x: implement COMPARE LOGICAL LONG UNICODE

2017-05-31 Thread Aurelien Jarno
For that we need to make program_interrupt available to qemu-user. Fortunately there is almost nothing to change as both kvm_enabled and CONFIG_KVM evaluate to false in that case. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x

[Qemu-devel] [PATCH v3 04/30] target/s390x: implement TEST AND SET

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 10 ++ 2 files changed, 13 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index f818437069..0f70acea5c 100644 --- a

[Qemu-devel] [PATCH v3 15/30] target/s390x: improve 24-bit and 31-bit addresses write

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2425bfc984..2113494983 100644 --- a

[Qemu-devel] [PATCH v3 16/30] target/s390x: improve 24-bit and 31-bit lengths read/write

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2113494983..98a7aa22d3

[Qemu-devel] [PATCH v3 28/30] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-31 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 9 + target/s390x/mem_helper.c | 45 + target/s390x/translate.c | 30 ++ 4 files changed, 85 insertions(+) diff

[Qemu-devel] [PATCH v3 27/30] target/s390x: implement TEST DECIMAL

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 3 +++ target/s390x/mem_helper.c | 23 +++ target/s390x/translate.c | 9 + 4 files changed, 36 insertions(+) diff --git a/target

[Qemu-devel] [PATCH v3 22/30] target/s390x: implement MOVE LONG UNICODE

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 47 -- target/s390x/translate.c | 21 + 4 files changed, 65

[Qemu-devel] [PATCH v3 29/30] target/s390x: mark ETF2 and ETF2-ENH facilities as available

2017-05-31 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/cpu_models.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index e5e005a430..fc3cb25cc3 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -668,8 +668,10 @@ static

[Qemu-devel] [PATCH v3 24/30] target/s390x: implement PACK UNICODE

2017-05-31 Thread Aurelien Jarno
Use a common helper with PACK ASCII as the differences are limited to the stride of the source operand. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 30

[Qemu-devel] [PATCH v3 25/30] target/s390x: implement UNPACK ASCII

2017-05-31 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 51 ++ target/s390x/translate.c | 17 4 files changed, 71

Re: [Qemu-devel] [PATCH 25/26] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 12:42, Richard Henderson wrote: > On 05/30/2017 12:25 PM, Aurelien Jarno wrote: > > On 2017-05-30 09:45, Richard Henderson wrote: > > > On 05/29/2017 04:17 AM, Aurelien Jarno wrote: > > > > On 2017-05-26 10:10, Richard Henderson wrote: > > > >

Re: [Qemu-devel] [PATCH 25/26] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 09:45, Richard Henderson wrote: > On 05/29/2017 04:17 AM, Aurelien Jarno wrote: > > On 2017-05-26 10:10, Richard Henderson wrote: > > > On 05/25/2017 02:05 PM, Aurelien Jarno wrote: > > > > +uint32_t HELPER(trXX)(CPUS390XState

[Qemu-devel] [PULL v2 3/5] target/sh4: introduce DELAY_SLOT_MASK

2017-05-30 Thread Aurelien Jarno
This will make easier the introduction of a new flag in the next patches. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 3 ++- target/sh4/helper.c| 4 ++-- target/sh4/translate.c | 17 - 3

[Qemu-devel] [PULL v2 5/5] target/sh4: fix RTE instruction delay slot

2017-05-30 Thread Aurelien Jarno
RTE delay slot instruction is always fetched in privileged mode. It is therefore enough to to check for this flag in cpu_mmu_index. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 13 ++--- target/sh4/translate.c | 8 ++-- 2 files c

[Qemu-devel] [PULL v2 0/5] Queued target/sh4 patches

2017-05-30 Thread Aurelien Jarno
for you to fetch changes up to be53081a619443dc4512039d89345475ef7d9a46: target/sh4: fix RTE instruction delay slot (2017-05-30 21:00:56 +0200) Queued target/sh4 patches ---

[Qemu-devel] [PULL v2 4/5] target/sh4: ignore interrupts in a delay slot

2017-05-30 Thread Aurelien Jarno
Delay slots are indivisible, therefore avoid scheduling an interrupt in the delay slot. However exceptions are possible. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 12 ++-- 1 file changed, 10 insertions

[Qemu-devel] [PULL v2 1/5] target/sh4: log unauthorized accesses using qemu_log_mask

2017-05-30 Thread Aurelien Jarno
qemu_log_mask() is preferred over fprintf() for logging errors. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/helper.c b/target/sh4

[Qemu-devel] [PULL v2 2/5] target/sh4: fix reset when using a kernel and an initrd

2017-05-30 Thread Aurelien Jarno
there is no guarantee the kernel and initrd haven't been overwritten). Therefore call qemu_system_reset_request to reload the kernel and initrd and load the program counter to the kernel entry point. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c

Re: [Qemu-devel] [PULL 2/5] target/sh4: fix reset when using a kernel and an initrd

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 10:02, Eric Blake wrote: > On 05/30/2017 05:17 AM, Stefan Hajnoczi wrote: > > On Mon, May 29, 2017 at 09:30:13PM +0200, Aurelien Jarno wrote: > >> When a masked exception happens, the SH4 CPU generates a non-masked > >> reset exception, which then jumps to

Re: [Qemu-devel] [PATCH v2 02/29] target/s390x: remove some Linux assumptions from IPTE

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 10:20, Thomas Huth wrote: > On 29.05.2017 21:24, Aurelien Jarno wrote: > > Signed-off-by: Aurelien Jarno > > --- > > target/s390x/cpu.h| 2 ++ > > target/s390x/mem_helper.c | 17 ++--- > > target/s390x/mmu_helper.c | 4 +--- &g

Re: [Qemu-devel] [PATCH v2 03/29] target/s390x: implement local-TLB-clearing in IPTE

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 11:01, Thomas Huth wrote: > On 29.05.2017 21:24, Aurelien Jarno wrote: > > And at the same time make IPTE SMP aware. > > > > Signed-off-by: Aurelien Jarno > > --- > > target/s390x/helper.h | 2 +- > > target/s390x/mem_helper.c | 1

Re: [Qemu-devel] [PULL 1/5] target/sh4: log unauthorized accesses using qemu_log_mask

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 11:18, Stefan Hajnoczi wrote: > On Mon, May 29, 2017 at 09:30:12PM +0200, Aurelien Jarno wrote: > > qemu_log_mask() is preferred over fprintf() for logging errors. > > > > Reviewed-by: Philippe Mathieu-Daudé > > Reviewed-by: Richard Henderson > &

Re: [Qemu-devel] [PULL 1/5] target/sh4: log unauthorized accesses using qemu_log_mask

2017-05-30 Thread Aurelien Jarno
On 2017-05-30 10:52, Stefan Hajnoczi wrote: > On Mon, May 29, 2017 at 09:30:12PM +0200, Aurelien Jarno wrote: > > qemu_log_mask() is preferred over fprintf() for logging errors. > > > > Reviewed-by: Philippe Mathieu-Daudé > > Reviewed-by: Richard Henderson > &

[Qemu-devel] [PULL 4/5] target/sh4: ignore interrupts in a delay slot

2017-05-29 Thread Aurelien Jarno
Delay slots are indivisible, therefore avoid scheduling an interrupt in the delay slot. However exceptions are possible. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 12 ++-- 1 file changed, 10 insertions

[Qemu-devel] [PULL 3/5] target/sh4: introduce DELAY_SLOT_MASK

2017-05-29 Thread Aurelien Jarno
This will make easier the introduction of a new flag in the next patches. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 3 ++- target/sh4/helper.c| 4 ++-- target/sh4/translate.c | 17 - 3

[Qemu-devel] [PATCH v2 13/29] target/s390x: implement MOVE ZONES

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h

[Qemu-devel] [PULL 2/5] target/sh4: fix reset when using a kernel and an initrd

2017-05-29 Thread Aurelien Jarno
there is no guarantee the kernel and initrd haven't been overwritten). Therefore call qemu_system_reset_request to reload the kernel and initrd and load the program counter to the kernel entry point. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c

[Qemu-devel] [PATCH v2 24/29] target/s390x: implement PACK UNICODE

2017-05-29 Thread Aurelien Jarno
Use a common helper with PACK ASCII as the differences are limited to the stride of the source operand. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 30 +- target/s390x

[Qemu-devel] [PATCH v2 25/29] target/s390x: implement UNPACK ASCII

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 51 ++ target/s390x/translate.c | 17 4 files changed, 71

[Qemu-devel] [PATCH v2 29/29] target/s390x: update maximum TCG model to z800

2017-05-29 Thread Aurelien Jarno
At the same time fix the TCG version of get_max_cpu_model to return the maximum model like on KVM. Remove the long-displacement facility from the additional features as it is included in the z800. Signed-off-by: Aurelien Jarno --- target/s390x/cpu_models.c | 12 ++-- 1 file changed, 6

[Qemu-devel] [PULL 5/5] target/sh4: fix RTE instruction delay slot

2017-05-29 Thread Aurelien Jarno
RTE delay slot instruction is always fetched in privileged mode. It is therefore enough to to check for this flag in cpu_mmu_index. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 13 ++--- target/sh4/translate.c | 8 ++-- 2 files c

[Qemu-devel] [PATCH v2 11/29] target/s390x: implement MOVE NUMERICS

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h

[Qemu-devel] [PATCH v2 12/29] target/s390x: implement MOVE WITH OFFSET

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 4 target/s390x/mem_helper.c | 31 +++ target/s390x/translate.c | 8 4 files changed, 44 insertions(+) diff --git a

[Qemu-devel] [PULL 1/5] target/sh4: log unauthorized accesses using qemu_log_mask

2017-05-29 Thread Aurelien Jarno
qemu_log_mask() is preferred over fprintf() for logging errors. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/helper.c b/target/sh4

[Qemu-devel] [PATCH v2 27/29] target/s390x: implement TEST DECIMAL

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 3 +++ target/s390x/mem_helper.c | 23 +++ target/s390x/translate.c | 9 + 4 files changed, 36 insertions(+) diff --git a/target

[Qemu-devel] [PATCH v2 21/29] target/s390x: implement COMPARE LOGICAL LONG UNICODE

2017-05-29 Thread Aurelien Jarno
For that we need to make program_interrupt available to qemu-user. Fortunately there is almost nothing to change as both kvm_enabled and CONFIG_KVM evaluate to false in that case. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target

[Qemu-devel] [PATCH v2 26/29] target/s390x: implement UNPACK UNICODE

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 49 -- target/s390x/translate.c | 18 + 4 files changed, 60

[Qemu-devel] [PATCH v2 02/29] target/s390x: remove some Linux assumptions from IPTE

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/cpu.h| 2 ++ target/s390x/mem_helper.c | 17 ++--- target/s390x/mmu_helper.c | 4 +--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 79235cfa45..d89ad83e71 100644

[Qemu-devel] [PATCH v2 04/29] target/s390x: implement TEST AND SET

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 10 ++ 2 files changed, 13 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index f818437069..0f70acea5c 100644 --- a/target/s390x/insn-data.def +++ b

[Qemu-devel] [PATCH v2 28/29] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 9 + target/s390x/mem_helper.c | 46 ++ target/s390x/translate.c | 13 + 4 files changed, 69 insertions(+) diff --git a/target

[Qemu-devel] [PATCH v2 22/29] target/s390x: implement MOVE LONG UNICODE

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 47 -- target/s390x/translate.c | 21 + 4 files changed, 65 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v2 03/29] target/s390x: implement local-TLB-clearing in IPTE

2017-05-29 Thread Aurelien Jarno
And at the same time make IPTE SMP aware. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 2 +- target/s390x/mem_helper.c | 19 --- target/s390x/translate.c | 6 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/target/s390x/helper.h b

[Qemu-devel] [PATCH v2 23/29] target/s390x: implement PACK ASCII

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 35 +++ target/s390x/translate.c | 16 4 files changed, 54 insertions(+) diff

[Qemu-devel] [PATCH v2 08/29] target/s390x: implement STORE PAIR TO QUADWORD

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 12 target/s390x/translate.c | 6 ++ 4 files changed, 21 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

[Qemu-devel] [PATCH v2 18/29] target/s390x: implement COMPARE LOGICAL LONG

2017-05-29 Thread Aurelien Jarno
As CLCL and CLCLE mostly differ by their operands, use a common do_clcl helper. Another difference is that CLCL is not interruptible. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 84

[Qemu-devel] [PATCH v2 14/29] target/s390x: improve 24-bit and 31-bit addresses read

2017-05-29 Thread Aurelien Jarno
-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 71 +-- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 484dfcd9d6..bbece93c9d 100644 --- a/target/s390x/mem_helper.c +++ b

[Qemu-devel] [PATCH v2 16/29] target/s390x: improve 24-bit and 31-bit lengths read/write

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index e494b7dfd4..911c3d7f8e

[Qemu-devel] [PATCH v2 06/29] target/s390x: implement PACK

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 5 + target/s390x/mem_helper.c | 37 + target/s390x/translate.c | 8 4 files changed, 51 insertions(+) diff

[Qemu-devel] [PATCH v2 20/29] target/s390x: improve MOVE LONG and MOVE LONG EXTENDED

2017-05-29 Thread Aurelien Jarno
As MVCL and MVCLE only differ by their operands, use a common do_mvcl helper. Optimize it calling fast_memmove and fast_memset. Correctly write back addresses. Check that r1 and r2/r3 registers are even. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 90

[Qemu-devel] [PATCH v2 17/29] target/s390x: fix COMPARE LOGICAL LONG EXTENDED

2017-05-29 Thread Aurelien Jarno
are then wrong write back to the registers. - We should limit the amount of bytes to process, so that interrupts can be served correctly. At the same time rename dest into src1 and src into src3 to match the operand names and make the code less confusing. Signed-off-by: Aurelien Jarno

[Qemu-devel] [PATCH v2 15/29] target/s390x: improve 24-bit and 31-bit addresses write

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index bbece93c9d..e494b7dfd4 100644 --- a

[Qemu-devel] [PATCH v2 00/29] target/s390x: fix, improve and implement some more instructions

2017-05-29 Thread Aurelien Jarno
on in MOVE LONG UNICODE - rebase the cpu model upgrade to z800 onto the qemu cpu_models patch from Thomas Huth and use s390_find_cpu_def to get the z800 model. Aurelien Jarno (29): target/s390x: remove dead code in translate.c target/s390x: remove some Linux assumptions from IPTE target/s

[Qemu-devel] [PATCH v2 09/29] target/s390x: implement COMPARE AND SIGNAL

2017-05-29 Thread Aurelien Jarno
These functions differ from COMPARE by generating an exception for a QNaN input. Use the non quiet version of floatXX_compare. Signed-off-by: Aurelien Jarno --- target/s390x/fpu_helper.c | 27 +++ target/s390x/helper.h | 3 +++ target/s390x/insn-data.def | 6

[Qemu-devel] [PATCH v2 10/29] target/s390x: implement MOVE INVERSE

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 12 target/s390x/translate.c | 8 4 files changed, 23 insertions(+) diff --git a/target/s390x/helper.h b

[Qemu-devel] [PATCH v2 05/29] target/s390x: implement TEST ADDRESSING MODE

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 10 ++ 2 files changed, 13 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 0f70acea5c..170b50ef2e 100644 --- a/target/s390x/insn-data.def +++ b

[Qemu-devel] [PATCH v2 19/29] target/s390x: fix adj_len_to_page

2017-05-29 Thread Aurelien Jarno
adj_len_to_page doesn't return the correct result when the address is already page aligned and the length is bigger than a page. Fix that. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/mem_helpe

[Qemu-devel] [PATCH v2 07/29] target/s390x: implement LOAD PAIR FROM QUADWORD

2017-05-29 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 7 +++ 4 files changed, 23 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

[Qemu-devel] [PATCH v2 01/29] target/s390x: remove dead code in translate.c

2017-05-29 Thread Aurelien Jarno
Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/s390x/translate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 97ca639a34..f7598184a6 100644 --- a/target/s390x/translate.c +++ b/target

Re: [Qemu-devel] [PATCH 16/26] target/s390x: implement COMPARE LOGICAL LONG

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 08:32, Richard Henderson wrote: > On 05/25/2017 02:04 PM, Aurelien Jarno wrote: > > -if (srclen) { > > -v1 = cpu_ldub_data_ra(env, src, ra); > > +if (*srclen) { > > +v1 = cpu_ldub_data_ra(env, *src, ra); > >

Re: [Qemu-devel] [PATCH 21/26] target/s390x: implement PACK UNICODE

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 09:35, Richard Henderson wrote: > On 05/25/2017 02:05 PM, Aurelien Jarno wrote: > > +} else if (srclen > ssize) { > > b = cpu_ldub_data_ra(env, src, ra) & 0x0f; > > -src--; > > -srcle

Re: [Qemu-devel] [PATCH 25/26] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 10:10, Richard Henderson wrote: > On 05/25/2017 02:05 PM, Aurelien Jarno wrote: > > +uint32_t HELPER(trXX)(CPUS390XState *env, uint32_t r1, uint32_t r2, > > + uint32_t sizes) > > +{ > > +uintptr_t ra = GETPC(); > > +

Re: [Qemu-devel] [PATCH v2] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-26 Thread Aurelien Jarno
; > target/s390x/cpu_models.c | 34 +++--- > 1 file changed, 31 insertions(+), 3 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

[Qemu-devel] [PATCH 27/26] target/s390x: fix adj_len_to_page

2017-05-25 Thread Aurelien Jarno
adj_len_to_page doesn't return the correct result when the address is already page aligned and the length is bigger than a page. Fix that. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) The patch 17 (improve MOVE LONG and

Re: [Qemu-devel] [PATCH 4/4] target/s390x: Re-implement a few EXECUTE target insns directly

2017-05-25 Thread Aurelien Jarno
nged, 51 insertions(+), 15 deletions(-) I have mixed feelings about this patch. On one side it is correct. On the other side, I don't know if it really worth it. With the goto_ptr optimization, it can be executed quite fast once it has been translated once. So in short, I leave you decide: R

Re: [Qemu-devel] [PATCH 3/4] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-25 Thread Aurelien Jarno
9 > target/s390x/mem_helper.c | 118 > +- > target/s390x/translate.c | 80 ++- > 5 files changed, 85 insertions(+), 141 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno

Re: [Qemu-devel] [PATCH 2/4] target/s390x: End the TB after EXECUTE

2017-05-25 Thread Aurelien Jarno
90x/mem_helper.c | 54 > --- > target/s390x/translate.c | 6 +- > 2 files changed, 37 insertions(+), 23 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 1/4] target/s390x: Save current ilen during translation

2017-05-25 Thread Aurelien Jarno
On 2017-05-24 15:08, Richard Henderson wrote: > Use this saved value instead of recomputing from next_pc difference. > > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Review

[Qemu-devel] [PATCH 24/26] target/s390x: implement TEST DECIMAL

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 3 +++ target/s390x/mem_helper.c | 23 +++ target/s390x/translate.c | 9 + 4 files changed, 36 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x

[Qemu-devel] [PATCH 25/26] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 9 + target/s390x/mem_helper.c | 46 ++ target/s390x/translate.c | 13 + 4 files changed, 69 insertions(+) diff --git a/target

[Qemu-devel] [PATCH 18/26] target/s390x: implement COMPARE LOGICAL LONG UNICODE

2017-05-25 Thread Aurelien Jarno
For that we need to make program_interrupt available to qemu-user. Fortunately there is almost nothing to change as both kvm_enabled and CONFIG_KVM evaluate to false in that case. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target

[Qemu-devel] [PATCH 23/26] target/s390x: implement UNPACK UNICODE

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 50 -- target/s390x/translate.c | 18 + 4 files changed, 61 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PATCH 19/26] target/s390x: implement MOVE LONG UNICODE

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 47 -- target/s390x/translate.c | 11 +++ 4 files changed, 55 insertions(+), 6 deletions(-) diff --git a

[Qemu-devel] [PATCH 21/26] target/s390x: implement PACK UNICODE

2017-05-25 Thread Aurelien Jarno
Use a common helper with PACK ASCII as the differences are limited to the stride of the source operand. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 30 +- target/s390x

[Qemu-devel] [PATCH 17/26] target/s390x: improve MOVE LONG and MOVE LONG EXTENDED

2017-05-25 Thread Aurelien Jarno
As MVCL and MVCLE only differ by their operands, use a common do_mvcl helper. Optimize it calling fast_memmove and fast_memset. Correctly write back addresses. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 90 +-- 1 file changed, 40

[Qemu-devel] [PATCH 12/26] target/s390x: improve 24-bit and 31-bit addresses read

2017-05-25 Thread Aurelien Jarno
by call to wrap_address. Note that get_address_relget_address_rel is only used in the EXECUTE helper, so we can get rid of it as the same time as the helper. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 90 +-- 1 file changed, 47

[Qemu-devel] [PATCH 16/26] target/s390x: implement COMPARE LOGICAL LONG

2017-05-25 Thread Aurelien Jarno
As CLCL and CLCLE mostly differ by their operands, use a common do_clcl helper. Another difference is that CLCL is not interruptible. Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 86

[Qemu-devel] [PATCH 20/26] target/s390x: implement PACK ASCII

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 35 +++ target/s390x/translate.c | 16 4 files changed, 54 insertions(+) diff --git a/target/s390x/helper.h b

[Qemu-devel] [PATCH 15/26] target/s390x: fix COMPARE LOGICAL LONG EXTENDED

2017-05-25 Thread Aurelien Jarno
are then wrong write back to the registers. - We should limit the amount of bytes to process, so that interrupts can be served correctly. Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 36 1 file changed, 28 insertions(+), 8 deletions

[Qemu-devel] [PATCH 22/26] target/s390x: implement UNPACK ASCII

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 51 ++ target/s390x/translate.c | 17 4 files changed, 71 insertions(+) diff --git a/target/s390x

[Qemu-devel] [PATCH 10/26] target/s390x: implement MOVE WITH OFFSET

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 4 target/s390x/mem_helper.c | 31 +++ target/s390x/translate.c | 8 4 files changed, 44 insertions(+) diff --git a/target/s390x/helper.h b/target

[Qemu-devel] [PATCH 26/26] target/s390x: update maximum TCG model to z800

2017-05-25 Thread Aurelien Jarno
Now that the extended-translation facility 2 has been fully implemented, it's possible to emulated a most a z800 CPU with TCG. Signed-off-by: Aurelien Jarno --- target/s390x/cpu_models.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/cpu_models.c b/t

[Qemu-devel] [PATCH 13/26] target/s390x: improve 24-bit and 31-bit addresses write

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2b0cde13b4..bbb3eceb71 100644 --- a/target/s390x/mem_helper.c +++ b

[Qemu-devel] [PATCH 07/26] target/s390x: implement STORE PAIR TO QUADWORD

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 2 ++ target/s390x/translate.c | 18 ++ 2 files changed, 20 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 53c86d5832..751e3164dd 100644 --- a/target/s390x/insn-data.def

[Qemu-devel] [PATCH 14/26] target/s390x: improve 24-bit and 31-bit lengths read/write

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index bbb3eceb71..1dc71fe5f0 100644 --- a/target/s390x

[Qemu-devel] [PATCH 04/26] target/s390x: implement TEST ADDRESSING MODE

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 11 +++ 2 files changed, 14 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 0f70acea5c..170b50ef2e 100644 --- a/target/s390x/insn-data.def +++ b

[Qemu-devel] [PATCH 11/26] target/s390x: implement MOVE ZONES

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

[Qemu-devel] [PATCH 02/26] target/s390x: make IPTE SMP aware

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/mem_helper.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 4b96c279e3..88e2a0f60d 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c

[Qemu-devel] [PATCH 06/26] target/s390x: implement LOAD PAIR FROM QUADWORD

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/insn-data.def | 2 ++ target/s390x/translate.c | 16 2 files changed, 18 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index f92bfde4f8..53c86d5832 100644 --- a/target/s390x/insn-data.def

[Qemu-devel] [PATCH 09/26] target/s390x: implement MOVE NUMERICS

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 13 + target/s390x/translate.c | 8 4 files changed, 24 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

[Qemu-devel] [PATCH 08/26] target/s390x: implement MOVE INVERSE

2017-05-25 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 12 target/s390x/translate.c | 8 4 files changed, 23 insertions(+) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

<    1   2   3   4   5   6   7   8   9   10   >