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

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 19:26, 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 
> ---
>  v4:
>  - Switched TCG_CALL_NO_RWG back to TCG_CALL_NO_WG as indicated by Richard
> 
>  v3:
>  - Use TCG_CALL_NO_RWG instead of TCG_CALL_NO_WG
>  - Use potential_page_fault() since the helper can generate an exception
> 
>  v2:
>  - Use DEF_HELPER_FLAGS_2 instead for DEF_HELPER_2 for returning CC value
>  - Convert real to absolute address
>  - Added a check for valid RAM page
>  - Added low-address protection check
> 
>  target/s390x/cpu.h |  1 +
>  target/s390x/helper.h  |  1 +
>  target/s390x/insn-data.def |  2 ++
>  target/s390x/mem_helper.c  | 28 
>  target/s390x/mmu_helper.c  |  2 +-
>  target/s390x/translate.c   | 11 +++
>  6 files changed, 44 insertions(+), 1 deletion(-)
> 

Reviewed-by: Aurelien Jarno 

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



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

2017-05-18 Thread Richard Henderson

On 05/18/2017 10:26 AM, 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
---
  v4:
  - Switched TCG_CALL_NO_RWG back to TCG_CALL_NO_WG as indicated by Richard

  v3:
  - Use TCG_CALL_NO_RWG instead of TCG_CALL_NO_WG
  - Use potential_page_fault() since the helper can generate an exception

  v2:
  - Use DEF_HELPER_FLAGS_2 instead for DEF_HELPER_2 for returning CC value
  - Convert real to absolute address
  - Added a check for valid RAM page
  - Added low-address protection check

  target/s390x/cpu.h |  1 +
  target/s390x/helper.h  |  1 +
  target/s390x/insn-data.def |  2 ++
  target/s390x/mem_helper.c  | 28 
  target/s390x/mmu_helper.c  |  2 +-
  target/s390x/translate.c   | 11 +++
  6 files changed, 44 insertions(+), 1 deletion(-)


Reviewed-by: Richard Henderson 


r~