[Qemu-devel] [PATCH v4] target-s390x: Implement stfl and stfle

2017-02-27 Thread Michal Marek
Indicate the actual features in the STFL implementation and implement STFLE. Signed-off-by: Michal Marek --- v4: - Remove redundant buffer clearing in do_stfle() - Always store whole doublewords in STFLE - Use s390_cpu_virt_mem_write() to store the result - Raise a specification exception if

Re: [Qemu-devel] [PATCH v4] target-s390x: Implement stfl and stfle

2017-03-02 Thread Michal Marek
Dne 28.2.2017 v 23:11 Richard Henderson napsal(a): > On 02/27/2017 09:18 PM, Michal Marek wrote: >> +static int do_stfle(CPUS390XState *env, uint64_t addr, uint32_t ar, >> int len) >> +{ >> +S390CPU *cpu = s390_env_get_cpu(env); >> +/* 256 doubl

[Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-24 Thread Michal Marek
The implementation is partially cargo cult based, but it works for the linux kernel use case. Signed-off-by: Michal Marek --- target/s390x/cpu_features.c | 6 -- target/s390x/cpu_features.h | 2 +- target/s390x/helper.h | 2 ++ target/s390x/insn-data.def | 2 ++ target/s390x

Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-24 Thread Michal Marek
On 2017-02-24 15:51, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: [...] > === OUTPUT BEGIN === > Checking PATCH 1/1: target-s390x: Implement stfl and stfle... > ERROR: braces {} are necessary for all arms of th

Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
Dne 25.2.2017 v 01:05 Richard Henderson napsal(a): > On 02/25/2017 12:44 AM, Michal Marek wrote: >> +DEF_HELPER_1(stfl, void, env) > > DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env) > > since this touches no registers, and only writes to lomem which afaik > cannot f

[Qemu-devel] [PATCH v2] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
The implementation is partially cargo cult based, but it works for the linux kernel use case. Signed-off-by: Michal Marek --- v2: - STFLE is not a privileged instruction, go through the MMU to store the result - annotate the stfl helper with TCG_CALL_NO_RWG - Use a large enough buffer to

Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
Dne 25.2.2017 v 21:39 Michal Marek napsal(a): > Dne 25.2.2017 v 01:05 Richard Henderson napsal(a): >> On 02/25/2017 12:44 AM, Michal Marek wrote: >>> +static int do_stfle(CPUS390XState *env, uint64_t addr, int len) >>> +{ >>> +S390CPU *cpu = s390_env_ge

[Qemu-devel] [PATCH v3] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
The implementation is partially cargo cult based, but it works for the linux kernel use case. Signed-off-by: Michal Marek --- v3: - Initialize the buffer in do_stfle() v2: - STFLE is not a privileged instruction, go through the MMU to store the result - annotate the stfl helper with

Re: [Qemu-devel] [PATCH v3] target-s390x: Implement stfl and stfle

2017-02-26 Thread Michal Marek
Dne 26.2.2017 v 12:22 Thomas Huth napsal(a): > On 26.02.2017 00:38, Michal Marek wrote: >> The implementation is partially cargo cult based, but it works for the >> linux kernel use case. >> >> Signed-off-by: Michal Marek >> --- >> v3: >> - Initializ