[Qemu-devel] [PATCH v3 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-06-27 Thread Leon Alrae
doubtful usefulness * rebased v2: * addressed all comments so far from Richard and Aurelien. More detailed changelog included in the separate patches. * added missing zero register case for LSA, ALIGN and BITSWAP instructions Leon Alrae (17): target-mips: define ISA_MIPS64R6 target-mips: signal

[Qemu-devel] [PATCH v3 02/21] target-mips: signal RI Exception on instructions removed in R6

2014-06-27 Thread Leon Alrae
loads / stores - traps - legacy accumulator instructions - COP1X - MIPS-3D Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 64 +-- 1 files changed, 56 insertions(+), 8 deletions(-) diff --git a/target-mips

[Qemu-devel] [PATCH v3 01/21] target-mips: define ISA_MIPS64R6

2014-06-27 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * move new CPU definition to a separate patch --- target-mips/mips-defs.h | 28 +++- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index

[Qemu-devel] [PATCH v3 04/21] target-mips: move LL and SC instructions

2014-06-27 Thread Leon Alrae
The encoding of LL and SC instruction has changed in MIPS32 Release 6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c|9 - target-mips/translate.c | 29 +++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v3 14/21] target-mips: add AUI, LSA and PCREL instruction families

2014-06-27 Thread Leon Alrae
Signed-off-by: Leon Alrae --- v3: * use sextract32 instead of open coding the bit field extraction * replace _i64 with _tl in DAHI, DATI and DAUI * fix misleading LDPC comment --- disas/mips.c| 42 +- target-mips/translate.c | 196

[Qemu-devel] [PATCH v3 03/21] target-mips: add SELEQZ and SELNEZ instructions

2014-06-27 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * correct conditions to match instruction name --- disas/mips.c|8 target-mips/translate.c | 16 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/disas/mips.c b/disas/mips.c

[Qemu-devel] [PATCH v3 11/21] target-mips: Status.UX/SX/KX enable 32-bit address wrapping

2014-06-27 Thread Leon Alrae
In R6 the special behaviour for data references is also specified for Kernel and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic MIPS_HFLAG_AWRAP indicating enabled 32-bit address wrapping. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * set hflag indicating 32

[Qemu-devel] [PATCH v3 08/21] target-mips: move PREF, CACHE, LLD and SCD instructions

2014-06-27 Thread Leon Alrae
The encoding of PREF, CACHE, LLD and SCD instruction changed in MIPS32R6. Additionally, the hint codes in PREF instruction greater than or equal to 24 generate Reserved Instruction Exception. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c|4 target

[Qemu-devel] [PATCH v3 06/21] target-mips: split decode_opc_special* into *_r6 and *_legacy

2014-06-27 Thread Leon Alrae
functions will contain instructions which were removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * imm contains shifted value --- target-mips/translate.c | 229 +-- 1 files changed, 160 insertions(+), 69 deletions(-) di

[Qemu-devel] [PATCH v3 17/21] target-mips: add new Floating Point Comparison instructions

2014-06-27 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 44 ++ target-mips/helper.h| 27 ++ target-mips/op_helper.c | 111 + target-mips/translate.c | 206

[Qemu-devel] [PATCH v3 20/21] mips_malta: update malta's pseudo-bootloader - replace JR with JALR

2014-06-27 Thread Leon Alrae
JR has been removed in R6 and now this instruction will cause Reserved Instruction Exception. Therefore use JALR with rd=0 which is equivalent to JR. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- hw/mips/mips_malta.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions

[Qemu-devel] [PATCH v3 12/21] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-06-27 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v3: * bitswap: use gen_load_gpr instead of optimizing very unlikely case and making it less readable v2: * have separate bitswap and dbitswap helpers and use common function * use

[Qemu-devel] [PATCH v3 18/21] target-mips: do not allow Status.FR=0 mode in 64-bit FPU

2014-06-27 Thread Leon Alrae
Status.FR bit must be ignored on write and read as 1 when an implementation of Release 6 of the Architecture in which a 64-bit floating point unit is implemented. Signed-off-by: Leon Alrae --- v3: * remove line modifying CP0_Status_rw_bitmask as this is done while defining CPU --- target-mips

[Qemu-devel] [PATCH v3 09/21] target-mips: redefine Integer Multiply and Divide instructions

2014-06-27 Thread Leon Alrae
Use "R6_" prefix in front of all new Multiply / Divide instructions for easier differentiation between R6 and preR6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * use tcg_gen_mul_* for cases where the high part is discarded --- disas/mips.c| 16 +++ t

[Qemu-devel] [PATCH v3 15/21] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

2014-06-27 Thread Leon Alrae
returns y if |y| > |x|, otherwise maxnum(x,y) Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v3: * rename abs argument to ismag --- fpu/softfloat.c | 37 +++-- include/fpu/softfloat.h |4 2 files changed, 35 inse

[Qemu-devel] [PATCH v3 19/21] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions

2014-06-27 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c|2 ++ target-mips/translate.c | 18 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index

[Qemu-devel] [PATCH v3 21/21] target-mips: define a new generic CPU supporting MIPS64 Release 6 ISA

2014-06-27 Thread Leon Alrae
Signed-off-by: Leon Alrae --- v3: * add comment to make it clear that the current definition of MIPS64R6-generic CPU does not contain support for all MIPS64R6 features yet. --- target-mips/translate_init.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions

[Qemu-devel] [PATCH v3 13/21] target-mips: add compact and CP1 branches

2014-06-27 Thread Leon Alrae
From: Yongbok Kim Introduce MIPS32R6 Compact Branch instructions which do not have delay slot - they have forbidden slot instead. However, current implementation does not support forbidden slot yet. Add also BC1EQZ and BC1NEZ instructions. Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae

[Qemu-devel] [PATCH v3 16/21] target-mips: add new Floating Point instructions

2014-06-27 Thread Leon Alrae
. Signed-off-by: Leon Alrae --- v3: * use FOP_PROTO for new instructions and create FLOAT_RINT macro to be consistent * use TCG_CALL_NO_RWG_SE flag for float_class helper --- disas/mips.c| 22 +++ target-mips/helper.h| 20 ++ target-mips/op_helper.c | 104 +++ target-mips

[Qemu-devel] [PATCH v3 10/21] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6

2014-06-27 Thread Leon Alrae
Also consider OPC_SPIM instruction as deleted in R6 because it is overlaping with MIPS32R6 SDBBP. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * check_insn_opc_removed() moved to decode_opc_special2_legacy() --- disas/mips.c|5 ++ target-mips/translate.c | 121

[Qemu-devel] [PATCH v3 07/21] target-mips: signal RI Exception on DSP and Loongson instructions

2014-06-27 Thread Leon Alrae
Move DSP and Loongson instruction to *_legacy functions as they have been removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 195 --- 1 files changed, 98 insertions(+), 97 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP support

2014-07-08 Thread Leon Alrae
is in a branch delay slot. Using error_code to indicate whether AdEL or TLBL was triggered during instruction fetch, in this case BadInstr is not updated as valid instruction word is not available. Signed-off-by: Leon Alrae --- target-mips/cpu.h |6 +++ target-mips/helper.c| 44

[Qemu-devel] [PATCH v2 2/9] softmmu: provide softmmu access type enum

2014-07-08 Thread Leon Alrae
New MIPS features depend on the access type and enum is more convenient than using the numbers directly. Signed-off-by: Leon Alrae --- include/exec/cpu-common.h |6 ++ softmmu_template.h| 26 -- 2 files changed, 22 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PATCH v2 6/9] target-mips: add new Read-Inhibit and Execute-Inhibit exceptions

2014-07-08 Thread Leon Alrae
when the virtual address of a memory load reference matches a TLB entry whose RI bit is set. This exception type can only occur if the RI bit is implemented within the TLB and is enabled, this is denoted by the PageGrain RIE bit. Signed-off-by: Leon Alrae --- target-mips/cpu.h|5

[Qemu-devel] [PATCH v2 7/9] target-mips: add TLBINV support

2014-07-08 Thread Leon Alrae
support for Config4.IE == 3 only (i.e. TLBINV* instructions operate on entire MMU). Single TLB entry can be marked as invalid on TLB entry write by having EntryHi.EHINV set to 1. Signed-off-by: Leon Alrae --- disas/mips.c |2 + target-mips/cpu.h|7 target

Re: [Qemu-devel] [PATCH 02/12] target-mips: update cpu_save/cpu_load to support KScratch registers

2014-07-08 Thread Leon Alrae
On 19/06/2014 18:43, Richard Henderson wrote: > You must update CPU_SAVE_VERSION when you change the contents of the save > data. > > For extra credit, consider updating target-mips to VMStateDescription > structure(s). > > > r~ > v2 contains updated CPU_SAVE_VERSION. VMStateDescription str

Re: [Qemu-devel] [PATCH 01/12] target-mips: add KScratch registers

2014-07-08 Thread Leon Alrae
On 20/06/2014 23:02, Aurelien Jarno wrote: >> @@ -5198,6 +5199,12 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int >> reg, int sel) >> gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_DESAVE)); >> rn = "DESAVE"; >> break; >> +case 2 ... 7: >> +

Re: [Qemu-devel] [PATCH 08/12] target-mips: add BadInstr and BadInstrP support

2014-07-08 Thread Leon Alrae
On 19/06/2014 23:13, Aurelien Jarno wrote: > I don't think this should implemented that way, as it would have a > significant impact on the performances. Given we have the fault address > (we fill EPC), we can fetch the corresponding opcode. There might be > some code change to do for the branches,

[Qemu-devel] [PATCH v2 9/9] target-mips: update cpu_save/cpu_load to support new registers

2014-07-08 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/cpu.h |2 +- target-mips/machine.c | 14 ++ 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 656f5ca..23bb22c 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h

[Qemu-devel] [PATCH v2 3/9] target-mips: distinguish between data load and instruction fetch

2014-07-08 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/helper.c | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 8a997e4..9871273 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -87,7 +87,7 @@ int

[Qemu-devel] [PATCH v2 5/9] target-mips: update PageGrain and m{t, f}c0 EntryLo{0, 1}

2014-07-08 Thread Leon Alrae
PageGrain needs rw bitmask which differs between MIPS architectures. In pre-R6 if RIXI is supported, PageGrain.XIE and PageGrain.RIE are writeable, whereas in R6 they are read-only 1. Signed-off-by: Leon Alrae --- target-mips/cpu.h|4 target-mips/helper.h |5

Re: [Qemu-devel] [PATCH v2 2/9] softmmu: provide softmmu access type enum

2014-07-08 Thread Leon Alrae
Hi Peter, On 08/07/2014 14:00, Peter Maydell wrote: > On 8 July 2014 08:57, Leon Alrae wrote: >> New MIPS features depend on the access type and enum is more convenient than >> using the numbers directly. >> > Mmm, I've thought for a while it would be better to have

[Qemu-devel] [PATCH v2 4/9] target-mips: add RI and XI fields to TLB entry

2014-07-08 Thread Leon Alrae
In Revision 3 of the architecture, the RI and XI bits were added to the TLB to enable more secure access of memory pages. These bits (along with the Dirty bit) allow the implementation of read-only, write-only, no-execute access policies for mapped pages. Signed-off-by: Leon Alrae --- target

[Qemu-devel] [PATCH v2 1/9] target-mips: add KScratch registers

2014-07-08 Thread Leon Alrae
CP0_KScratch1-6 registers. For Release 6, all KScratch registers are required. Signed-off-by: Leon Alrae --- target-mips/cpu.h |3 +++ target-mips/translate.c | 44 2 files changed, 47 insertions(+), 0 deletions(-) diff --git a/target-mips

Re: [Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP support

2014-07-09 Thread Leon Alrae
Hi James, On 08/07/2014 13:44, James Hogan wrote: > Hi Leon, > > On 08/07/14 08:57, Leon Alrae wrote: >> BadInstr Register (CP0 Register 8, Select 1) >> The BadInstr register is a read-only register that capture the most recent >> instruction which caused an exceptio

[Qemu-devel] [PATCH v2 0/9] target-mips: implement features required in MIPS64 Release 6

2014-07-09 Thread Leon Alrae
to an unimplemented cp0 register (new registers only) * updated CPU_SAVE_VERSION, * added a patch to the series providing mmu_access_type enum. Leon Alrae (9): target-mips: add KScratch registers softmmu: provide softmmu access type enum target-mips: distinguish between data load and

Re: [Qemu-devel] [PATCH 03/13] target-mips: refactor {D}LSA, {D}ALIGN, {D}BITSWAP

2015-06-15 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > Refactor those instructions in order to reuse them for microMIPS32 > Release 6. > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 164 +- > 1 files changed, 103 insertions(+), 61 deletions(-) >

Re: [Qemu-devel] [PATCH 05/13] target-mips: signal RI for removed instructions in microMIPS R6

2015-06-15 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > Signal a Reserved Instruction exception for removed instruction encoding > in microMIPS Release 6. > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 68 > +++ > 1 files changed, 68 insertions(

Re: [Qemu-devel] [PATCH 02/13] target-mips: add microMIPS TLBINV, TLBINVF

2015-06-15 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > add microMIPS TLBINV, TLBINVF > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c |8 > 1 files changed, 8 insertions(+), 0 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH 01/13] target-mips: fix {D, W}RGPR in microMIPS

2015-06-15 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > rt, rs were swapped > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH 04/13] target-mips: rearrange gen_compute_compact_branch

2015-06-15 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > The function will be also used for microMIPS Release 6. > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 472 +++--- > 1 files changed, 236 insertions(+), 236 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH 11/13] target-mips: microMIPS32 R6 Major instructions

2015-06-16 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > add new microMIPS32 Release 6 Major opcode instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 58 -- > 1 files changed, 55 insertions(+), 3 deletions(-) > > diff --git a/target-mip

Re: [Qemu-devel] [PATCH 10/13] target-mips: microMIPS32 R6 POOL32{I, C} instructions

2015-06-16 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > add new microMIPS32 Release 6 POOL32I/POOL32C type instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 36 > 1 files changed, 32 insertions(+), 4 deletions(-) > > diff --git a/target-mips/

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-16 Thread Leon Alrae
On 16/06/2015 15:03, Peter Maydell wrote: > On 16 June 2015 at 13:32, Liviu Ionescu wrote: >> would it be possible to have all the semihosting patches ready for 2.4? > > Yes, I agree that would be good. Is it just this 2 patch > series, or are there others too? Just to confirm -- the only thing

Re: [Qemu-devel] [PATCH 08/13] target-mips: microMIPS32 R6 POOL32A{XF} instructions

2015-06-16 Thread Leon Alrae
On 12/06/2015 15:02, Yongbok Kim wrote: > +case R6_LWXS: > +check_insn(ctx, ISA_MIPS32R6); > +gen_ldxs(ctx, rs, rt, rd); > +break; According to the manual LWXS is removed, not recoded. Otherwise, Reviewed-by: Leon Alrae

[Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7

2015-06-17 Thread Leon Alrae
Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c. Signed-off-by: Leon Alrae --- CentOS 5 is one of hosts I still use. For building I already provide custom GLib to satisfy version 2.22 dependency. However, with commit 0ea2730b QEMU doesn't build on CentOS 5.7: CC

Re: [Qemu-devel] [PATCH 09/13] target-mips: microMIPS32 R6 POOL32F instructions

2015-06-17 Thread Leon Alrae
> 9 & 0x3) { Could you please add parentheses for consistency? (also in other patches in this series) Otherwise, Reviewed-by: Leon Alrae

[Qemu-devel] [PATCH v5 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-18 Thread Leon Alrae
do (i.e. argv[1] contains the whole -append), but is more intuitive from UHI user's point of view and Linux kernel just does not care as it concatenates argv[1..n] into single cmdline string anyway. Signed-off-by: Leon Alrae --- include/exec/semihost.h | 18 ++ qemu-opt

[Qemu-devel] [PATCH v5 0/2] semihosting: clean up and add --semihosting-config arg

2015-06-18 Thread Leon Alrae
interaction between arg and -kernel/-append v3: * improved documentation (rephrased and used @table so that generated doc looks nicer) v2: * squash clean-up related patches so renaming is not required (these modifications are relatively simple anyway). Leon Alrae (2): semihosting: create

[Qemu-devel] [PATCH v5 1/2] semihosting: create SemihostingConfig structure and semihost.h

2015-06-18 Thread Leon Alrae
stuff from target specific semihosting code. Signed-off-by: Leon Alrae Reviewed-by: Peter Maydell --- gdbstub.c | 8 include/exec/gdbstub.h| 6 -- include/exec/semihost.h | 44 include/sysemu/sysemu.h | 1

[Qemu-devel] [PATCH v3 1/5] include/softmmu-semi.h: Make semihosting support 64-bit clean

2015-06-19 Thread Leon Alrae
From: "Maciej W. Rozycki" Correct addresses passed around in semihosting to use a data type suitable for both 32-bit and 64-bit targets. Signed-off-by: Maciej W. Rozycki Signed-off-by: Leon Alrae --- include/exec/softmmu-semi.h | 13 +++-- 1 file changed, 7 insertions(+), 6

[Qemu-devel] [PATCH v3 2/5] hw/mips: Do not clear BEV for MIPS malta kernel load

2015-06-19 Thread Leon Alrae
s and will unwind and forward UHI SYSCALL exceptions to the exception vector that was installed prior to running the application. Signed-off-by: Matthew Fortune Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_ma

[Qemu-devel] [PATCH v3 0/5] target-mips: add UHI semihosting support

2015-06-19 Thread Leon Alrae
x overlooked microMIPS SDBBP * translate errno values which don't map 1:1 * update dates in the licence header * return -1 and fake errno when lock_user() fails in write_to_file() and read_from_file() Leon Alrae (3): target-mips: remove identical code in different branch target-mips: a

[Qemu-devel] [PATCH v3 4/5] target-mips: add Unified Hosting Interface (UHI) support

2015-06-19 Thread Leon Alrae
if semihosting arguments are passed to indicate that the UHI operations should be used to obtain input arguments. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 9 +- qemu-options.hx | 10 +- target-mips/Makefile.objs | 2 +- target-mips/helper.h | 2 + target-mips/mips

[Qemu-devel] [PATCH v3 3/5] target-mips: remove identical code in different branch

2015-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 1d128ee..6fd6dd9 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c

[Qemu-devel] [PATCH v3 5/5] target-mips: convert host to MIPS errno values when required

2015-06-19 Thread Leon Alrae
Convert only errno values which can be returned by system calls in mips-semi.c and are not generic to all archs. Signed-off-by: Leon Alrae --- target-mips/mips-semi.c | 44 +--- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/target-mips

Re: [Qemu-devel] [PATCH v2 03/15] target-mips: remove an unused argument

2015-06-22 Thread Leon Alrae
On 19/06/2015 17:25, Yongbok Kim wrote: > remove an unused argument from decode_micromips32_opc() > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c |5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v2 04/15] target-mips: refactor {D}LSA, {D}ALIGN, {D}BITSWAP

2015-06-22 Thread Leon Alrae
- > 1 files changed, 99 insertions(+), 67 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v2 07/15] target-mips: signal RI for removed instructions in microMIPS R6

2015-06-22 Thread Leon Alrae
s changed, 68 insertions(+), 0 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v2 06/15] target-mips: raise RI exceptions when FIR.PS = 0

2015-06-22 Thread Leon Alrae
ed-off-by: Yongbok Kim > --- > target-mips/translate.c | 77 > +++ > 1 files changed, 44 insertions(+), 33 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions

2015-06-22 Thread Leon Alrae
On 19/06/2015 17:25, Yongbok Kim wrote: > @@ -14958,8 +14966,28 @@ static void decode_micromips32_opc(CPUMIPSState > *env, DisasContext *ctx) > do_cop1: > gen_cop1_ldst(ctx, mips32_op, rt, rs, imm); > break; > -case ADDIUPC: > -{ > +case ADDIUPC: /* PCREL: AD

Re: [Qemu-devel] [PATCH v2 09/15] target-mips: microMIPS32 R6 branches and jumps

2015-06-23 Thread Leon Alrae
tions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v2 14/15] target-mips: microMIPS32 R6 POOL16{A, C} instructions

2015-06-23 Thread Leon Alrae
On 19/06/2015 17:25, Yongbok Kim wrote: > microMIPS32 Release 6 POOL16A/ POOL16C instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 107 > ++- > 1 files changed, 105 insertions(+), 2 deletions(-) Looks correct, just minor

Re: [Qemu-devel] [PATCH v2 12/15] target-mips: microMIPS32 R6 POOL32{I, C} instructions

2015-06-23 Thread Leon Alrae
On 19/06/2015 17:25, Yongbok Kim wrote: > add new microMIPS32 Release 6 POOL32I/POOL32C type instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 31 +-- > 1 files changed, 25 insertions(+), 6 deletions(-) > > diff --git a/target-mips/trans

Re: [Qemu-devel] [PATCH v3 12/15] target-mips: microMIPS32 R6 POOL32{I, C} instructions

2015-06-23 Thread Leon Alrae
On 23/06/2015 16:38, Yongbok Kim wrote: > add new microMIPS32 Release 6 POOL32I/POOL32C type instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 27 +-- > 1 files changed, 21 insertions(+), 6 deletions(-) Reviewed-by: Leon Alrae

Re: [Qemu-devel] [PATCH v3 14/15] target-mips: microMIPS32 R6 POOL16{A, C} instructions

2015-06-23 Thread Leon Alrae
On 23/06/2015 16:38, Yongbok Kim wrote: > microMIPS32 Release 6 POOL16A/ POOL16C instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 122 > +-- > 1 files changed, 107 insertions(+), 15 deletions(-) Reviewed-by: Leon Alrae

[Qemu-devel] [PATCH] default-configs: add mips-softmmu-common.mak

2016-03-02 Thread Leon Alrae
Add mips-softmmu-common.mak and include it in existing mips*-softmmu.mak files to avoid having to repeat CONFIG defines four times. Suggested-by: Peter Maydell Signed-off-by: Leon Alrae --- default-configs/mips-softmmu-common.mak | 32 default-configs/mips

[Qemu-devel] [PATCH v2] default-configs: add mips-softmmu-common.mak

2016-03-02 Thread Leon Alrae
Add mips-softmmu-common.mak and include it in existing mips*-softmmu.mak files to avoid having to repeat CONFIG defines four times. Suggested-by: Peter Maydell Signed-off-by: Leon Alrae --- v2: * fixed comment line in mips-softmmu-common.mak which I had forgotten to update --- default

[Qemu-devel] [PATCH v2 00/11] hw/mips: implement Cluster Power Controller

2016-03-15 Thread Leon Alrae
* fixed format specifiers in qemu_log_mask (use PRIx64 instead of %lx) * create a container for CPS components as it was suggested in the GIC patch series (Peter) Leon Alrae (9): hw/mips: implement generic MIPS Coherent Processing System container hw/mips/cps: create GCR block inside CPS

[Qemu-devel] [PATCH v2 01/11] hw/mips: implement generic MIPS Coherent Processing System container

2016-03-15 Thread Leon Alrae
Implement generic MIPS Coherent Processing System (CPS) which in this commit just creates VPs, but it will serve as a container also for other components like Global Configuration Registers and Cluster Power Controller. Signed-off-by: Leon Alrae --- default-configs/mips-softmmu-common.mak | 1

[Qemu-devel] [PATCH v2 04/11] hw/mips/cps: create GCR block inside CPS

2016-03-15 Thread Leon Alrae
Signed-off-by: Leon Alrae --- hw/mips/cps.c | 23 +++ include/hw/mips/cps.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 782aa2b..cfd808d 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -61,6 +61,8 @@ static void

[Qemu-devel] [PATCH v2 02/11] target-mips: add CMGCRBase register

2016-03-15 Thread Leon Alrae
CMGCR enabling to a separate patch] Signed-off-by: Leon Alrae --- target-mips/cpu.h | 3 ++- target-mips/translate.c | 18 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 4f3ebb9..55d3224 100644 --- a/target-mips

[Qemu-devel] [PATCH v2 07/11] hw/mips_malta: remove CPUMIPSState from the write_bootloader()

2016-03-15 Thread Leon Alrae
Remove CPUMIPSState from the write_bootloader() argument list as it is not used in the function. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index f5173c4..cbfdb78

[Qemu-devel] [PATCH v2 10/11] hw/mips_malta: add CPS to Malta board

2016-03-15 Thread Leon Alrae
use the same pin numbers as before. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c| 60 - target-mips/cpu.h | 1 + target-mips/translate.c | 10 + 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/hw/mips/mips_m

[Qemu-devel] [PATCH v2 06/11] hw/mips/cps: create CPC block inside CPS

2016-03-15 Thread Leon Alrae
via CPC memory-mapped registers. Signed-off-by: Leon Alrae --- hw/mips/cps.c| 16 + hw/misc/mips_cmgcr.c | 53 include/hw/mips/cps.h| 2 ++ include/hw/misc/mips_cmgcr.h | 10 + 4 files changed, 81

[Qemu-devel] [PATCH v2 03/11] hw/mips: add initial Global Config Register support

2016-03-15 Thread Leon Alrae
} to mips_cmgcr.{c,h}, * replaced CONFIG_MIPS_GIC with CONFIG_MIPS_CPS] Signed-off-by: Leon Alrae --- hw/misc/Makefile.objs| 1 + hw/misc/mips_cmgcr.c | 106 +++ include/hw/misc/mips_cmgcr.h | 49 3 files changed, 156

[Qemu-devel] [PATCH v2 08/11] hw/mips_malta: remove redundant irq and clock init

2016-03-15 Thread Leon Alrae
Global smp_cpus is never zero (even if user provides -smp 0), thus clocks and irqs are always initialized for each created CPU in the loop at the beginning of mips_malta_init. These two lines cause a leak of already allocated timer and irqs for the first CPU - remove them. Signed-off-by: Leon

[Qemu-devel] [PATCH v2 09/11] hw/mips_malta: move CPU creation to a separate function

2016-03-15 Thread Leon Alrae
Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 68 ++-- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index b70948d..9e8b9ce 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips

[Qemu-devel] [PATCH v2 11/11] target-mips: enable CM GCR in MIPS64R6-generic CPU

2016-03-15 Thread Leon Alrae
Indicate that in the MIPS64R6-generic CPU the memory-mapped Global Configuration Register Space is implemented. Signed-off-by: Leon Alrae --- target-mips/translate_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-mips/translate_init.c b/target-mips

[Qemu-devel] [PATCH v2 05/11] hw/mips: add initial Cluster Power Controller support

2016-03-15 Thread Leon Alrae
on a single core: * VP Run is a write-only register used to set each VP to the run state * VP Stop is a write-only register used to set each VP to the suspend state * VP Running is a read-only register indicating the run state of each VP Signed-off-by: Leon Alrae --- hw/misc/Makefile.objs

Re: [Qemu-devel] [PATCH for-2.5 v2 2/4] mips: add Global Config Register block (part)

2016-03-15 Thread Leon Alrae
Hi, I cherry-picked this patch and the other one implementing CP0.Config3.CMGCRBase into my series for the Cluster Power Control needs: https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03296.html I think all issues pointed out during the review for these two patches have been addressed

[Qemu-devel] [PULL v2 00/21] target-mips queue for 2.6

2016-03-30 Thread Leon Alrae
09:14:00 +0100) MIPS patches 2016-03-29 Changes: * add initial MIPS CPS support * implement ITU block * implement MAAR ---- Leon Alrae (17): hw/mips: implement generic MIPS Coherent Processing System container hw/mips/cps: c

[Qemu-devel] [PULL v2 01/21] hw/mips: implement generic MIPS Coherent Processing System container

2016-03-30 Thread Leon Alrae
Implement generic MIPS Coherent Processing System (CPS) which in this commit just creates VPs, but it will serve as a container also for other components like Global Configuration Registers and Cluster Power Controller. Signed-off-by: Leon Alrae --- default-configs/mips-softmmu-common.mak | 1

[Qemu-devel] [PULL v2 10/21] hw/mips_malta: add CPS to Malta board

2016-03-30 Thread Leon Alrae
use the same pin numbers as before. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c| 60 - target-mips/cpu.h | 1 + target-mips/translate.c | 10 + 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/hw/mips/mips_m

[Qemu-devel] [PULL v2 04/21] hw/mips/cps: create GCR block inside CPS

2016-03-30 Thread Leon Alrae
Signed-off-by: Leon Alrae --- hw/mips/cps.c | 23 +++ include/hw/mips/cps.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index a74df46..e77b1da 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -62,6 +62,8 @@ static void

[Qemu-devel] [PULL v2 02/21] target-mips: add CMGCRBase register

2016-03-30 Thread Leon Alrae
CMGCR enabling to a separate patch] Signed-off-by: Leon Alrae --- target-mips/cpu.h | 3 ++- target-mips/translate.c | 18 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 4f3ebb9..55d3224 100644 --- a/target-mips

[Qemu-devel] [PULL v2 07/21] hw/mips_malta: remove CPUMIPSState from the write_bootloader()

2016-03-30 Thread Leon Alrae
Remove CPUMIPSState from the write_bootloader() argument list as it is not used in the function. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 4ff1bb2..609f6dc

[Qemu-devel] [PULL v2 13/21] hw/mips: implement ITC Storage - Control View

2016-03-30 Thread Leon Alrae
Control view is used to access the ITC Storage Cell Tags. It never causes the issuing thread to block. Guest can empty the FIFO cell by setting Empty bit to 1. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 104 + 1 file changed, 104

[Qemu-devel] [PULL v2 14/21] hw/mips: implement ITC Storage - Empty/Full Sync and Try Views

2016-03-30 Thread Leon Alrae
tions) not implemented. Store Conditional support for E/F Try View (i.e. indicate failure if FIFO is full) not implemented. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 113 + 1 file changed, 113 insertions(+) diff --git a/hw/misc/mips_itu.c

[Qemu-devel] [PULL v2 05/21] hw/mips: add initial Cluster Power Controller support

2016-03-30 Thread Leon Alrae
on a single core: * VP Run is a write-only register used to set each VP to the run state * VP Stop is a write-only register used to set each VP to the suspend state * VP Running is a read-only register indicating the run state of each VP Signed-off-by: Leon Alrae --- hw/misc/Makefile.objs

[Qemu-devel] [PULL v2 15/21] hw/mips: implement ITC Storage - P/V Sync and Try Views

2016-03-30 Thread Leon Alrae
is 0. P/V Try View does not block the thread, it returns 0 in this case. Cell's Empty and Full bits are not modified. Trap bit (i.e. Gating Storage exceptions) not implemented. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 68 ++ 1

[Qemu-devel] [PULL v2 18/21] target-mips: make ITC Configuration Tags accessible to the CPU

2016-03-30 Thread Leon Alrae
the CACHE instruction as NOP. But since CACHE can operate on ITC Tags new MIPS_HFLAG_ITC_CACHE hflag is introduced to generate the helper only when CACHE is in the ITC Access mode. Signed-off-by: Leon Alrae --- target-mips/cpu.h | 7 +- target-mips/helper.h| 3 +++ target-mips

[Qemu-devel] [PULL v2 03/21] hw/mips: add initial Global Config Register support

2016-03-30 Thread Leon Alrae
} to mips_cmgcr.{c,h}, * replaced CONFIG_MIPS_GIC with CONFIG_MIPS_CPS] Signed-off-by: Leon Alrae --- hw/misc/Makefile.objs| 1 + hw/misc/mips_cmgcr.c | 107 +++ include/hw/misc/mips_cmgcr.h | 49 3 files changed, 157

[Qemu-devel] [PULL v2 08/21] hw/mips_malta: remove redundant irq and clock init

2016-03-30 Thread Leon Alrae
Global smp_cpus is never zero (even if user provides -smp 0), thus clocks and irqs are always initialized for each created CPU in the loop at the beginning of mips_malta_init. These two lines cause a leak of already allocated timer and irqs for the first CPU - remove them. Signed-off-by: Leon

[Qemu-devel] [PULL v2 19/21] hw/mips/cps: enable ITU for multithreading processors

2016-03-30 Thread Leon Alrae
Make ITU available in the system if CPU supports multithreading and is part of CPS. Signed-off-by: Leon Alrae --- hw/mips/cps.c | 32 include/hw/mips/cps.h | 2 ++ 2 files changed, 34 insertions(+) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index

[Qemu-devel] [PULL v2 16/21] hw/mips: implement ITC Storage - Bypass View

2016-03-30 Thread Leon Alrae
Bypass View does not cause issuing thread to block and does not affect any of the cells state bit. Read from a FIFO cell returns the value of the oldest entry. Store to a FIFO cell changes the value of the newest entry. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 27

[Qemu-devel] [PULL v2 06/21] hw/mips/cps: create CPC block inside CPS

2016-03-30 Thread Leon Alrae
via CPC memory-mapped registers. Signed-off-by: Leon Alrae --- hw/mips/cps.c| 16 + hw/misc/mips_cmgcr.c | 53 include/hw/mips/cps.h| 2 ++ include/hw/misc/mips_cmgcr.h | 10 + 4 files changed, 81

[Qemu-devel] [PULL v2 09/21] hw/mips_malta: move CPU creation to a separate function

2016-03-30 Thread Leon Alrae
Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 68 ++-- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 60e8a8d..cc32a44 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips

[Qemu-devel] [PULL v2 17/21] target-mips: check CP0 enabled for CACHE instruction also in R6

2016-03-30 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index a5b8805..65f2caf 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -17194,6 +17194,7 @@ static void

[Qemu-devel] [PULL v2 12/21] hw/mips: implement ITC Configuration Tags and Storage Cells

2016-03-30 Thread Leon Alrae
Storage contains both types of cells then FIFOs are located before Semaphores. Since issuing thread can get blocked on the access to a cell (in E/F Synchronized and P/V Synchronized Views) each cell has a bitmap to track which threads are currently blocked. Signed-off-by: Leon Alrae --- default

<    3   4   5   6   7   8   9   10   >