Re: [Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-17 Thread David Hildenbrand
On 17.05.2017 18:05, Thomas Huth wrote: > On 16.05.2017 21:06, Richard Henderson wrote: >> On 05/16/2017 02:28 AM, Thomas Huth wrote: >>> +void HELPER(testblock)(CPUS390XState *env, uint64_t addr) >>> +{ >>> +CPUState *cs = CPU(s390_env_get_cpu(env)); >>> +int i; >>> + >>> +addr = get_a

Re: [Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-17 Thread Thomas Huth
On 16.05.2017 21:06, Richard Henderson wrote: > On 05/16/2017 02:28 AM, Thomas Huth wrote: >> +void HELPER(testblock)(CPUS390XState *env, uint64_t addr) >> +{ >> +CPUState *cs = CPU(s390_env_get_cpu(env)); >> +int i; >> + >> +addr = get_address(env, 0, 0, addr) & ~0xfffULL; >> +for

Re: [Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-17 Thread Thomas Huth
On 16.05.2017 15:42, Aurelien Jarno wrote: > On 2017-05-16 11:28, Thomas Huth wrote: >> TEST BLOCK was likely once used to execute basic memory >> tests, but nowadays it's just a (slow) way to clear a page. >> >> Signed-off-by: Thomas Huth >> --- >> target/s390x/helper.h | 1 + >> target/s3

Re: [Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-16 Thread Richard Henderson
On 05/16/2017 02:28 AM, Thomas Huth wrote: +void HELPER(testblock)(CPUS390XState *env, uint64_t addr) +{ +CPUState *cs = CPU(s390_env_get_cpu(env)); +int i; + +addr = get_address(env, 0, 0, addr) & ~0xfffULL; +for (i = 0; i < TARGET_PAGE_SIZE; i += 8) { +stq_phys(cs->as, a

Re: [Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-16 Thread Aurelien Jarno
On 2017-05-16 11:28, Thomas Huth wrote: > TEST BLOCK was likely once used to execute basic memory > tests, but nowadays it's just a (slow) way to clear a page. > > Signed-off-by: Thomas Huth > --- > target/s390x/helper.h | 1 + > target/s390x/insn-data.def | 2 ++ > target/s390x/mem_helpe

[Qemu-devel] [PATCH v1] target/s390x: Add support for the TEST BLOCK instruction

2017-05-16 Thread Thomas Huth
TEST BLOCK was likely once used to execute basic memory tests, but nowadays it's just a (slow) way to clear a page. Signed-off-by: Thomas Huth --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/mem_helper.c | 12 target/s390x/translate.c | 10