Re: [Qemu-devel] [PATCH 2/2] target-ppc: fix xscmpodp and xscmpudp decoding

2015-09-23 Thread Tom Musta
ructions only have the AX, BX bits in > > > there encoding, the lowest bit (usually TX) is marked as an invalid > > > bit. We therefore can't decode them with GEN_XX2FORM, which decodes > > > the two lowest bit. > > > > > > Introduce a new form GEN_XX2FORM, which

Re: [Qemu-devel] [PULL 06/37] target-ppc: VXSQRT Should Not Be Set for NaNs

2015-02-13 Thread Tom Musta
I agree that the comment is incorrect and should say sNaN square root. On Thu, Feb 12, 2015 at 4:21 PM, Maciej W. Rozycki ma...@linux-mips.org wrote: On Wed, 7 Jan 2015, Alexander Graf wrote: diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index 7f74466..81db60f 100644 ---

Re: [Qemu-devel] [PATCH 9/9] target-ppc: Introduce Privileged TM Noops

2014-12-20 Thread Tom Musta
On 12/19/2014 4:20 AM, Fam Zheng wrote: On Thu, 12/18 10:34, Tom Musta wrote: Add the supervisory Transactional Memory instructions treclaim. and trechkpt. The implementation is a degenerate one that simply checks privileged state, TM availability and then sets CR[0] to 0b, just like

[Qemu-devel] [PATCH 0/9] target-ppc: Rudimentary Support for Transactional Memory

2014-12-18 Thread Tom Musta
. Tom Musta (9): target-ppc: Introduce Instruction Type for Transactional Memory target-ppc: Introduce Feature Flag for Transactional Memory target-ppc: Introduce tm_enabled Bit to CPU State target-ppc: Power8 Supports Transactional Memory target-ppc: Introduce TEXASRU Bit Fields target

[Qemu-devel] [PATCH 2/9] target-ppc: Introduce Feature Flag for Transactional Memory

2014-12-18 Thread Tom Musta
Add a flag (POWERPC_FLAG_TM) for the Transactional Memory Facility introduced in Power ISA 2.07. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/cpu.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 3510083..38176c0

[Qemu-devel] [PATCH 3/9] target-ppc: Introduce tm_enabled Bit to CPU State

2014-12-18 Thread Tom Musta
Add a bit (tm_enabled) to CPU state that mirrors the MSR[TM] bit. This is analogous to the other available bits in the MSR (FP, VSX, etc.). NOTE: Since MSR[TM] occupies big-endian bit 31, the code is wrapped with a PPC64 bit check. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc

[Qemu-devel] [PATCH 6/9] target-ppc: Introduce tbegin

2014-12-18 Thread Tom Musta
Provide a degenerate implementation of the tbegin instruction. This implementation always fails the transaction, recording the failure per Book II Section 5.3.2 of the Power ISA V2.07. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/helper.h |2 ++ target-ppc/mem_helper.c

[Qemu-devel] [PATCH 4/9] target-ppc: Power8 Supports Transactional Memory

2014-12-18 Thread Tom Musta
The Power8 processor implements the Transactional Memory Facility as defined in Power ISA 2.07. Update the initialization code to indicate this. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate_init.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 8/9] target-ppc: Introduce tcheck

2014-12-18 Thread Tom Musta
Add a degenerate implementation of the Transaction Check (tcheck) instruction. Since transaction always immediately fail, this implementation simply sets CR[BF] to 0b1000, i.e. TDOOMED = 1 and MSR[TS] == 0. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 17

[Qemu-devel] [PATCH 1/9] target-ppc: Introduce Instruction Type for Transactional Memory

2014-12-18 Thread Tom Musta
Add a category (PPC2_TM) for the Transactional Memory instructions introduced in Power ISA 2.07. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/cpu.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 068fcb2..3510083

[Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Tom Musta
Define mnemonics for the various bit fields in the Transaction EXception And Summary Register (TEXASR). --- target-ppc/cpu.h | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 38176c0..91a03f6 100644 ---

[Qemu-devel] [PATCH 9/9] target-ppc: Introduce Privileged TM Noops

2014-12-18 Thread Tom Musta
Add the supervisory Transactional Memory instructions treclaim. and trechkpt. The implementation is a degenerate one that simply checks privileged state, TM availability and then sets CR[0] to 0b, just like the unprivileged noops. --- target-ppc/translate.c | 38

[Qemu-devel] [PATCH 7/9] target-ppc: Introduce TM Noops

2014-12-18 Thread Tom Musta
MSR[TS] is always 0b00. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index cddfc36..f468a5d 100644 --- a/target-ppc

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Tom Musta
On 12/18/2014 11:02 AM, Alexander Graf wrote: On 18.12.14 17:34, Tom Musta wrote: Define mnemonics for the various bit fields in the Transaction EXception And Summary Register (TEXASR). This is missing an SoB line. Alex Sorry about that. I will publish a V2 but may wait a day

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Tom Musta
On 12/18/2014 12:29 PM, Alexander Graf wrote: On 18.12.14 19:10, Tom Musta wrote: On 12/18/2014 11:02 AM, Alexander Graf wrote: On 18.12.14 17:34, Tom Musta wrote: Define mnemonics for the various bit fields in the Transaction EXception And Summary Register (TEXASR). This is missing

Re: [Qemu-devel] [2.3 V2 PATCH 2/6] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-20 Thread Tom Musta
On 11/20/2014 8:14 AM, Alexander Graf wrote: On 12.11.14 22:46, Tom Musta wrote: The Floating Point Move instructions (fmr., fabs., fnabs., fneg., and fcpsgn.) incorrectly copy FPSCR[FPCC] instead of [FX,FEX,VX,OX]. Furthermore, the current code does this via a call to gen_compute_fprf

[Qemu-devel] [PATCH] target-ppc: Load/Store Vector Element Storage Alignment

2014-11-17 Thread Tom Musta
the aligned word of storage. Fix the generators for these instruction to properly perform this truncation. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 22 ++ 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/target-ppc/translate.c b

[Qemu-devel] [PATCH] target-ppc: Altivec's mtvscr Decodes Wrong Register

2014-11-14 Thread Tom Musta
The Move to Vector Status and Control Register (mtvscr) instruction uses VRB as the source register. Fix the code generator to correctly decode the VRB field. That is, use rB(ctx-opcode) instead of rD(ctx-opcode). Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c |2

[Qemu-devel] [2.3 V2 PATCH 0/6] target-ppc: Assorted Floating Point Bugs and Cleanup

2014-11-12 Thread Tom Musta
? V2 Reworked patches to pick up the gen_set_cr1_from_fpscr() utility that was recently added by Paolo Bonzini. Tom Musta (6): target-ppc: VXSQRT Should Not Be Set for NaNs target-ppc: Fix Floating Point Move Instructions That Set CR1 target-ppc: mffs. Should Set CR1 from FPSCR Bits

[Qemu-devel] [2.3 V2 PATCH 6/6] target-ppc: Eliminate set_fprf Argument From helper_compute_fprf

2014-11-12 Thread Tom Musta
to void. Update the name of the local variable ret to fprf, which now makes more sense. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 56 +- target-ppc/helper.h |2 +- target-ppc/translate.c |8 +-- 3 files

[Qemu-devel] [2.3 V2 PATCH 5/6] target-ppc: Eliminate set_fprf Argument From gen_compute_fprf

2014-11-12 Thread Tom Musta
The set_fprf argument to the gen_compute_fprf() utility is no longer needed -- gen_compute_fprf() is now called only when FPRF is actually computed and set. Eliminate the obsolete argument. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 38

[Qemu-devel] [2.3 V2 PATCH 1/6] target-ppc: VXSQRT Should Not Be Set for NaNs

2014-11-12 Thread Tom Musta
macro to the top of the file so that it can be re-used. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 29 + 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index 7f74466

[Qemu-devel] [2.3 V2 PATCH 2/6] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-12 Thread Tom Musta
the gen_set_cr1_from_fpscr utility. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 50 --- 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 910ce56

[Qemu-devel] [2.3 V2 PATCH 4/6] target-ppc: Fully Migrate to gen_set_cr1_from_fpscr

2014-11-12 Thread Tom Musta
Eliminate the set_rc argument from the gen_compute_fprf utility and the corresponding (and incorrect) implementation. Replace it with calls to the gen_set_cr1_from_fpscr() utility. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 55

[Qemu-devel] [2.3 V2 PATCH 3/6] target-ppc: mffs. Should Set CR1 from FPSCR Bits

2014-11-12 Thread Tom Musta
Update the Move From FPSCR (mffs.) instruction to correctly set CR[1] from FPSCR[FX,FEX,VX,OX]. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

Re: [Qemu-devel] [PATCH] linux-user: Do not subtract offset from end address

2014-11-10 Thread Tom Musta
On 11/8/2014 6:22 PM, Andreas Färber wrote: Am 06.11.2014 um 20:43 schrieb Tom Musta: When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Note that this reads a bit

Re: [Qemu-devel] [PATCH 2.2 v3] linux-user: Fix up timer id handling

2014-11-10 Thread Tom Musta
a proper target_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta tommu...@gmail.com Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - Abort when magic

Re: [Qemu-devel] [PATCH] linux-user: Fix up timer id handling

2014-11-10 Thread Tom Musta
a proper target_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta tommu...@gmail.com Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - Abort when magic is missing

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.2.0-rc0 is now available

2014-11-06 Thread Tom Musta
On 11/5/2014 2:04 PM, Michael Roth wrote: Hello, On behalf of the QEMU Team, I'd like to announce the availability of the first release candidate for the QEMU 2.2 release. This release is meant for testing purposes and should not be used in a production environment.

[Qemu-devel] [PATCH] linux-user: Do not subtract offset from end address

2014-11-06 Thread Tom Musta
When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Signed-off-by: Tom Musta tommu...@gmail.com --- Please include this patch in QEMU 2.2. Commit

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 4/4] target-ppc: Handle ibm, nmi-register RTAS call

2014-11-05 Thread Tom Musta
On 11/5/2014 2:32 AM, Alexander Graf wrote: On 05.11.14 08:13, Aravinda Prasad wrote: This patch adds FWNMI support in qemu for powerKVM guests by handling the ibm,nmi-register rtas call. Whenever OS issues ibm,nmi-register RTAS call, the machine check notification address is saved and

[Qemu-devel] [PATCH 2/7] target-ppc: Introduce gen_set_cr1_from_fpscr

2014-11-03 Thread Tom Musta
the gen_compute_fprf() utility. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index d03daea..7775bf4 100644 --- a/target-ppc/translate.c +++ b

[Qemu-devel] [PATCH 0/7] target-ppc: Assorted Floating Point Bugs and Cleanup

2014-11-03 Thread Tom Musta
soon? Tom Musta (7): target-ppc: VXSQRT Should Not Be Set for NaNs target-ppc: Introduce gen_set_cr1_from_fpscr target-ppc: Fix Floating Point Move Instructions That Set CR1 target-ppc: mffs. Should Set CR1 from FPSCR Bits target-ppc: Fully Migrate to gen_set_cr1_from_fpscr target-ppc

[Qemu-devel] [PATCH 1/7] target-ppc: VXSQRT Should Not Be Set for NaNs

2014-11-03 Thread Tom Musta
macro to the top of the file so that it can be re-used. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 29 + 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index da93d12

[Qemu-devel] [PATCH 3/7] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-03 Thread Tom Musta
the newly added gen_set_cr1_from_fpscr utility. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 7775bf4..9653ba9 100644

[Qemu-devel] [PATCH 6/7] target-ppc: Eliminate set_fprf Argument From gen_compute_fprf

2014-11-03 Thread Tom Musta
The set_fprf argument to the gen_compute_fprf() utility is no longer needed -- gen_compute_fprf() is now called only when FPRF is actually computed and set. Eliminate the obsolete argument. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 38

[Qemu-devel] [PATCH 5/7] target-ppc: Fully Migrate to gen_set_cr1_from_fpscr

2014-11-03 Thread Tom Musta
Eliminate the set_rc argument from the gen_compute_fprf utility and the corresponding (and incorrect) implementation. Replace it with calls to the gen_set_cr1_from_fpscr() utility. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 55

[Qemu-devel] [PATCH 7/7] target-ppc: Eliminate set_fprf Argument From helper_compute_fprf

2014-11-03 Thread Tom Musta
to void. Update the name of the local variable ret to fprf, which now makes more sense. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 56 +- target-ppc/helper.h |2 +- target-ppc/translate.c |8 +-- 3 files

[Qemu-devel] [PATCH 4/7] target-ppc: mffs. Should Set CR1 from FPSCR Bits

2014-11-03 Thread Tom Musta
Update the Move From FPSCR (mffs.) instruction to correctly set CR[1] from FPSCR[FX,FEX,VX,OX]. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

[Qemu-devel] [PATCH] target-ppc: Fix vcmpbfp. Unordered Case

2014-10-31 Thread Tom Musta
Fix the implementation of Vector Compare Bounds Single Precision. Specifically, fix the case where the operands are unordered -- since the result is non-zero, the CR[6] field should be set to zero. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/int_helper.c |2 +- 1 files changed

[Qemu-devel] [PATCH] target-ppc: Fix Altivec Round Opcodes

2014-10-31 Thread Tom Musta
Correct the opcodes for the vrfim, vrfin and vrfiz instructions. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 4a00935..c064cc9

[Qemu-devel] [PATCH] target-ppc: Fix Altivec Shifts

2014-10-29 Thread Tom Musta
Fix the implementation of the Altivec shift left and shift right instructions (vsl, vsr) which erroneously inverts shift direction on big endian hosts. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/int_helper.c | 13 ++--- 1 files changed, 2 insertions(+), 11 deletions

Re: [Qemu-devel] [PATCH v2] linux-user: Let user specify random seed

2014-10-09 Thread Tom Musta
On 10/9/2014 3:36 AM, Magnus Reftel wrote: This patch introduces the -seed command line option and the QEMU_RAND_SEED environment variable for setting the random seed, which is used for the AT_RANDOM ELF aux entry. This is an updated version of the patch, addressing review comments from

Re: [Qemu-devel] [PATCH 04/14] ppc: introduce ppc_get_cr and ppc_set_cr

2014-09-18 Thread Tom Musta
kvm_regs regs; struct kvm_sregs sregs; -uint32_t cr; int i, ret; ret = kvm_vcpu_ioctl(cs, KVM_GET_REGS, regs); Otherwise ... Reviewed-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 07/14] ppc: reorganize gen_compute_fprf

2014-09-18 Thread Tom Musta
); } Reviewed-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-18 Thread Tom Musta
); } #endif Reviewed-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 09/14] ppc: introduce ppc_get_crf and ppc_set_crf

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: These two functions will group together four CR bits into a single value, once we change the representation of condition registers. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- linux-user/main.c| 2 +- target-ppc/cpu.h |

Re: [Qemu-devel] [PATCH 10/14] ppc: use movcond for isel

2014-09-18 Thread Tom Musta
-opcode)], t1, zero, + true_op, cpu_gpr[rB(ctx-opcode)]); +tcg_temp_free(t1); tcg_temp_free_i32(t0); +tcg_temp_free(zero); } /* cmpb: PowerPC 2.05 specification */ Reviewed-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 11/14] ppc: store CR registers in 32 1-bit registers

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: This makes comparisons much smaller and faster. The speedup is approximately 10% on user-mode emulation on x86 host, 3-4% on PPC. Note that CRF_* constants are flipped to match PowerPC's big bit-endianness. Previously, the CR register was

Re: [Qemu-devel] [PATCH 13/14] ppc: inline ppc_set_crf when clearer

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: Do not go through the loop when we're setting the four CR fields to separate constants or conditions. This is clearer than putting together 4-bit value and passing it. I guess clearer is in the eye of the beholder :) In general, replacing a

Re: [Qemu-devel] [PATCH v2 00/14] TCG ppc speedups

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: Patches 1-3 speed up softmmu emulation by avoiding TLB flushes on changes to IR/DR. Patches 4-14 speed up emulation in general by rewriting the handling of condition registers. Paolo Bonzini (14): ppc: do not look at the MMU index to detect

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: PowerPC TCG flushes the TLB on every IR/DR change, which basically means on every user-kernel context switch. Encode IR/DR in the MMU index. This brings the number of TLB flushes down from ~90 to ~5 for starting up the Debian installer,

Re: [Qemu-devel] [PATCH 1/2] target-ppc : Allow fc[tf]id[*] mnemonics for non TARGET_PPC64

2014-09-12 Thread Tom Musta
comments Reviewed-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 0/2] Enabling floating point instruction to 440x5 CPUs

2014-09-12 Thread Tom Musta
On 9/11/2014 2:17 PM, Pierre Mallard wrote: This patch series enable floating point instruction in 440x5 CPUs which have the capabilities to have optional APU FPU in double precision mode. 1) Allow fc[tf]id[*] mnemonics for non TARGET_PPC64 with a new insn2 flag 2) Create a new 440x5

Re: [Qemu-devel] [PATCH 1/2] target-ppc : Allow fc[tf]id[*] mnemonics for non TARGET_PPC64

2014-09-12 Thread Tom Musta
On 9/12/2014 9:28 AM, Tom Musta wrote: On 9/11/2014 2:17 PM, Pierre Mallard wrote: This patch remove limitation for fc[tf]id[*] on 32 bits targets and add a new insn flag for signed integer 64 conversion PPC2_FP_CVT_S64 --- target-ppc/cpu.h|5 - target-ppc/fpu_helper.c

Re: [Qemu-devel] [PATCH 2/2] target-ppc : Add new processor type 440x5wDFPU

2014-09-12 Thread Tom Musta
On 9/11/2014 2:17 PM, Pierre Mallard wrote: This patch add a new processor type 440x5wDFPU for Virtex 5 PPC440 with an external APU FPU in double precision mode --- target-ppc/cpu-models.c |3 +++ target-ppc/translate_init.c | 38 ++ 2 files

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/3] Enabling floating point instruction to 440x5 CPUs

2014-09-11 Thread Tom Musta
On 9/10/2014 5:43 PM, Pierre Mallard wrote: On Wed, Sep 10, 2014 at 7:15 PM, Tom Musta tommu...@gmail.com mailto:tommu...@gmail.com wrote: (1) Eliminate the TARGET_PPC64 checks for all six FP Doubleword Integer Conversion instructions. There is also fcfids and fcfidus which

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/3] target-ppc : Add PPC_FLOAT_64 flag to instructions type

2014-09-10 Thread Tom Musta
On 9/10/2014 4:18 AM, Alexander Graf wrote: On 10.09.14 07:03, Pierre Mallard wrote: This patch declare a new floating point instruction flag PPC_FLOAT_64 to be used by fcfid, fctid[z] operations. Note that due to limited number of bit, FSEL and FRES points now to same value, and

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] target-ppc : Add PPC_FLOAT_64 type to fctid, fctidz and fcfid and remove their TARGET_PPC64 restriction

2014-09-10 Thread Tom Musta
On 9/10/2014 4:19 AM, Alexander Graf wrote: On 10.09.14 07:03, Pierre Mallard wrote: Apply the new PPC_FLOAT_64 flag to fctid[z] and fcfid. May also be applyed to fctidu[z] and fcfid[su][z], but since they are not mentionned in xilinx documentation it might not be needed yet.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/3] Enabling floating point instruction to 440x5 CPUs

2014-09-10 Thread Tom Musta
On 9/10/2014 4:20 AM, Alexander Graf wrote: On 10.09.14 07:03, Pierre Mallard wrote: This patch series enable floating point instruction in 440x5 CPUs which have the capabilities to have optional APU FPU. 1) Add floating point standard insns flag to 440x5 in case there is an apu fpu.

[Qemu-devel] [PATCH] target-ppc: Implement IVOR[59] By Default for Book E

2014-09-05 Thread Tom Musta
Adjust the IVOR mask for generic Book E implementation to support bit 59. This is consistent with the Power ISA. Signed-off-by: Tom Musta tommu...@gmail.com Reported-by: Pierre Mallard mallard.pie...@gmail.com --- target-ppc/translate_init.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] [PATCH 15/17] ppc: store CR registers in 32 1-bit registers

2014-09-04 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: This makes comparisons much smaller and faster. The speedup is approximately 10% on user-mode emulation on x86 host, 3-4% on PPC. Note that CRF_* constants are flipped to match PowerPC's big bit-endianness. Previously, the CR register was

Re: [Qemu-devel] [PATCH 14/17] ppc: introduce ppc_get_crf and ppc_set_crf

2014-09-04 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: These two functions will group together four CR bits into a single value, once we change the representation of condition registers. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- linux-user/elfload.c | 2 +- linux-user/main.c|

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/52] ppc patch queue 2014-09-04

2014-09-04 Thread Tom Musta
On 9/4/2014 2:13 PM, Alexander Graf wrote: Am 04.09.2014 um 20:38 schrieb Peter Maydell peter.mayd...@linaro.org: On 4 September 2014 18:19, Alexander Graf ag...@suse.de wrote: Hi Peter, This is my current patch queue for ppc. Please pull. Hi. I'm afraid this doesn't build (x86,

Re: [Qemu-devel] [PATCH 04/17] ppc: use ARRAY_SIZE in gdbstub.c

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: Match the idiom used by linux-user/signal.c and linux-user/elfload.c. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-ppc/gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/gdbstub.c

Re: [Qemu-devel] [PATCH 06/17] ppc: use CRF_* in int_helper.c

2014-09-03 Thread Tom Musta
) { -cr = 2; +cr = 1 CRF_EQ; } *r = result; Reviewed-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 07/17] ppc: fix result of DLMZB when no zero bytes are found

2014-09-03 Thread Tom Musta
) { env-crf[0] = 0x2; } Reviewed-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 05/17] ppc: use CRF_* in fpu_helper.c

2014-09-03 Thread Tom Musta
-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 08/17] ppc: introduce helpers for mfocrf/mtocrf

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-ppc/helper.h | 3 +++ target-ppc/int_helper.c | 22 ++ target-ppc/translate.c | 31 --- 3 files changed, 29 insertions(+), 27

Re: [Qemu-devel] [PATCH 03/17] ppc: fix monitor access to CR

2014-09-03 Thread Tom Musta
@@ -2968,7 +2968,7 @@ static target_long monitor_get_ccr (const struct MonitorDef *md, int val) u = 0; for (i = 0; i 8; i++) -u |= env-crf[i] (32 - (4 * i)); +u |= env-crf[i] (32 - (4 * (i + 1))); return u; } Reviewed-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [PATCH 09/17] ppc: reorganize gen_compute_fprf

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-ppc/translate.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0a85a23..afbd336 100644

Re: [Qemu-devel] [PATCH 10/17] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com This patch does not compile for 64 bit targets when TCG debug is enabled -- there are several places in this patch that need to be more explicit about the i32-ness of variables. There is also a leak

Re: [Qemu-devel] [PATCH 12/17] ppc: use movcond for isel

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-ppc/translate.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 67f13f7..48c7b66

Re: [Qemu-devel] [PATCH 11/17] ppc: rename gen_set_cr6_from_fpscr

2014-09-03 Thread Tom Musta
); \ +gen_set_cr1_from_fpscr(ctx); \ } \ tcg_temp_free_ptr(rt); \ tcg_temp_free_ptr(rs); \ Reviewed-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu

Re: [Qemu-devel] [PATCH 13/17] ppc: compute mask from BI using right shift

2014-09-03 Thread Tom Musta
-by: Tom Musta tommu...@gmail.com Tested-by: Tom Musta tommu...@gmail.com

Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/5] target-ppc: Handle ibm, nmi-register RTAS call

2014-08-28 Thread Tom Musta
On 8/28/2014 3:37 AM, Alexander Graf wrote: On 28.08.14 08:38, Aravinda Prasad wrote: On Wednesday 27 August 2014 04:07 PM, Alexander Graf wrote: On 25.08.14 15:45, Aravinda Prasad wrote: This patch adds FWNMI support in qemu for powerKVM guests by handling the ibm,nmi-register rtas

Re: [Qemu-devel] [RFT/RFH PATCH 00/16] PPC speedup patches for TCG

2014-08-28 Thread Tom Musta
On 8/28/2014 12:14 PM, Paolo Bonzini wrote: Hi everyone, these patches provide a speedup around 20% when running PPC softmmu emulation on x86 machines (10% for user-mode emulation). There are actually two separate speedups here: * avoiding TLB flushing on every kernel-user transition

Re: [Qemu-devel] [Qemu-trivial] [PATCH] libdecnumber: Fix warnings from smatch (missing static, boolean operations)

2014-08-25 Thread Tom Musta
On 8/24/2014 4:42 AM, Stefan Weil wrote: Am 24.08.2014 11:21, schrieb Michael Tokarev: Applied to -trivial, thank you! But I've a small concern - should we really do this on external sources, and divirge from upstream needlessly? Thanks, /mjt In general, I agree. In this case, the code

[Qemu-devel] [PATCH 0/6] target-ppc: More Cleanup of FXU Instructions

2014-08-25 Thread Tom Musta
This series follows up my previous series of bug fixes to Power fixed point instructions (http://lists.nongnu.org/archive/html/qemu-ppc/2014-08/msg00068.html). Richard Henderson provided additional feedback after the patches had been taken into Aleg Graf's ppc-next tree. Tom Musta (6): target

[Qemu-devel] [PATCH 1/6] target-ppc: Special Case of rlwimi Should Use Deposit

2014-08-25 Thread Tom Musta
The special case of rlwimi where MB = ME and SH = 31-ME can be implemented with a single TCG deposit operation. This replaces the less general case of SH = MB = 0 and ME = 31. Signed-off-by: Tom Musta tommu...@gmail.com Suggested-by: Richard Henderson r...@twiddle.net --- target-ppc/translate.c

[Qemu-devel] [PATCH 2/6] target-ppc: Optimize rlwinm MB=0 ME=31

2014-08-25 Thread Tom Musta
Optimize the special case of rlwinm where MB=0 and ME=31. This can be implemented as a 32-bit ROTL. Signed-off-by: Tom Musta tommu...@gmail.com Suggested-by: Richard Henderson r...@twiddle.net --- target-ppc/translate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 6/6] target-ppc: Implement mulldo with TCG

2014-08-25 Thread Tom Musta
Optimize mulldo by using the muls2_i64 operation rather than a helper. Eliminate the obsolete helper code. Signed-off-by: Tom Musta tommu...@gmail.com Suggested-by: Richard Henderson r...@twiddle.net --- target-ppc/helper.h |1 - target-ppc/int_helper.c | 27

[Qemu-devel] [PATCH 3/6] target-ppc: Optimize rlwnm MB=0 ME=31

2014-08-25 Thread Tom Musta
Optimize the special case of rlwnm where MB=0 and ME=31. This can be implemented using a ROTL. Suggested-by: Richard Henderson r...@twiddle.net Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 56 +-- 1 files changed, 34

[Qemu-devel] [PATCH 5/6] target-ppc: Clean up mullwo

2014-08-25 Thread Tom Musta
Simplify the implementation of mullwo. For 64 bit CPUs, the result is the concatenation of the upper and lower parts of the muls2_i32 operation, which may be slightly better than deposit. For 32 bit CPUs, the lower part of the muls_i32 operation is moved into the target GPR. Signed-off-by: Tom

[Qemu-devel] [PATCH 4/6] target-ppc: Clean Up mullw

2014-08-25 Thread Tom Musta
Eliminate the unecessary ext32s TCG operation and make the multiplication operation explicitly 32 bit. Signed-off-by: Tom Musta tommu...@gmail.com Suggested-by: Richard Henderson r...@twiddle.net --- target-ppc/translate.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH 3/8] target-ppc: Bug Fix: rlwimi

2014-08-18 Thread Tom Musta
On 8/15/2014 3:05 PM, Richard Henderson wrote: On 08/11/2014 09:23 AM, Tom Musta wrote: Also fix the special case of MB=31 and ME=0 to copy the entire contents of the source GPR. Err, that's not what you did. if (likely(sh == 0 mb == 0 me == 31)) { +#if defined(TARGET_PPC64

Re: [Qemu-devel] [V2 PATCH 09/12] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-13 Thread Tom Musta
On 8/13/2014 7:31 AM, Riku Voipio wrote: On Tue, Aug 12, 2014 at 01:53:40PM -0500, Tom Musta wrote: The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. fails to build - need to make get_ppc64_abi a properly exported function. Riku: Sorry about

[Qemu-devel] [V3 PATCH 00/13] target-ppc: Linux-User Mode Bug Fixes for Power

2014-08-13 Thread Tom Musta
). That series has gone into Alex's ppcnext branch for QEMU 2.2. V2: Addressing review comments from Peter Maydell. V3: Included linux-user: Move get_ppc64_abi so that this series applies cleanly to the current git master. Tom Musta (13): linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

[Qemu-devel] [V3 PATCH 01/13] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-13 Thread Tom Musta
The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from sys/sem.h. So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta tommu...@gmail.com --- linux-user/syscall.c |4 1 files changed, 4 insertions(+), 0

[Qemu-devel] [V3 PATCH 02/13] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-13 Thread Tom Musta
When the ipc system call is used to wrap a semctl system call, the ptr argument to ipc needs to be dereferenced prior to passing it to the semctl handler. This is because the fourth argument to semctl is a union and not a pointer to a union. Signed-off-by: Tom Musta tommu...@gmail.com --- V2

[Qemu-devel] [V3 PATCH 12/13] linux-user: Support target-to-host translation of mlockall argument

2014-08-13 Thread Tom Musta
and 0x2, respectively) Signed-off-by: Tom Musta tommu...@gmail.com --- V2: Per Peter Maydell's review, added a complete set of TARGET_MCL_* macros in the various linux-user/$ARCH/syscall.h files. linux-user/aarch64/syscall.h|2 ++ linux-user/alpha/syscall.h |2 ++ linux-user/arm

[Qemu-devel] [V3 PATCH 06/13] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-13 Thread Tom Musta
The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta tommu...@gmail.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org

[Qemu-devel] [V3 PATCH 11/13] linux-user: clock_nanosleep errno Handling on PPC

2014-08-13 Thread Tom Musta
this for syscalls with standard return values. Add special case code for clock_nanosleep to handle CR0 properly. Signed-off-by: Tom Musta tommu...@gmail.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- V2: Eliminated redundant #if defined condition per Peter Maydell's review. linux

[Qemu-devel] [V3 PATCH 09/13] linux-user: Move get_ppc64_abi

2014-08-13 Thread Tom Musta
The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This routine is currently implemented in the linux-user/elfload.c file but is useful in other scenarios. Move the routine to a more generally available location (linux-user/ppc/target_cpu.h). Signed-off-by: Tom Musta tommu

[Qemu-devel] [V3 PATCH 13/13] linux-user: writev Partial Writes

2014-08-13 Thread Tom Musta
-by: Tom Musta tommu...@gmail.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- V2: Use bool instead of int for bad_address per Peter Maydell's review. linux-user/syscall.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [V3 PATCH 10/13] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-13 Thread Tom Musta
The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta tommu...@gmail.com --- V2: Define and use TARGET_MINSIGSTKSZ constants from the various linux-user/$ARCH/syscall.h files (per Peter Maydell's review). linux-user/aarch64/syscall.h

Re: [Qemu-devel] [PATCH 0/8] target-ppc: Bug Fixes for 64 Bit FXU Instructions

2014-08-12 Thread Tom Musta
On 8/11/2014 10:06 PM, David Gibson wrote: On Mon, Aug 11, 2014 at 02:23:21PM -0500, Tom Musta wrote: These patches fix assorted bugs in the emulation of Power Fixed Point Unit instructions. All instructions have been thorougly tested by running millions of random patterns through actual

[Qemu-devel] [V2 PATCH 0/8] target-ppc: Bug Fixes for 64 Bit FXU Instructions

2014-08-12 Thread Tom Musta
. V2: Added example data patterns to commit messages (no functional change from V1). Tom Musta (8): target-ppc: Bug Fix: rlwinm target-ppc: Bug Fix: rlwnm target-ppc: Bug Fix: rlwimi target-ppc: Bug Fix: mullw target-ppc: Bug Fix: mullwo target-ppc: Bug Fix: mulldo OV Detection target

[Qemu-devel] [V2 PATCH 7/8] target-ppc: Bug Fix: srawi

2014-08-12 Thread Tom Musta
: A6212433228F41DC (without this patch) Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 4904665..61fa42d 100644 --- a/target-ppc/translate.c +++ b/target-ppc

[Qemu-devel] [V2 PATCH 2/8] target-ppc: Bug Fix: rlwnm

2014-08-12 Thread Tom Musta
, padding with zeroes in the most significant bits. Fix the code to properly implement this ROTL32 operation. Example: R3 = 0002 R4 = 7FFF rlwnm 3,3,4,31,16 R3 expected : 00010001 R3 actual : 0001 (without this patch) Signed-off-by: Tom Musta tommu

  1   2   3   4   5   6   7   8   9   >