Re: [Qemu-devel] [PATCH v3 11/11] tcg-mips: Adjust condition functions for mips64

2016-11-25 Thread Aurelien Jarno
s: | If GPR rs does not contain a sign-extended 32-bit value (bits 63..31 | equal), then the result of the operation is UNPREDICTABLE. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 00/11] tcg mips64 and mips r6 improvements

2016-11-25 Thread Aurelien Jarno
32-bit BE host during the week-end. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] tcg/mips: Add support for mips64el backend

2016-11-14 Thread Aurelien Jarno
or 32-bit guests, but I guess that's something acceptable, as it's not a regression. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2] target-sh4: add atomic tas

2016-11-03 Thread Aurelien Jarno
k good. I have tried it with my test image, and it doesn't break it. Reviewed-by: Aurelien Jarno Acked-by: Aurelien Jarno I consider this as a bugfix, not a new feature, so that should be fine despite the soft freeze. Do you want me to send a pull request? Aurelien -- Aurelien Jarno

Re: [Qemu-devel] Provide safe_syscall for s390x

2016-10-18 Thread Aurelien Jarno
th finding out the exact comand line that is > > > used to compile this file? > > > > Yes, lt was added with the extended immidiate facility. So either use > > -march=z9-109 (introduced in > > 2005) or replace the lt with an l + ltr to also run on older models. > >

Re: [Qemu-devel] [PATCH] exec: fix tlb_vaddr_to_host()

2016-09-22 Thread Aurelien Jarno
t;> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); > CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index]; That looks fine to me, sorry for the typo. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2] sh4: fix broken link to documentation

2016-08-31 Thread Aurelien Jarno
t; --- > Changes from v1: > * Add the 'https://' part to the link in hw/sh4/shix.c. > > hw/sh4/shix.c | 2 +- > target-sh4/README.sh4 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Thanks for the new version. Acked-by: Aurelien Jarno Aurelien

Re: [Qemu-devel] [PATCH] sh4: fix broken link to documentation

2016-08-31 Thread Aurelien Jarno
ters limits, but I think that's fine in such a case. I guess this will be merged through the trivial queue, that seems the best to me. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-10 Thread Aurelien Jarno
--*/ > -void float_raise(int8_t flags, float_status *status); > +void float_raise(uint8_t flags, float_status *status); > > > /*-------- > | If `a' is denormal and we are in flush-to-zero mode then set the Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 2/5] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-10 Thread Aurelien Jarno
On 2016-08-09 22:12, Peter Maydell wrote: > On 9 August 2016 at 20:16, Aurelien Jarno wrote: > > On 2016-08-09 15:02, Pranith Kumar wrote: > >> Change the flag type to 'int' to fix the implicit conversion error. > >> > >> Suggested-by: Pe

Re: [Qemu-devel] [PATCH 2/5] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-09 Thread Aurelien Jarno
o zero and set the inexact flag? */ > flag flush_to_zero; This changes the size of the structure, and thus of the CPU*State structures. I don't think it's something we want to do, especially given we currently only use 7 flags, so 7 bits and that fits in a char. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 for-2.7 2/7] tcg: Reorg TCGOp chaining

2016-08-05 Thread Aurelien Jarno
On 2016-08-04 21:56, Richard Henderson wrote: > Instead of using -1 as end of chain, use 0, and link through the 0 > entry as a fully circular double-linked list. > > Signed-off-by: Richard Henderson Thanks for the new patchset. It looks fine to me. Reviewed-by: Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 9/9] tcg: Lower indirect registers in a separate pass

2016-07-25 Thread Aurelien Jarno
ptimization time and the level of optimization. Nevertheless I think it's the correct way to go forward for now and this patch fixes real issues on hosts with limited registers. Maybe just add a note saying there *might* be better ways to do that. Reviewed-by: Aurelien Jarno -

Re: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps

2016-07-25 Thread Aurelien Jarno
erminal. As such when not dumping to the file, the alignment is wrong. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps

2016-07-25 Thread Aurelien Jarno
On 2016-06-23 20:48, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 26 ++ > 1 file changed, 26 insertions(+) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...

Re: [Qemu-devel] [PATCH v3 7/9] tcg: Compress dead_temps and mem_temps into a single array

2016-07-25 Thread Aurelien Jarno
ive would have been to use the TCGTempSet with the bitmap functions like in optimize.c, and use only 2 bits per temp. That something that can be done later though. All that said and provided you change the name: Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 6/9] tcg: Fold life data into TCGOp

2016-07-25 Thread Aurelien Jarno
gt; 2 files changed, 17 insertions(+), 18 deletions(-) This looks fine and goes in the right direction of having all the data at the same location. In the long term it might be useful to have the TCG stream and the associated data together to implement more agressive optimisations. Reviewed-by: Aurelien Ja

Re: [Qemu-devel] [PATCH v3 5/9] tcg: Reorg TCGOp chaining

2016-07-25 Thread Aurelien Jarno
igned prev : 16; > -signed next : 16; > +/* Index of the prex/next op, or 0 for the end of the list. */ It's not introduced by your patch, but you might want to fix the typo prex -> prev. > +unsigned prev : 16; > +unsigned next : 16; > } TCGOp; > > -QEMU_BUILD_BUG_ON(NB_OPS > 0xff); > -QEMU_BUILD_BUG_ON(OPC_BUF_SIZE >= 0x7fff); > -QEMU_BUILD_BUG_ON(OPPARAM_BUF_SIZE >= 0x7fff); > +/* Make sure operands fit in the bitfields above. */ > +QEMU_BUILD_BUG_ON(NB_OPS > (1 << 8)); > +QEMU_BUILD_BUG_ON(OPC_BUF_SIZE > (1 << 16)); > +QEMU_BUILD_BUG_ON(OPPARAM_BUF_SIZE > (1 << 16)); > + > +/* Make sure that we don't overflow 64 bits without noticing. */ > +QEMU_BUILD_BUG_ON(sizeof(TCGOp) > 8); > > struct TCGContext { > uint8_t *pool_cur, *pool_end; It seems that gen_first_op_idx and gen_last_op_idx are now unused. Shouldn't they be removed? -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 3/9] tcg: Require liveness analysis

2016-07-25 Thread Aurelien Jarno
isations we are doing there it became quite difficult to compare the generated code with and without liveness. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 1/9] tcg: Fix name for high-half register

2016-07-25 Thread Aurelien Jarno
ts->name = strdup(buf); > +ts2->name = strdup(buf); > } else { > ts->base_type = type; > ts->type = type; Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 4/9] tcg: Compress liveness data to 16 bits

2016-07-25 Thread Aurelien Jarno
bly for later: we can zero the s->op_arg_life structure, and then access it directly instead of using the arg_life temporary variable. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-07-22 Thread Aurelien Jarno
On 2016-06-18 22:48, Hervé Poussineau wrote: > Hi Aurélien, > > Le 20/05/2016 à 21:56, Aurelien Jarno a écrit : > > On 2016-05-20 15:05, Hervé Poussineau wrote: > > > Incidentally, this fixes YAMON on big endian guest. > > > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH v3 0/9] Third try at fixing sparc register allocation

2016-07-22 Thread Aurelien Jarno
ixed for 2.7, but this is > complex enough I'd prefer another set of eyes. I'll try to have a look during the week-end. Sorry about the delay. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] hw/mips_malta: Fix YAMON API print routine

2016-07-22 Thread Aurelien Jarno
uration mismatch but QEMU would previously > incorrectly jump & wind up printing a continuous stream of the letter E. > > Signed-off-by: Paul Burton > Cc: Aurelien Jarno > Cc: Leon Alrae > --- > hw/mips/mips_malta.c | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: [Qemu-devel] [PATCH] target-sh4: Use glib allocator in movcal helper

2016-07-21 Thread Aurelien Jarno
ation > > functions, which abort on allocation failure. > > > > Signed-off-by: Peter Maydell > > --- > > target-sh4/op_helper.c | 7 --- > > 1 file changed, 4 insertions(+), 3 deletions(-) I have just looked at it and test it. It's all fine, sorry for the delay.

Re: [Qemu-devel] [PATCH] hw/sh4: Add dtb support

2016-06-26 Thread Aurelien Jarno
r = qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", > +kernel_cmdline); > +if (r < 0) { > + fprintf(stderr, "couldn't set /chosen/bootargs\n"); > +} > +

Re: [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending

2016-06-13 Thread Aurelien Jarno
rlarge value. > > Do we have any documentation on how this (simulated) > device is supposed to behave in this case? This device is not supported by the linux kernel for more than 2.5 years (since v3.7). Do we want to keep this device in QEMU? Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-13 Thread Aurelien Jarno
patch fixes the names to avoid a confusion. Unless I missed something, it seems that the is_user/mmu_idx argument is never used. Should we maybe just drop it? Otherwise it looks fine. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] hw/sh4/sh_pci.c: Use ldl_le_p() and stl_le_p()

2016-06-12 Thread Aurelien Jarno
-85,7 +85,7 @@ static uint64_t sh_pci_reg_read (void *p, hwaddr addr, > > switch(addr) { > case 0 ... 0xfc: > -return le32_to_cpup((uint32_t*)(pcic->dev->config + addr)); > +return ldl_le_p(pcic->dev->config + addr); > case 0x1c0: >

Re: [Qemu-devel] [PATCH 0/2] macio: switch over to new byte-aligned DMA helpers

2016-05-30 Thread Aurelien Jarno
ath as I know this is > something you've had issues with before and I couldn't quite figure out how to > reproduce your TRIM tests from before. I have just tested the TRIM path, all works fine with your 2 patches applied. Aurelien -- Aurelien Jarno GPG

Re: [Qemu-devel] [PATCH v2 06/12] tcg/mips: Add support for fence

2016-05-30 Thread Aurelien Jarno
a tcg_out_call. */ > @@ -1716,6 +1720,8 @@ static const TCGTargetOpDef mips_op_defs[] = { > { INDEX_op_qemu_ld_i64, { "L", "L", "lZ", "lZ" } }, > { INDEX_op_qemu_st_i64, { "SZ", "SZ", "SZ", "SZ" }

Re: [Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-05-20 Thread Aurelien Jarno
(size == 2) { > +return lduw_le_p(buf); > +} else if (size == 4) { > +return ldl_le_p(buf); > +} else { > +g_assert_not_reached(); > +} The device is configured is little endian, and then the little endian value converted into native endianness. Wouldn't it be simple to declare it as DEVICE_NATIVE_ENDIAN? Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

[Qemu-devel] [PATCH] target-mips: fix call to memset in soft reset code

2016-05-09 Thread Aurelien Jarno
of sizeof(). Fix that. Cc: Stefan Weil Cc: Leon Alrae LP: https://bugs.launchpad.net/qemu/+bug/1577841 Signed-off-by: Aurelien Jarno --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 1004ede..cfea177

Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread Aurelien Jarno
); > > > > ** Affects: qemu > > Importance: Undecided > > Status: New > > This might be an error. I think it should be > > memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); > I confirm this is the correct version of the co

Re: [Qemu-devel] [PATCH] target-mips: Fix RDHWR exception host PC

2016-04-28 Thread Aurelien Jarno
ception is passed to the inner guest. > > Fixes: b00c72180c36 ("target-mips: add PC, XNP reg numbers to RDHWR") > Signed-off-by: James Hogan > Cc: Leon Alrae > Cc: Yongbok Kim > Cc: Aurelien Jarno > --- > target-mips/op_helper.c | 16 > 1 f

Re: [Qemu-devel] 'tcg fatal error' with qemu v2.6.0-rc3 (bisected)

2016-04-26 Thread Aurelien Jarno
ng before by chance by loading a random value into the register. That said to look deeper into it, it would be better to be able to reproduce the issue. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
On 2016-04-22 20:00, Sergey Fedorov wrote: > On 22/04/16 19:51, Aurelien Jarno wrote: > > On 2016-04-22 18:47, Aurelien Jarno wrote: > >> On 2016-04-22 19:08, Sergey Fedorov wrote: > >>> From: Sergey Fedorov > >>> > >>> Ensure direct jump

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
On 2016-04-22 18:47, Aurelien Jarno wrote: > On 2016-04-22 19:08, Sergey Fedorov wrote: > > From: Sergey Fedorov > > > > Ensure direct jump patching in MIPS is atomic by using > > atomic_read()/atomic_set() for code patching. > > > > Signed-off-by: Se

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
t32_t insn = atomic_read(ptr); > +atomic_set(ptr, deposit32(insn, 0, 26, addr >> 2)); > flush_icache_range(jmp_addr, jmp_addr + 4); Does it really make sense to read and write the value atomically? The resulting operation is still not atomic, something can happen in between. A

[Qemu-devel] [PATCH 1/2] tcg: use tcg_debug_assert instead of assert (fix performance regression)

2016-04-21 Thread Aurelien Jarno
. This patch replaces all the calls to assert into calss to tcg_debug_assert. Cc: Peter Maydell Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/aarch64/tcg-target.inc.c | 24 tcg/arm/tcg-target.inc.c | 12 ++-- tcg/i386/tcg-target.inc.c|

[Qemu-devel] [PATCH 2/2] tcg: check for CONFIG_DEBUG_TCG instead of NDEBUG

2016-04-21 Thread Aurelien Jarno
Check for CONFIG_DEBUG_TCG instead of NDEBUG, drop now useless code. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/aarch64/tcg-target.inc.c | 4 ++-- tcg/arm/tcg-target.inc.c | 2 +- tcg/i386/tcg-target.inc.c| 2 +- tcg/ia64/tcg-target.inc.c| 2 +- tcg/mips/tcg

[Qemu-devel] [PATCH] cuda: fix off-by-one error in SET_TIME command

2016-04-18 Thread Aurelien Jarno
With the new framework the cuda_cmd_set_time command directly receive the data, without the command byte. Therefore the time is stored at in_data[0], not at in_data[1]. This fixes the "hwclock --systohc" command in a guest. Cc: Hervé Poussineau Cc: David Gibson Signed-off-by: Aure

Re: [Qemu-devel] [PATCH] tcg/mips: Fix type of tcg_target_reg_alloc_order[]

2016-04-01 Thread Aurelien Jarno
^ > > Make it an array of ints to fix the build and match other architectures. > > Fixes: 91478cefaaf2 ("tcg: Allocate indirect_base temporaries in a different > order") > Signed-off-by: James Hogan > Cc: Aurelien Jarno > Cc: Richard Henderson >

Re: [Qemu-devel] [PATCH v2 01/16] tcg-mips: Always use tcg_debug_assert

2016-02-28 Thread Aurelien Jarno
msb = ctz32(~a2) - 1; > -assert(use_mips32r2_instructions); > - assert(is_p2m1(a2)); > +tcg_debug_assert(use_mips32r2_instructions); > +tcg_debug_assert(is_p2m1(a2)); > tcg_out_opc_bf(s, OPC_EXT, a0, a1, msb, 0); > break; > } Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 00/16] tcg mips64 and mips r6 improvements

2016-02-28 Thread Aurelien Jarno
g in the next days. I have a few comments on the individual patches, I'll send them asap. Note that I don't have an R6 machine, so I haven't been able to test that part. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add section for FPU emulation

2016-01-29 Thread Aurelien Jarno
y else like to be listed here (ie to be cc'd on softfloat > patches) ? Richard? Aurelien? As long as it is in "Odd Fixes" mode, it would like to get it listed please. I don't have time to follow the whole mailing list anymore, so being Cc'd n on softfloat patches would

Re: [Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types

2016-01-29 Thread Aurelien Jarno
oat-macros.h | 18 +++--- > fpu/softfloat.c | 162 > ++------ > include/fpu/softfloat.h | 16 ++--- > include/qemu/osdep.h| 7 --- > 4 files changed, 104 insertions(+), 99 deletions(-) Great work. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct

2016-01-29 Thread Aurelien Jarno
gt; 1 file changed, 13 insertions(+), 13 deletions(-) Thanks for the cleanup. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [Qemu-ppc] [PULL 03/39] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

2016-01-29 Thread Aurelien Jarno
t; Reviewed-by: John Snow > Signed-off-by: David Gibson > --- > hw/ide/macio.c | 20 +- > hw/ide/macio.c.orig | 634 > I don't think you want to add this file to the git. -- Aurelien Jarno GP

Re: [Qemu-devel] [PATCH RESEND] softfloat: fix return type of roundAndPackFloat16

2016-01-17 Thread Aurelien Jarno
On 2016-01-15 14:21, Peter Maydell wrote: > On 13 January 2016 at 16:03, Aurelien Jarno wrote: > > The roundAndPackFloat16 function should return a float16 value, not a > > float32 one. Fix that. > > > > Cc: Peter Maydell > > Signed-off-by: Aurelien Jarno

[Qemu-devel] [PATCH RESEND] softfloat: fix return type of roundAndPackFloat16

2016-01-13 Thread Aurelien Jarno
The roundAndPackFloat16 function should return a float16 value, not a float32 one. Fix that. Cc: Peter Maydell Signed-off-by: Aurelien Jarno --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Peter, given you are working on softfloat patches, you might want to get this

Re: [Qemu-devel] [PATCH 0/6] Get rid of confusing softfloat-specific integer types

2016-01-13 Thread Aurelien Jarno
| 2 +- > hw/net/vmxnet3.c | 2 +- > hw/ppc/spapr_events.c | 4 +- > include/fpu/softfloat.h| 68 ++ > include/hw/i386/pc.h | 2 +- > migration/ram.c| 2 +- > target-alpha/fpu_helper.c | 2 +- > target-mips/kvm.

Re: [Qemu-devel] [PATCH] target-mips: Fix ALIGN instruction when bp=0

2016-01-01 Thread Aurelien Jarno
cg_gen_ext32s_i64 and drop the TARGET_MIPS64 #ifdef. > +default: Then you can replace this by OPC_DALIGN for more clarity. > +tcg_gen_mov_tl(cpu_gpr[rd], t0); > +} > } else { > TCGv t1 = tcg_temp_new(); > gen_load_gpr(t1, r

Re: [Qemu-devel] [PATCH v2 11/14] tcg: Implement indirect memory registers

2015-12-31 Thread Aurelien Jarno
ness analysis already ensures that temps are dead. > - Keep an assert for safety. */ > -assert(ts->val_type == TEMP_VAL_DEAD); > -#else > -temp_dead(s, ts); > +/* ??? Liveness does not yet incorporate indirect

Re: [Qemu-devel] [PATCH v2 10/14] tcg: Introduce temp_load

2015-12-31 Thread Aurelien Jarno
/* XXX: sign extend ? */ And here. > -tcg_out_movi(s, ts->type, reg, ts->val); > } else { > -tcg_abort(); > +TCGRegSet arg_set; > + > + tcg_regset_clear(arg_set); > +tcg_regset_set_reg(arg_set,

Re: [Qemu-devel] [PATCH v2 09/14] tcg: Change temp_save argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...

Re: [Qemu-devel] [PATCH v2 08/14] tcg: Change temp_sync argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 55 --- > 1 file changed, 28 insertions(+), 27 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v2 07/14] tcg: Change temp_dead argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 48 +++- > 1 file changed, 23 insertions(+), 25 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v2 06/14] tcg: Change reg_to_temp to TCGTemp pointer

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 113 > ++ > tcg/tcg.h | 6 ++-- > 2 files changed, 57 insertions(+), 62 deletions(-) Reviewed-by: Aurelien Ja

Re: [Qemu-devel] [PATCH v2 05/14] tcg: Remove tcg_get_arg_str_i32/64

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 10 -- > tcg/tcg.h | 5 - > 2 files changed, 15 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel

Re: [Qemu-devel] [PATCH v2 04/14] tcg: More use of TCGReg where appropriate

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 26 +++--- > tcg/tcg.h | 8 > 2 files changed, 19 insertions(+), 15 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v2 03/14] tcg: Tidy temporary allocation

2015-12-31 Thread Aurelien Jarno
n happen all the time in an assert which can happen only when TCG debug is enabled. Is it really something we want? Maybe we should add a tcg_assert() function. Otherwise it looks fine. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 02/14] tcg: Change ts->mem_reg to ts->mem_base

2015-12-31 Thread Aurelien Jarno
This is simple bar the existing reserved_regs check. > > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 65 > +++ > tcg/tcg.h | 4 ++-- > 2 files changed, 38 insertions(+), 31 deletions(-) Reviewed-

Re: [Qemu-devel] [PATCH 01/14] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr

2015-12-31 Thread Aurelien Jarno
e/translate.c| 22 ++-- > target-unicore32/translate.c | 2 +- > target-xtensa/translate.c | 10 +++--- > tcg/tcg.c | 21 +++ > tcg/tcg.h | 38 +++- > 22 files changed, 282 insertions(+), 264 deletions(-) &

Re: [Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
On 2015-12-10 07:31, Richard Henderson wrote: > On 12/10/2015 12:02 AM, Aurelien Jarno wrote: > >Note: I don't really get the reason for the current 16MB limit. With the > >standard branch instructions the offset is coded on 24 bits, but shifted > >right by 2, which shou

[Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
Use ldr pc, [pc, #-4] kind of branch for direct jump. This removes the need to flush the icache on TB linking, and allow to remove the limit on the code generation buffer. Cc: Richard Henderson Cc: TeLeMan Cc: Andrzej Zaborowski Signed-off-by: Aurelien Jarno --- include/exec/exec-all.h | 24

Re: [Qemu-devel] tcg: improve MAX_CODE_GEN_BUFFER_SIZE for arm

2015-12-08 Thread Aurelien Jarno
On 2015-12-08 11:51, Laurent Desnogues wrote: > Hello, > > On Tue, Dec 8, 2015 at 11:39 AM, Aurelien Jarno wrote: > [...] > > I already posted a patch a long time ago to remove the 16MB limit on ARM > > hosts: > > > > http://lists.gnu.org/archive/h

Re: [Qemu-devel] tcg: improve MAX_CODE_GEN_BUFFER_SIZE for arm

2015-12-08 Thread Aurelien Jarno
ter during TB linking. > Any suggest for this issue? I already posted a patch a long time ago to remove the 16MB limit on ARM hosts: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg01684.html However as you can see in the thread, it has been rejected as it doesn't not bring impr

[Qemu-devel] [PATCH] target-mips: silence NaNs for cvt.s.d and cvt.d.s

2015-12-06 Thread Aurelien Jarno
cvt.s.d and cvt.d.s are FP operations and thus need to convert input sNaN into corresponding qNaN. Explicitely use the floatXX_maybe_silence_nan functions for that as the floatXX_to_floatXX functions do not do that. Cc: Leon Alrae Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c | 2

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-04 Thread Aurelien Jarno
On 2015-12-03 13:19, Aurelien Jarno wrote: > On 2015-12-02 10:36, Richard Henderson wrote: > > On 12/01/2015 08:32 AM, Aurelien Jarno wrote: > > >On 2015-12-01 08:19, Richard Henderson wrote: > > >>If there are a lot of guest memory ops in the TB, the amo

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-03 Thread Aurelien Jarno
On 2015-12-02 10:36, Richard Henderson wrote: > On 12/01/2015 08:32 AM, Aurelien Jarno wrote: > >On 2015-12-01 08:19, Richard Henderson wrote: > >>If there are a lot of guest memory ops in the TB, the amount of > >>code generated by tcg_out_tb_finalize could be well mor

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
On 2015-12-01 17:34, Aurelien Jarno wrote: > On 2015-12-01 16:28, Peter Maydell wrote: > > On 1 December 2015 at 16:19, Richard Henderson wrote: > > > If there are a lot of guest memory ops in the TB, the amount of > > > code generated by tcg_out_tb_finalize could be

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
servation larger than any TB > > seen in practice. > > > > Reported-by: Aurelien Jarno > > Signed-off-by: Richard Henderson > > --- > > > > Reported and discussed with Aurelien on IRC yesterday. This seems > > to be the easiest fix for the upcoming

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
On 2015-12-01 08:19, Richard Henderson wrote: > If there are a lot of guest memory ops in the TB, the amount of > code generated by tcg_out_tb_finalize could be well more than 1k. > In the short term, increase the reservation larger than any TB > seen in practice. > > Reported-

Re: [Qemu-devel] [PATCH] hw/mips_malta: Fix KVM PC initialisation

2015-10-15 Thread Aurelien Jarno
t didn't update the PC initialisation for KVM to use > ram_low_size. Fix that now. > > Fixes: 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels") > Signed-off-by: James Hogan > Cc: Paul Burton > Cc: Leon Alrae > Cc: Aurelien Jarno > ---

Re: [Qemu-devel] [PATCH v2] target-mips: remove wrong checks for recip.fmt and rsqrt.fmt

2015-10-11 Thread Aurelien Jarno
that uses these instructions. That is correct. That said these instructions do require at least a MIPS32R2 or a MIPS64R1 CPU. I guess we should add these checks now that check_cop1x do not guard them anymore. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel

Re: [Qemu-devel] [PATCH] target-mips: Add enum for BREAK32

2015-10-08 Thread Aurelien Jarno
On 2015-10-02 17:50, Yongbok Kim wrote: > Add enum for BREAK32 > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 40

Re: [Qemu-devel] [PATCH v3 3/6] tcg/mips: Add use_mips32r6_instructions definition

2015-10-08 Thread Aurelien Jarno
viewed-by: Richard Henderson > Cc: Aurelien Jarno > --- > tcg/mips/tcg-target.h | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Aurelien Jarno > diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h > index f5ba52cacfe5..e579c10b9aaa 100644 > --- a/tcg/mips/tcg

Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-08 Thread Aurelien Jarno
Z ret, v1, c1 > OR ret, ret, TMP1 > > Which does the following: > ret = cond ? v1 : v2 > > Signed-off-by: James Hogan > Cc: Richard Henderson > Cc: Aurelien Jarno > --- > Changes in v3: > - Switch to using bool eqz to indicate whether to use SELEQZ /

Re: [Qemu-devel] [PATCH v3 2/6] disas/mips: Add R6 jr/jr.hb to disassembler

2015-10-08 Thread Aurelien Jarno
On 2015-10-02 13:24, James Hogan wrote: > MIPS r6 encodes jr as jalr zero, and jr.hb as jalr.hb zero, so add these > encodings to the MIPS disassembly table. > > Signed-off-by: James Hogan > Reviewed-by: Leon Alrae > Reviewed-by: Richard Henderson > Cc: Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-08 Thread Aurelien Jarno
usy, could you take them? (at the moment I don't have > anything handy to test the mips backend). Sorry I have been indeed a bit busy. I can send a pull request in the next days. As you prefer. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 4/6] tcg/mips: Support r6 JR encoding

2015-10-08 Thread Aurelien Jarno
; prediction stack hardware which may detect only particular encodings of > the return instruction. > > Signed-off-by: James Hogan > Reviewed-by: Richard Henderson > Cc: Aurelien Jarno > --- > Changes in v2: > - Turn #define into enum (Richard). > --- > tcg/mips/tcg-ta

Re: [Qemu-devel] [PATCH v3 5/6] tcg/mips: Support r6 multiply/divide encodings

2015-10-08 Thread Aurelien Jarno
ng it into mul_i32 and > mul*h_i32 TCG ops. > > Signed-off-by: James Hogan > Reviewed-by: Richard Henderson > Cc: Aurelien Jarno > --- > Changes in v2: > - Use a common OPC_MUL definition. use_mips32_instructions will always >

Re: [Qemu-devel] [PATCH v3 1/6] tcg-opc.h: Simplify debug_insn_start def

2015-10-08 Thread Aurelien Jarno
> tcg/tcg-opc.h | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Aurelien Jarno Note that it will conflict with the "tcg: Rename debug_insn_start to insn_start" patch that Richard has posted on the list, but it should be tri

Re: [Qemu-devel] [PATCH v4 24/26] tcg: Allocate a guard page after code_gen_buffer

2015-10-01 Thread Aurelien Jarno
don't use it to the last kB, and thus we could keep some safe margin if needed. Also what happens if an overflow really happens? In softmmu mode a segmentation fault will happen. In user-mode I guess the fault will be forwarded to the guest process, so this will likely wrongly be interpreted as

Re: [Qemu-devel] [PATCH v4 00/26] Do away with TB retranslation

2015-10-01 Thread Aurelien Jarno
n plenty of VM without any issue, except on SH4. I realized SH4 broken in some rare cases, but not directly by this patchset. There is an issue when a delay slot is split in two parts when reaching the maximum number of TCG ops. Given the patch 2 adds more TCG ops, it triggers more often. It is al

Re: [Qemu-devel] [PATCH v4 23/26] tcg: Emit prologue to the beginning of code_gen_buffer

2015-10-01 Thread Aurelien Jarno
ck); > } > > @@ -717,8 +709,6 @@ void tcg_exec_init(unsigned long tb_size) > { > cpu_gen_init(); > code_gen_alloc(tb_size); > -tcg_ctx.code_gen_ptr = tcg_ctx.code_gen_buffer; > -tcg_register_jit(tcg_ctx.code_gen_buffer, tcg_ctx.code_gen_buffer_size); > page_init(); > #if defined(CONFIG_SOFTMMU) > /* There's no guest base to take into account, so go ahead and Otherwise the patch looks fine to me. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 26/26] tcg: Adjust CODE_GEN_AVG_BLOCK_SIZE

2015-10-01 Thread Aurelien Jarno
> 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 25/26] tcg: Check for overflow via highwater mark

2015-10-01 Thread Aurelien Jarno
e RAM, as the two do not seem that related. It happens that at some point we don't really increases performances anymore, and always defining it as 32MB might actually be a good idea. Personally I am using a patch that limits it to 128MB. -- Aurelien Jarno GPG: 4096R/

Re: [Qemu-devel] [PATCH v4 04/26] target-*: Introduce and use cpu_breakpoint_test

2015-10-01 Thread Aurelien Jarno
-- > target-xtensa/translate.c | 25 +++-- > 18 files changed, 160 insertions(+), 239 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 21/25] tcg: Remove gen_intermediate_code_pc

2015-09-25 Thread Aurelien Jarno
- > target-xtensa/translate.c | 39 --- > tcg/tcg.h | 4 > 22 files changed, 90 insertions(+), 736 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 22/25] tcg: Remove tcg_gen_code_search_pc

2015-09-25 Thread Aurelien Jarno
| 2 -- > 2 files changed, 19 insertions(+), 42 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 20/25] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-25 Thread Aurelien Jarno
gt;icount_decr.u16.low -= i; > +restore_state_to_opc(env, tb, data); > > #ifdef CONFIG_PROFILER > -s->restore_time += profile_getclock() - ti; > - s->restore_count++; > +tcg_ctx.restore_time += profile_getclock() - ti; > +tcg_ctx.restore_count++; > #endif > return 0; > } > @@ -969,7 +1035,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > tb_page_addr_t phys_pc, phys_page2; > target_ulong virt_page2; > tcg_insn_unit *gen_code_buf; > -int gen_code_size; > +int gen_code_size, search_size; > #ifdef CONFIG_PROFILER > int64_t ti; > #endif > @@ -1025,11 +1091,13 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > #endif > > gen_code_size = tcg_gen_code(&tcg_ctx, gen_code_buf); > +search_size = encode_search(tb, (void *)gen_code_buf + gen_code_size); > > #ifdef CONFIG_PROFILER > tcg_ctx.code_time += profile_getclock(); > tcg_ctx.code_in_len += tb->size; > tcg_ctx.code_out_len += gen_code_size; > +tcg_ctx.search_out_len += search_size; > #endif > > #ifdef DEBUG_DISAS > @@ -1041,8 +1109,9 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > } > #endif > > -tcg_ctx.code_gen_ptr = (void *)(((uintptr_t)gen_code_buf + > -gen_code_size + CODE_GEN_ALIGN - 1) & ~(CODE_GEN_ALIGN - 1)); > +tcg_ctx.code_gen_ptr = (void *) > +ROUND_UP((uintptr_t)gen_code_buf + gen_code_size + search_size, > + CODE_GEN_ALIGN); > > /* check next page if needed */ > virt_page2 = (pc + tb->size - 1) & TARGET_PAGE_MASK; If you fix the coding style issue I mentioned above, you get: Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 19/25] tcg: Pass data argument to restore_state_to_opc

2015-09-24 Thread Aurelien Jarno
target-xtensa/translate.c | 5 +++-- > tcg/tcg.c | 11 ++- > tcg/tcg.h | 2 ++ > translate-all.c | 2 +- > 22 files changed, 79 insertions(+), 66 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 18/25] tcg: Add TCG_MAX_INSNS

2015-09-24 Thread Aurelien Jarno
rpage(&ctx, pc_start)) { > pc_mask = (1ULL << 41) - 1; Given we have the same pattern in all targets, I do wonder if it wouldn't be better to just setup (cflags & CF_COUNT_MASK) to TCG_MAX_INSNS instead of 0 in translate-all.c when not using icount. Tha

Re: [Qemu-devel] [PATCH v3 17/25] target-*: Drop cpu_gen_code define

2015-09-24 Thread Aurelien Jarno
- > target-sh4/cpu.h| 1 - > target-sparc/cpu.h | 1 - > target-tilegx/cpu.h | 1 - > target-xtensa/cpu.h | 1 - > 16 files changed, 16 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 16/25] tcg: Merge cpu_gen_code into tb_gen_code

2015-09-24 Thread Aurelien Jarno
> 2 files changed, 59 insertions(+), 74 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 15/25] target-sparc: Add npc state to insn_start

2015-09-24 Thread Aurelien Jarno
On 2015-09-22 13:24, Richard Henderson wrote: > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > target-sparc/cpu.h | 1 + > target-sparc/translate.c | 7 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 12/25] target-sparc: Tidy gen_branch_a interface

2015-09-24 Thread Aurelien Jarno
+++--- > 1 file changed, 10 insertions(+), 11 deletions(-) > Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 14/25] target-sparc: Remove gen_opc_jump_pc

2015-09-24 Thread Aurelien Jarno
> Signed-off-by: Richard Henderson > --- > target-sparc/translate.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

<    1   2   3   4   5   6   7   8   9   10   >