[Qemu-devel] qemu patch for disabling tcg

2013-02-07 Thread Claudio Fontana
Hello, there was a proposed patch by Paolo Bonzini some time ago about adding an option to qemu to disable tcg: https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02568.html Is there some plan to integrate it? Paolo, do you have a newer version that applies cleanly to mainline? Thanks,

[Qemu-devel] QEMU aarch64 TCG target

2013-03-14 Thread Claudio Fontana
most painful, and then I still need the tcg_target_init and the prologue. Is anybody else working on this? Ciao, Claudio -- Claudio Fontana

Re: [Qemu-devel] [PATCH 0/2] Disassembly with external objdump

2013-09-03 Thread Claudio Fontana
Hi, resuming this conversation about external objdump, On 10.08.2013 21:47, Richard Henderson wrote: > On 08/10/2013 06:53 AM, Max Filippov wrote: >> On Sat, Aug 10, 2013 at 8:42 PM, Richard Henderson wrote: >>> On 08/10/2013 05:45 AM, Peter Maydell wrote: Well, it depends. If we're going to

[Qemu-devel] [ARM][regression][bisect] ARM target broken: test v5 image does not start kernel

2013-09-05 Thread Claudio Fontana
88 # bad: [9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71] memory: Return -1 again on reads from unsigned regions git bisect bad 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71 # good: [b4afea11aafe85975e74dd562bb94f7ce3de1ef1] memory: actually set the owner git bisect good b4afea11aafe85975e74dd562bb94f7c

Re: [Qemu-devel] [ARM][regression][bisect] ARM target broken: test v5 image does not start kernel

2013-09-05 Thread Claudio Fontana
Hi Peter, On 05.09.2013 10:59, Peter Maydell wrote: > On 5 September 2013 09:31, Claudio Fontana wrote: > >> I just finished bisecting a regression I am experiencing on ARM 32bit target, > >> After a painful bisection, I got a first bad commit, which when reverted on >

Re: [Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32

2014-09-24 Thread Claudio Fontana
As I mentioned before, I just have one nit with this, functionally it is fine (and I tested it with multiple targets, so you can add my Tested-by: Claudio Fontana I describe my nit below: On 22.09.2014 22:57, Richard Henderson wrote: > The "old" qemu_ld opcode did not specify th

Re: [Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32

2014-09-25 Thread Claudio Fontana
On 24.09.2014 17:19, Richard Henderson wrote: > On 09/24/2014 01:20 AM, Claudio Fontana wrote: >>> @@ -1118,7 +1119,8 @@ static void tcg_out_qemu_ld_direct(TCGContext *s, >>> TCGMemOp memop, >>> tcg_out_ldst_r(s, I3312_LDRB, data_r, addr_r, off_r); >>&

Re: [Qemu-devel] [RFC] arm/virt: mark timer in fdt as armv8-compatible

2014-09-26 Thread Claudio Fontana
On 25 September 2014 19:15, Peter Maydell wrote: > On 16 September 2014 10:31, Claudio Fontana wrote: >> This is obviously wrong, we have to put a \0 to separate the two options. >> >> But thee question remains, should we mark that as arm,armv8-timer compatible? > >

Re: [Qemu-devel] [PATCH] target-arm: A64: Correct handling of UXN bit.

2014-06-10 Thread Claudio Fontana
This patch fixes my issue with page tables switching on OSv guest. Thank you all! Tested-by: Claudio Fontana On 08.06.2014 15:53, Ian Campbell wrote: > In v8 page tables bit 54 in the PTE is UXN in the EL0/EL1 translation regimes > and XN elsewhere. In v7 the bit is always XN. Since w

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm/virt: Provide PL031 RTC

2014-06-11 Thread Claudio Fontana
On 10.06.2014 19:06, Peter Maydell wrote: > UEFI mandates that the platform must include an RTC, so provide > one in 'virt', using the PL031. > > Signed-off-by: Peter Maydell > --- > hw/arm/virt.c | 30 ++ > 1 file changed, 30 insertions(+) > > diff --git a/hw/arm/vi

[Qemu-devel] hw/arm/virt: Provide PCI?

2014-06-16 Thread Claudio Fontana
On 14.06.2014 01:10, Peter Crosthwaite wrote: > On Thu, Jun 12, 2014 at 2:01 AM, Claudio Fontana > wrote: >> On 10.06.2014 19:06, Peter Maydell wrote: >>> UEFI mandates that the platform must include an RTC, so provide >>> one in 'virt', using the PL0

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-18 Thread Claudio Fontana
On 17.06.2014 11:03, David Marchand wrote: > Hello all, > > On 06/17/2014 04:54 AM, Stefan Hajnoczi wrote: >> ivshmem has a performance disadvantage for guest-to-host >> communication. Since the shared memory is exposed as PCI BARs, the >> guest has to memcpy into the shared memory. >> >> vhost-u

Re: [Qemu-devel] [PATCH 0/2] ivshmem: update documentation, add client/server tools

2014-06-23 Thread Claudio Fontana
Hello David, On 20.06.2014 14:15, David Marchand wrote: > Hello, > > (as suggested by Paolo, ccing Claudio and kvm mailing list) > > Here is a patchset containing an update on ivshmem specs documentation and > importing ivshmem server and client tools. > These tools have been written from scrat

Re: [Qemu-devel] [PATCH 1/2] docs: update ivshmem device spec

2014-06-23 Thread Claudio Fontana
Hi, we were reading through this quickly today, and these are some of the questions that we think can came up when reading this. Answers to some of these questions we think we have figured out, but I think it's important to put this information into the documentation. I will quote the file in i

Re: [Qemu-devel] [PATCH 0/2] Disassembly with external objdump

2013-08-10 Thread Claudio Fontana
think that using objdump is better even for AArch64, since objdump will see more use and be more tested. I don't have anywhere to test until September, but I generally Acked-by: Claudio Fontana

Re: [Qemu-devel] [PATCH] hw/arm/virt: mark timer in fdt as v8-compatible

2014-10-09 Thread Claudio Fontana
Hello Peter, are you ok with this one? Thanks, Claudio On 26 September 2014 15:09, wrote: > From: Claudio Fontana > > check if the first cpu is an armv8 cpu, and if so, put > arm,armv8-timer in the compatible string list. > > Note that due to this check, this patch moves

Re: [Qemu-devel] [PATCH] linux-user: Fix fault address truncation AArch64

2014-10-10 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 10.10.2014 06:22, Amanieu d'Antras wrote: > On AArch64 the si_addr field of siginfo_t is truncated to 32 bits > because the fault address passes through an uint32_t variable. This > is fixed by changing the variable to uint64_t. > > Si

Re: [Qemu-devel] [PATCH] hw/arm/virt: mark timer in fdt as v8-compatible

2014-10-10 Thread Claudio Fontana
On 09.10.2014 19:04, Peter Maydell wrote: > On 9 October 2014 18:00, Peter Maydell wrote: >> On 26 September 2014 14:09, wrote: >>> From: Claudio Fontana >>> >>> check if the first cpu is an armv8 cpu, and if so, put >>> arm,armv8-timer in the com

Re: [Qemu-devel] [PATCH 1/1] pci-host: add educational driver

2014-10-10 Thread Claudio Fontana
Hello, On 10.10.2014 14:09, Jiri Slaby wrote: > I am using qemu for teaching the Linux kernel at our university. I > wrote a simple PCI device that can answer to writes/reads, generate > interrupts and perform DMA. As I am dragging it locally over 2 years, > I am sending it to you now. > > Signed

Re: [Qemu-devel] [PATCH] linux-user: Fix fault address truncation AArch64

2014-10-10 Thread Claudio Fontana
On 10.10.2014 13:32, Peter Maydell wrote: > On 10 October 2014 05:22, Amanieu d'Antras wrote: >> On AArch64 the si_addr field of siginfo_t is truncated to 32 bits >> because the fault address passes through an uint32_t variable. This >> is fixed by changing the variable to uint64_t. >> >> Signed-o

Re: [Qemu-devel] [PATCH v5 1/3] contrib: add ivshmem client and server

2014-09-05 Thread Claudio Fontana
Just to point out that for the client there is also a DEBUG_LOG to uppercase, just like already pointed out for the server. >> diff --git a/contrib/ivshmem-client/ivshmem-client.c >> b/contrib/ivshmem-client/ivshmem-client.c >> new file mode 100644 >> index 000..ad210c8 >> --- /dev/null >> +

Re: [Qemu-devel] HelloWord kernel for qemu-system-aarch64

2014-09-05 Thread Claudio Fontana
On 05.09.2014 16:50, Semion Prihodko wrote: > Let's discard semihosting. I have aarch64-linux-gnu-* toolchain and > qemu-system-aarch64 emulator. How can I build a minimal kernel which > outputs Hello World! via serial port and run it on the emulator? > If you run qemu with the "virt" platform, y

Re: [Qemu-devel] [PATCH 1/2] tcg: Compress TCGLabelQemuLdst

2014-09-08 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 03.09.2014 18:46, Richard Henderson wrote: > Use 1 32-bit word instead of 6. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-be-ldst.h | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a

Re: [Qemu-devel] [RFC PATCH 0/8] Add Generic PCI host device update

2014-09-09 Thread Claudio Fontana
On 11.07.2014 11:28, Alvise Rigo wrote: > The kernel version is a very recent one: v3.16.0-rc1. > Maybe you are right. I will test some older version to see if I'm able > to reproduce the issue. > > Thank you, > alvise Any news on this? I will be soon in the situation when I can start testing th

Re: [Qemu-devel] [PATCH 2/2] tcg-aarch64: Use 32-bit loads for qemu_ld_i32

2014-09-12 Thread Claudio Fontana
On 03.09.2014 18:46, Richard Henderson wrote: > The "old" qemu_ld opcode did not specify the size of the result, > and so we had to assume full register width. With the new opcodes, > we can narrow the result. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 29 ++

Re: [Qemu-devel] [RFC] arm/virt: mark timer in fdt as armv8-compatible

2014-09-16 Thread Claudio Fontana
This is obviously wrong, we have to put a \0 to separate the two options. But thee question remains, should we mark that as arm,armv8-timer compatible? Thanks, Claudio On 15 September 2014 10:14, wrote: > From: Claudio Fontana > > Signed-off-by: Claudio Fontana > --- > hw

Re: [Qemu-devel] [PATCH v2 2/2] docs: update ivshmem device spec

2014-07-21 Thread Claudio Fontana
> > Signed-off-by: David Marchand Reviewed-by: Claudio Fontana > --- > docs/specs/ivshmem_device_spec.txt | 124 > +++- > 1 file changed, 93 insertions(+), 31 deletions(-) > > diff --git a/docs/specs/ivshmem_device_spec.txt &g

Re: [Qemu-devel] [PATCH v3 2/2] docs: update ivshmem device spec

2014-08-08 Thread Claudio Fontana
s > supporting multiple MSI vectors can use different vectors to indicate > different > events have occurred. The semantics of interrupt vectors are left to the > user's discretion. > - > - > -Usage in the Guest > --- > - > -The shared memory device is intended to be used with the provided UIO driver. > -Very little configuration is needed. The guest should map BAR0 to access the > -registers (an array of 32-bit ints allows simple writing) and map BAR2 to > -access the shared memory region itself. The size of the shared memory region > -is specified when the guest (or shared memory server) is started. A guest > may > -map the whole shared memory region or only part of it. > -- Claudio Fontana Server Virtualization Architect Huawei Technologies Duesseldorf GmbH Riesstraße 25 - 80992 München office: +49 89 158834 4135 mobile: +49 15253060158

Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Since the kernel doesn't pass any info on the reason for the fault, > disassemble the instruction to detect a store. > > Signed-off-by: Richard Henderson > --- > user-exec.c | 29 +++-- > 1 file changed, 23 insertions(+), 6

Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Since the kernel doesn't pass any info on the reason for the fault, > disassemble the instruction to detect a store. > > Signed-off-by: Richard Henderson > --- > user-exec.c | 29 +++-- > 1 file changed, 23 insertions(+), 6

Re: [Qemu-devel] [PATCH 02/26] tcg-aarch64: Use intptr_t apropriately

2014-03-24 Thread Claudio Fontana
tcg_out_callr(s, TCG_REG_TMP); > -tcg_out_goto(s, (tcg_target_long)lb->raddr); > +tcg_out_goto(s, (intptr_t)lb->raddr); > } > > static void add_qemu_ldst_label(TCGContext *s, int is_ld, int opc, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 03/26] tcg-aarch64: Use TCGType and TCGMemOp constants

2014-03-24 Thread Claudio Fontana
xt(s, ext, MO_8, a0, a1); > break; > case INDEX_op_ext16s_i64: > case INDEX_op_ext16s_i32: > -tcg_out_sxt(s, ext, 1, a0, a1); > +tcg_out_sxt(s, ext, MO_16, a0, a1); > break; > case INDEX_op_ext32s_i64: > -tcg_out_sxt(s, 1, 2, a0, a1

Re: [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi

2014-03-24 Thread Claudio Fontana
return; > +} > + > /* Check for bitfield immediates. For the benefit of 32-bit quantities, > use the sign-extended value. That lets us match rotated values such > as 0xffff with the same 64-bit logic matching 0xffff. > */ > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 04/26] tcg-aarch64: Use MOVN in tcg_out_movi

2014-03-24 Thread Claudio Fontana
t the lane that we just set. */ > +value &= ~(0xUL << shift); > + > +/* Iterate until all lanes have been set, and thus cleared from VALUE. > */ > +while (value) { > +shift = ctz64(value) & (63 & -16); > +tcg_out_insn(s, 3405, MOVK, type, rd, value >> shift, shift); > value &= ~(0xUL << shift); > -insn = I3405_MOVK; > -} while (value); > +} > } > > static inline void tcg_out_ldst_r(TCGContext *s, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Loading an qemu pointer as an immediate happens often. E.g. > > - exit_tb $0x7fa8140013 > + exit_tb $0x7f81ee0013 > ... > - : d2800260mov x0, #0x13 > - : f2b50280movkx0, #0xa814, lsl #16 > - : f2c00fe0movkx0, #

Re: [Qemu-devel] [PATCH 05/26] tcg-aarch64: Use ORRI in tcg_out_movi

2014-03-24 Thread Claudio Fontana
-c += r; > -} > -} else { > -r = 64 - l; /* form 1100 or 0..01..10..0 */ > -c = r - h - 1; > -} > -if (ext == TCG_TYPE_I32) { > -r &= 31; > -c &= 31; > -} > - > -tcg_out_insn_3404(s, insn, ext, rd, rn, ext, r, c); > -} > - > static inline void tcg_out_addsub2(TCGContext *s, int ext, TCGReg rl, > TCGReg rh, TCGReg al, TCGReg ah, > tcg_target_long bl, tcg_target_long bh, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 08/26] tcg-aarch64: Use symbolic names for branches

2014-03-24 Thread Claudio Fontana
_TYPE_PTR, TCG_AREG0, tcg_target_call_iarg_regs[0]); > -tcg_out_gotor(s, tcg_target_call_iarg_regs[1]); > +tcg_out_insn(s, 3207, BR, tcg_target_call_iarg_regs[1]); > > tb_ret_addr = s->code_ptr; > > @@ -1914,5 +1926,5 @@ static void tcg_target_qemu_prologue(TCGContext *s) > /* pop (FP, LR), restore SP to previous frame, return */ > tcg_out_pop_pair(s, TCG_REG_SP, > TCG_REG_FP, TCG_REG_LR, frame_size_callee_saved); > -tcg_out_ret(s); > +tcg_out_insn(s, 3207, RET, TCG_REG_LR); > } > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 09/26] tcg-aarch64: Create tcg_out_brcond

2014-03-24 Thread Claudio Fontana
atic inline void tcg_out_rev(TCGContext *s, TCGType ext, > @@ -1568,8 +1563,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, > a1 = (int32_t)a1; > /* FALLTHRU */ > case INDEX_op_brcond_i64: > -tcg_out_cmp(s, ext, a0, a1, const_args[1]); > -tcg_out_goto_label_cond(s, a2, args[3]); > +tcg_out_brcond(s, ext, a2, a0, a1, const_args[1], args[3]); > break; > > case INDEX_op_setcond_i32: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 10/26] tcg-aarch64: Use CBZ and CBNZ

2014-03-24 Thread Claudio Fontana
3202, B_C, c, offset); > +if (need_cmp) { > +tcg_out_insn(s, 3202, B_C, c, offset); > +} else if (c == TCG_COND_EQ) { > +tcg_out_insn(s, 3201, CBZ, ext, a, offset); > +} else { > +tcg_out_insn(s, 3201, CBNZ, ext, a, offset); > +} > } > > static inline void tcg_out_rev(TCGContext *s, TCGType ext, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi

2014-03-26 Thread Claudio Fontana
sp = (value >> 12) - ((intptr_t)s->code_ptr >> 12); > +if (disp == sextract64(disp, 0, 21)) { > +tcg_out_insn(s, 3406, ADRP, rd, disp); > +if (value & 0xfff) { > +tcg_out_insn(s, 3401, ADDI, type, rd, rd, value & 0xfff); > +

Re: [Qemu-devel] [PATCH 15/26] tcg-aarch64: Avoid add with zero in tlb load

2014-03-26 Thread Claudio Fontana
CG_REG_X2, > (tlb_offset & 0xfff) + (offsetof(CPUTLBEntry, addend)) - > (is_read ? offsetof(CPUTLBEntry, addr_read) >: offsetof(CPUTLBEntry, addr_write))); > + > /* Perform the address comparison. */ > tcg_out_cmp(s, (TARGET_LONG_BITS == 64), TCG_REG_X0, TCG_REG_X3, 0); > -*label_ptr = s->code_ptr; > + > /* If not equal, we jump to the slow path. */ > +*label_ptr = s->code_ptr; > tcg_out_goto_cond_noaddr(s, TCG_COND_NE); > } > > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 16/26] tcg-aarch64: Use tcg_out_call for qemu_ld/st

2014-03-26 Thread Claudio Fontana
qemu_st_helpers[size]); > -tcg_out_callr(s, TCG_REG_TMP); > +tcg_out_call(s, (intptr_t)qemu_st_helpers[size]); > tcg_out_goto(s, (intptr_t)lb->raddr); > } > > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 17/26] tcg-aarch64: Use ADR to pass the return address to the ld/st helpers

2014-03-26 Thread Claudio Fontana
out_movi(s, TCG_TYPE_I32, TCG_REG_X3, lb->mem_index); > -tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_X4, (intptr_t)lb->raddr); > +tcg_out_adr(s, TCG_REG_X4, (intptr_t)lb->raddr); > tcg_out_call(s, (intptr_t)qemu_st_helpers[size]); > tcg_out_goto(s, (intptr_t)lb->raddr); > } > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 18/26] tcg-aarch64: Use TCGMemOp in qemu_ld/st

2014-03-26 Thread Claudio Fontana
tcg_out_qemu_ld(s, args, MO_TEUL); > break; > case INDEX_op_qemu_ld32s: > -tcg_out_qemu_ld(s, args, 4 | 2); > -break; > -case INDEX_op_qemu_ld32: > -tcg_out_qemu_ld(s, args, 0 | 2); > +tcg_out_qemu_ld(s, args, MO_TESL); > break; > case INDEX_op_qemu_ld64: > -tcg_out_qemu_ld(s, args, 0 | 3); > +tcg_out_qemu_ld(s, args, MO_TEQ); > break; > case INDEX_op_qemu_st8: > -tcg_out_qemu_st(s, args, 0); > +tcg_out_qemu_st(s, args, MO_UB); > break; > case INDEX_op_qemu_st16: > -tcg_out_qemu_st(s, args, 1); > +tcg_out_qemu_st(s, args, MO_TEUW); > break; > case INDEX_op_qemu_st32: > -tcg_out_qemu_st(s, args, 2); > +tcg_out_qemu_st(s, args, MO_TEUL); > break; > case INDEX_op_qemu_st64: > -tcg_out_qemu_st(s, args, 3); > +tcg_out_qemu_st(s, args, MO_TEQ); > break; > > case INDEX_op_bswap32_i64: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 19/26] tcg-aarch64: Implement TCG_TARGET_HAS_new_ldst

2014-03-26 Thread Claudio Fontana
t; } }, > - > -{ INDEX_op_qemu_ld32, { "r", "l" } }, > -{ INDEX_op_qemu_ld64, { "r", "l" } }, > - > -{ INDEX_op_qemu_st8, { "l", "l" } }, > -{ INDEX_op_qemu_st16, { "l", "l" } }, > -{ INDEX_op_qemu_st32, { "l", "l" } }, > -{ INDEX_op_qemu_st64, { "l", "l" } }, > +{ INDEX_op_qemu_ld_i32, { "r", "l" } }, > +{ INDEX_op_qemu_ld_i64, { "r", "l" } }, > +{ INDEX_op_qemu_st_i32, { "l", "l" } }, > +{ INDEX_op_qemu_st_i64, { "l", "l" } }, > > { INDEX_op_bswap16_i32, { "r", "r" } }, > { INDEX_op_bswap32_i32, { "r", "r" } }, > diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h > index faccc36..adf0261 100644 > --- a/tcg/aarch64/tcg-target.h > +++ b/tcg/aarch64/tcg-target.h > @@ -98,7 +98,7 @@ typedef enum { > #define TCG_TARGET_HAS_muluh_i641 > #define TCG_TARGET_HAS_mulsh_i641 > > -#define TCG_TARGET_HAS_new_ldst 0 > +#define TCG_TARGET_HAS_new_ldst 1 > > static inline void flush_icache_range(uintptr_t start, uintptr_t stop) > { > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 20/26] tcg-aarch64: Introduce tcg_out_insn_3507

2014-03-26 Thread Claudio Fontana
TCGReg rd, TCGReg rm) > + TCGReg rd, TCGReg rn) > { > -/* using REV16 0x5ac00400 */ > -unsigned int base = ext ? 0xdac00400 : 0x5ac00400; > -tcg_out32(s, base | rm << 5 | rd); > +tcg_out_insn(s, 3507, REV16, ext, rd, rn); > } > > static inline void tcg_out_sxt(TCGContext *s, TCGType ext, TCGMemOp s_bits, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH 11/26] tcg-aarch64: Reuse FP and LR in translated code

2014-03-28 Thread Claudio Fontana
EG_X9, TCG_REG_X10, TCG_REG_X11, > +TCG_REG_X12, TCG_REG_X13, TCG_REG_X14, TCG_REG_X15, > +TCG_REG_X16, TCG_REG_X17, TCG_REG_X18, TCG_REG_X19, > +TCG_REG_X20, TCG_REG_X21, TCG_REG_X22, TCG_REG_X23, > +TCG_REG_X24, TCG_REG_X25, TCG_REG_X26, TCG_REG_X27, > +TCG_REG_X28, TCG_REG_X29, TCG_REG_X30, > + > +/* X31 is either the stack pointer or zero, depending on context. */ > +TCG_REG_SP = 31, > +TCG_REG_XZR = 31, > + > +/* Aliases. */ > +TCG_REG_FP = TCG_REG_X29, > +TCG_REG_LR = TCG_REG_X30, > +TCG_AREG0 = TCG_REG_X19, > } TCGReg; > > #define TCG_TARGET_NB_REGS 32 > @@ -92,10 +98,6 @@ typedef enum { > #define TCG_TARGET_HAS_muluh_i641 > #define TCG_TARGET_HAS_mulsh_i641 > > -enum { > -TCG_AREG0 = TCG_REG_X19, > -}; > - > #define TCG_TARGET_HAS_new_ldst 0 > > static inline void flush_icache_range(uintptr_t start, uintptr_t stop) > -- Claudio Fontana Server Virtualization Architect Huawei Technologies Duesseldorf GmbH Riesstraße 25 - 80992 München office: +49 89 158834 4135 mobile: +49 15253060158

Re: [Qemu-devel] [PATCH v3 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-04-07 Thread Claudio Fontana
On 03.04.2014 21:56, Richard Henderson wrote: > Since the kernel doesn't pass any info on the reason for the fault, > disassemble the instruction to detect a store. > > Signed-off-by: Richard Henderson > --- > user-exec.c | 29 +++-- > 1 file changed, 23 insertions(+), 6

Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code

2014-04-07 Thread Claudio Fontana
On 03.04.2014 21:56, Richard Henderson wrote: > It's obviously call-clobbered, but is otherwise unused. > Repurpose it as the TCG temporary. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 34 -- > tcg/aarch64/tcg-target.h | 32

Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code

2014-04-07 Thread Claudio Fontana
On 07.04.2014 11:49, Peter Maydell wrote: > On 7 April 2014 09:03, Claudio Fontana wrote: >> On 03.04.2014 21:56, Richard Henderson wrote: >>> It's obviously call-clobbered, but is otherwise unused. >>> Repurpose it as the TCG temporary. > >> Giving on

Re: [Qemu-devel] [PATCH v3 24/26] tcg-aarch64: Replace aarch64_ldst_op_data with AArch64LdstType

2014-04-07 Thread Claudio Fontana
On 03.04.2014 21:56, Richard Henderson wrote: > The definition of op_type wasn't encoded for the proper shift for > the field, making the implementations confusing. > > Signed-off-by: Richard Henderson At the end of the day the magic values remain in the load/store instructions though. Can we f

Re: [Qemu-devel] [PATCH 27/26] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313

2014-04-08 Thread Claudio Fontana
a1, a2); > +tcg_out_ldst(s, I3312_LDRSHX, a0, a1, a2); > break; > case INDEX_op_ld_i32: > case INDEX_op_ld32u_i64: > -tcg_out_ldst(s, MO_32, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRW, a0, a1, a2); > break; > case INDEX_op_ld32s_i64: > -tcg_out_ldst(s, MO_32, LDST_LD_S_X, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRSWX, a0, a1, a2); > break; > case INDEX_op_ld_i64: > -tcg_out_ldst(s, MO_64, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRX, a0, a1, a2); > break; > > case INDEX_op_st8_i32: > case INDEX_op_st8_i64: > -tcg_out_ldst(s, MO_8, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRB, REG0(0), a1, a2); > break; > case INDEX_op_st16_i32: > case INDEX_op_st16_i64: > -tcg_out_ldst(s, MO_16, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRH, REG0(0), a1, a2); > break; > case INDEX_op_st_i32: > case INDEX_op_st32_i64: > -tcg_out_ldst(s, MO_32, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRW, REG0(0), a1, a2); > break; > case INDEX_op_st_i64: > -tcg_out_ldst(s, MO_64, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRX, REG0(0), a1, a2); > break; > > case INDEX_op_add_i32: > -- Claudio Fontana Server Virtualization Architect Huawei Technologies Duesseldorf GmbH Riesstraße 25 - 80992 München office: +49 89 158834 4135 mobile: +49 15253060158

Re: [Qemu-devel] [PATCH v3 21/26] tcg-aarch64: Introduce tcg_out_insn_3507

2014-04-09 Thread Claudio Fontana
On 03.04.2014 21:56, Richard Henderson wrote: > Cleaning up the implementation of REV and REV16 at the same time. > > Reviewed-by: Claudio Fontana > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 22 ++ > 1 file changed, 14 inser

Re: [Qemu-devel] [PATCH v3 13/26] tcg-aarch64: Implement tcg_register_jit

2014-04-11 Thread Claudio Fontana
/* DW_CFA_offset, x21, -64 */ > +0x80 + 20, 9, /* DW_CFA_offset, x20, -72 */ > +0x80 + 19, 10, /* DW_CFA_offset, x1p, -80 */ > +0x80 + 30, 11, /* DW_CFA_offset, lr, -88 */ > +0x80 + 29, 12, /* DW_CFA_offset, fp, -96 */ > +} > +}; > + > +void tcg_register_jit(void *buf, size_t buf_size) > +{ > +debug_frame.fde.func_start = (intptr_t)buf; > +debug_frame.fde.func_len = buf_size; > + > +tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); > +} > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 12/26] tcg-aarch64: Introduce tcg_out_insn_3314

2014-04-11 Thread Claudio Fontana
e_saved area */ > + /* Restore registers x19..x28. */ > for (r = TCG_REG_X19; r <= TCG_REG_X27; r += 2) { > -int idx = (r - TCG_REG_X19) / 2 + 1; > -tcg_out_load_pair(s, TCG_REG_SP, r, r + 1, idx); > +int ofs = (r - TCG_REG_X19 + 2) * 8; > +tcg_out_insn(s, 3314, LDP, r, r + 1, TCG_REG_SP, ofs, 1, 0); > } > > -/* pop (FP, LR), restore SP to previous frame, return */ > -tcg_out_pop_pair(s, TCG_REG_SP, > - TCG_REG_FP, TCG_REG_LR, frame_size_callee_saved); > +/* Pop (FP, LR), restore SP to previous frame. */ > +tcg_out_insn(s, 3314, LDP, TCG_REG_FP, TCG_REG_LR, > + TCG_REG_SP, frame_size_callee_saved, 0, 1); > tcg_out_insn(s, 3207, RET, TCG_REG_LR); > } > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code

2014-04-11 Thread Claudio Fontana
G_X2, TCG_REG_X3, > +TCG_REG_X4, TCG_REG_X5, TCG_REG_X6, TCG_REG_X7, > +TCG_REG_X8, TCG_REG_X9, TCG_REG_X10, TCG_REG_X11, > +TCG_REG_X12, TCG_REG_X13, TCG_REG_X14, TCG_REG_X15, > + TCG_REG_X16, TCG_REG_X17, TCG_REG_X18, TCG_REG_X19, > +TCG_REG_X20, TCG_REG_X21, TCG_REG_X22, TCG_REG_X23, > +TCG_REG_X24, TCG_REG_X25, TCG_REG_X26, TCG_REG_X27, > +TCG_REG_X28, TCG_REG_X29, TCG_REG_X30, > + > +/* X31 is either the stack pointer or zero, depending on context. */ > +TCG_REG_SP = 31, > +TCG_REG_XZR = 31, > + > +/* Aliases. */ > +TCG_REG_FP = TCG_REG_X29, > +TCG_REG_LR = TCG_REG_X30, > +TCG_AREG0 = TCG_REG_X19, > } TCGReg; > > #define TCG_TARGET_NB_REGS 32 > @@ -92,10 +98,6 @@ typedef enum { > #define TCG_TARGET_HAS_muluh_i641 > #define TCG_TARGET_HAS_mulsh_i641 > > -enum { > -TCG_AREG0 = TCG_REG_X19, > -}; > - > #define TCG_TARGET_HAS_new_ldst 0 > > static inline void flush_icache_range(uintptr_t start, uintptr_t stop) > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 26/26] tcg-aarch64: Use tcg_out_mov in preference to tcg_out_movr

2014-04-11 Thread Claudio Fontana
t; +tcg_out_mov(s, size == MO_64, TCG_REG_X2, lb->datalo_reg); > tcg_out_movi(s, TCG_TYPE_I32, TCG_REG_X3, lb->mem_index); > tcg_out_adr(s, TCG_REG_X4, (intptr_t)lb->raddr); > tcg_out_call(s, (intptr_t)qemu_st_helpers[opc]); > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 18/26] tcg-aarch64: Pass qemu_ld/st arguments directly

2014-04-11 Thread Claudio Fontana
O_TEUW); > +tcg_out_qemu_st(s, a0, a1, MO_TEUW, a2); > break; > case INDEX_op_qemu_st32: > -tcg_out_qemu_st(s, args, MO_TEUL); > +tcg_out_qemu_st(s, a0, a1, MO_TEUL, a2); > break; > case INDEX_op_qemu_st64: > -tcg_out_qemu_st(s, args, MO_TEQ); > +tcg_out_qemu_st(s, a0, a1, MO_TEQ, a2); > break; > > case INDEX_op_bswap32_i64: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 22/26] tcg-aarch64: Merge aarch64_ldst_get_data/type into tcg_out_op

2014-04-11 Thread Claudio Fontana
p_st16_i32: > case INDEX_op_st16_i64: > +tcg_out_ldst(s, LDST_16, LDST_ST, REG0(0), a1, a2); > +break; > + case INDEX_op_st_i32: > case INDEX_op_st32_i64: > -tcg_out_ldst(s, aarch64_ldst_get_data(opc), > aarch64_ldst_get_type(opc), > - REG0(0), a1, a2); > +tcg_out_ldst(s, LDST_32, LDST_ST, REG0(0), a1, a2); > +break; > +case INDEX_op_st_i64: > +tcg_out_ldst(s, LDST_64, LDST_ST, REG0(0), a1, a2); > break; > > case INDEX_op_add_i32: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 24/26] tcg-aarch64: Replace aarch64_ldst_op_data with AArch64LdstType

2014-04-11 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 07.04.2014 16:31, Richard Henderson wrote: > On 04/07/2014 04:45 AM, Claudio Fontana wrote: >> On 03.04.2014 21:56, Richard Henderson wrote: >>> The definition of op_type wasn't encoded for the proper shift for >>> the field, maki

Re: [Qemu-devel] [PATCH v3 20/26] tcg-aarch64: Support stores of zero

2014-04-11 Thread Claudio Fontana
{ INDEX_op_st8_i64, { "rZ", "r" } }, > +{ INDEX_op_st16_i64, { "rZ", "r" } }, > +{ INDEX_op_st32_i64, { "rZ", "r" } }, > +{ INDEX_op_st_i64, { "rZ", "r" } }, > > { INDEX_op_add_i32, { "r", "r", "rwA" } }, > { INDEX_op_add_i64, { "r", "r", "rA" } }, > @@ -1753,8 +1756,8 @@ static const TCGTargetOpDef aarch64_op_defs[] = { > > { INDEX_op_qemu_ld_i32, { "r", "l" } }, > { INDEX_op_qemu_ld_i64, { "r", "l" } }, > -{ INDEX_op_qemu_st_i32, { "l", "l" } }, > -{ INDEX_op_qemu_st_i64, { "l", "l" } }, > +{ INDEX_op_qemu_st_i32, { "lZ", "l" } }, > +{ INDEX_op_qemu_st_i64, { "lZ", "l" } }, > > { INDEX_op_bswap16_i32, { "r", "r" } }, > { INDEX_op_bswap32_i32, { "r", "r" } }, > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 25/26] tcg-aarch64: Prefer unsigned offsets before signed offsets for ldst

2014-04-11 Thread Claudio Fontana
gt; } > } > > +if (offset >= -256 && offset < 256) { > +tcg_out_ldst_9(s, size, type, rd, rn, offset); > +return; > +} > + > /* Worst-case scenario, move offset to temp register, use reg offset. */ > tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_TMP, offset); > tcg_out_ldst_r(s, size, type, rd, rn, TCG_REG_TMP); > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 21/26] tcg-aarch64: Introduce tcg_out_insn_3507

2014-04-11 Thread Claudio Fontana
Just to remember that there is an issue with this, as the previous reviewed-by tag by me might mislead: Nacked-by: Claudio Fontana On 03.04.2014 21:56, Richard Henderson wrote: > Cleaning up the implementation of REV and REV16 at the same time. > > Reviewed-by: Claudio Fontana >

Re: [Qemu-devel] [PATCH 27/26] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313

2014-04-11 Thread Claudio Fontana
0, a1, a2); > break; > case INDEX_op_ld_i32: > case INDEX_op_ld32u_i64: > -tcg_out_ldst(s, MO_32, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRW, a0, a1, a2); > break; > case INDEX_op_ld32s_i64: > -tcg_out_ldst(s, MO_32, LDST_LD_S_X, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRSWX, a0, a1, a2); > break; > case INDEX_op_ld_i64: > -tcg_out_ldst(s, MO_64, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRX, a0, a1, a2); > break; > > case INDEX_op_st8_i32: > case INDEX_op_st8_i64: > -tcg_out_ldst(s, MO_8, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRB, REG0(0), a1, a2); > break; > case INDEX_op_st16_i32: > case INDEX_op_st16_i64: > -tcg_out_ldst(s, MO_16, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRH, REG0(0), a1, a2); > break; > case INDEX_op_st_i32: > case INDEX_op_st32_i64: > -tcg_out_ldst(s, MO_32, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRW, REG0(0), a1, a2); > break; > case INDEX_op_st_i64: > -tcg_out_ldst(s, MO_64, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, I3312_STRX, REG0(0), a1, a2); > break; > > case INDEX_op_add_i32: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 23/26] tcg-aarch64: Replace aarch64_ldst_op_data with TCGMemOp

2014-04-11 Thread Claudio Fontana
ut_ldst(s, LDST_32, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, MO_32, LDST_LD, a0, a1, a2); > break; > case INDEX_op_ld32s_i64: > - tcg_out_ldst(s, LDST_32, LDST_LD_S_X, a0, a1, a2); > +tcg_out_ldst(s, MO_32, LDST_LD_S_X, a0, a1, a2); > break; > case INDEX_op_ld_i64: > -tcg_out_ldst(s, LDST_64, LDST_LD, a0, a1, a2); > +tcg_out_ldst(s, MO_64, LDST_LD, a0, a1, a2); > break; > > case INDEX_op_st8_i32: > case INDEX_op_st8_i64: > -tcg_out_ldst(s, LDST_8, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, MO_8, LDST_ST, REG0(0), a1, a2); > break; > case INDEX_op_st16_i32: > case INDEX_op_st16_i64: > -tcg_out_ldst(s, LDST_16, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, MO_16, LDST_ST, REG0(0), a1, a2); > break; > case INDEX_op_st_i32: > case INDEX_op_st32_i64: > -tcg_out_ldst(s, LDST_32, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, MO_32, LDST_ST, REG0(0), a1, a2); > break; > case INDEX_op_st_i64: > -tcg_out_ldst(s, LDST_64, LDST_ST, REG0(0), a1, a2); > +tcg_out_ldst(s, MO_64, LDST_ST, REG0(0), a1, a2); > break; > > case INDEX_op_add_i32: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v3 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-04-14 Thread Claudio Fontana
On 07.04.2014 18:33, Richard Henderson wrote: > On 04/07/2014 12:58 AM, Claudio Fontana wrote: >>> +|| (insn & 0x3bc0) == 0x2840 /* C3.3.7 */ >> >> I think the Load (L) bit should be 0 here so >> >> == 0x2800 > > Oop

Re: [Qemu-devel] [PATCH v4 21/25] tcg-aarch64: Introduce tcg_out_insn_3507

2014-04-14 Thread Claudio Fontana
1,16 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, > tcg_out_qemu_st(s, REG0(0), a1, a2, args[3]); > break; > > -case INDEX_op_bswap32_i64: > -/* Despite the _i64, this is a 32-bit bswap. */ > -ext = 0; > - /* FALLTHRU */ > case INDEX_op_bswap64_i64: > +tcg_out_rev64(s, a0, a1); > +break; > +case INDEX_op_bswap32_i64: > case INDEX_op_bswap32_i32: > -tcg_out_rev(s, ext, a0, a1); > +tcg_out_rev32(s, a0, a1); > break; > case INDEX_op_bswap16_i64: > case INDEX_op_bswap16_i32: > -tcg_out_rev16(s, TCG_TYPE_I32, a0, a1); > +tcg_out_rev16(s, a0, a1); > break; > > case INDEX_op_ext8s_i64: > Reviewed-by: Claudio Fontana

Re: [Qemu-devel] [PATCH v4 23/25] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313

2014-04-14 Thread Claudio Fontana
t; +tcg_out_ldst(s, I3312_LDRH, a0, a1, a2); > break; > case INDEX_op_ld16s_i32: > -tcg_out_ldst(s, LDST_16, LDST_LD_S_W, a0, a1, a2); > +tcg_out_ldst(s, I3312_LDRSHW, a0, a1, a2); > break; > case INDEX_op_ld16s_i64: > - tc

Re: [Qemu-devel] [PATCH 10/10] target-arm: A64: Add SIMD scalar copy instructions

2014-01-15 Thread Claudio Fontana
m4 != 0) { > +unallocated_encoding(s); add a return here. > +} > + > +/* DUP (element, scalar) */ > +handle_simd_dupes(s, rd, rn, imm5); > } > > /* C3.6.8 AdvSIMD scalar pairwise > Ciao, Claudio -- Claudio Fontana Server Virtualization Architect Huawei Technologies Duesseldorf GmbH Riesstraße 25 - 80992 München office: +49 89 158834 4135 mobile: +49 15253060158

Re: [Qemu-devel] QEMU aarch64 TCG target - testing question about x86-64

2013-05-06 Thread Claudio Fontana
On 14.03.2013 17:16, Peter Maydell wrote: > On 14 March 2013 15:57, Claudio Fontana wrote: >> I am currently working on an aarch64 tcg target implementation, >> based on the available gdb patches contributed by ARM and the results >> of the linaro toolchain. > > Do

[Qemu-devel] [PATCH 0/3] ARM aarch64 TCG target

2013-05-13 Thread Claudio Fontana
linux test image, all from qemu-devel testing page. Also tested on x86-64/linux built with buildroot, and on arm v7/linux built with buildroot as well. Claudio Fontana (3): configure: permit compilation on arm aarch64 include/elf.h: add aarch64 ELF machine and relocs tcg/aarch64: implement new

[Qemu-devel] [PATCH 2/3] include/elf.h: add aarch64 ELF machine and relocs

2013-05-13 Thread Claudio Fontana
we will use the 26bit relative relocations in the aarch64 tcg target. Signed-off-by: Claudio Fontana --- include/elf.h | 128 ++ 1 file changed, 128 insertions(+) diff --git a/include/elf.h b/include/elf.h index a21ea53..43f6c9b 100644

[Qemu-devel] [PATCH 3/3] tcg/aarch64: implement new TCG target for aarch64

2013-05-13 Thread Claudio Fontana
add preliminary support for TCG target aarch64. Signed-off-by: Claudio Fontana --- include/exec/exec-all.h |5 +- tcg/aarch64/tcg-target.c | 1084 ++ tcg/aarch64/tcg-target.h | 106 + 3 files changed, 1194 insertions(+), 1 deletion

[Qemu-devel] [PATCH 1/3] configure: permit compilation on arm aarch64

2013-05-13 Thread Claudio Fontana
support compiling on aarch64. Signed-off-by: Claudio Fontana --- configure | 8 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 9439f1c..9cc398c 100755 --- a/configure +++ b/configure @@ -384,6 +384,8 @@ elif check_define __s390__ ; then fi elif

Re: [Qemu-devel] [PATCH 1/3] configure: permit compilation on arm aarch64

2013-05-14 Thread Claudio Fontana
On 13.05.2013 20:29, Peter Maydell wrote: > On 13 May 2013 14:28, Claudio Fontana wrote: >> >> support compiling on aarch64. >> >> Signed-off-by: Claudio Fontana > > This looks good, but it should be the last patch in the series, > so we don't allow

Re: [Qemu-devel] [PATCH 2/3] include/elf.h: add aarch64 ELF machine and relocs

2013-05-14 Thread Claudio Fontana
On 13.05.2013 20:34, Peter Maydell wrote: > On 13 May 2013 14:31, Claudio Fontana wrote: >> >> we will use the 26bit relative relocations in the aarch64 tcg target. > > This patch looks OK, but can I ask you to just neaten up > the #defines by making the column of value

Re: [Qemu-devel] [PATCH 3/3] tcg/aarch64: implement new TCG target for aarch64

2013-05-14 Thread Claudio Fontana
On 13.05.2013 20:28, Peter Maydell wrote: > On 13 May 2013 14:33, Claudio Fontana wrote: >> >> add preliminary support for TCG target aarch64. > > Thanks for this patch. Some comments below. > >> Signed-off-by: Claudio Fontana >> --- >> include/exec

Re: [Qemu-devel] [PATCH 3/3] tcg/aarch64: implement new TCG target for aarch64

2013-05-14 Thread Claudio Fontana
On 13.05.2013 21:49, Richard Henderson wrote: > On 05/13/2013 06:33 AM, Claudio Fontana wrote: >> +enum aarch64_cond_code { >> +COND_EQ = 0x0, >> +COND_NE = 0x1, >> +COND_CS = 0x2, /* Unsigned greater or equal */ >> +COND_HS = 0x2, /* ALIAS gr

Re: [Qemu-devel] [PATCH 3/3] tcg/aarch64: implement new TCG target for aarch64

2013-05-16 Thread Claudio Fontana
On 14.05.2013 17:19, Richard Henderson wrote: > On 05/14/2013 05:25 AM, Peter Maydell wrote: >>> Yes, I agree. I could not find an image which triggered that code path for register rotation amounts. >> Try PPC : rlwmn will generate a rotl (as will other insns). >> > > rlwmn will only generate

[Qemu-devel] [PATCH 0/4] ARM aarch64 TCG target VERSION 2

2013-05-23 Thread Claudio Fontana
regarding missing braces which are actually there. I suspect it is because of a comment. checkpatch also complains about the labeled statements in the switch, which I think are in fact good for readability. Claudio Fontana (4): include/elf.h: add aarch64 ELF machine and relocs tcg/aarch64

[Qemu-devel] [PATCH 1/4] include/elf.h: add aarch64 ELF machine and relocs

2013-05-23 Thread Claudio Fontana
we will use the 26bit relative relocs in the aarch64 tcg target. Signed-off-by: Claudio Fontana --- include/elf.h | 129 ++ 1 file changed, 129 insertions(+) diff --git a/include/elf.h b/include/elf.h index a21ea53..cf0d3e2 100644 --- a

[Qemu-devel] [PATCH 3/4] configure: permit compilation on arm aarch64

2013-05-23 Thread Claudio Fontana
support compiling on aarch64. Signed-off-by: Claudio Fontana --- configure | 8 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 9439f1c..9cc398c 100755 --- a/configure +++ b/configure @@ -384,6 +384,8 @@ elif check_define __s390__ ; then fi elif

[Qemu-devel] [PATCH 4/4] tcg/aarch64: more ops in preparation of tlb lookup

2013-05-23 Thread Claudio Fontana
add SUBS to the arithmetic instructions and add a shift parameter to all arithmetic instructions, so we can make use of shifted registers. Signed-off-by: Claudio Fontana --- tcg/aarch64/tcg-target.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions

[Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-23 Thread Claudio Fontana
add preliminary support for TCG target aarch64. Signed-off-by: Claudio Fontana --- include/exec/exec-all.h |5 +- tcg/aarch64/tcg-target.c | 1185 ++ tcg/aarch64/tcg-target.h | 99 translate-all.c |2 + 4 files changed, 1290

Re: [Qemu-devel] [PATCH 0/4] ARM aarch64 TCG target VERSION 2

2013-05-23 Thread Claudio Fontana
On 23.05.2013 15:03, Peter Maydell wrote: > On 23 May 2013 13:53, Andreas Färber wrote: >> Am 23.05.2013 14:50, schrieb Peter Maydell: >>> I'm happy for us to wait until an actual big-endian system >>> running Linux appears before we worry about it. > >> I was worried about Big Endian QEMU target

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Claudio Fontana
On 23.05.2013 18:39, Peter Maydell wrote: > On 23 May 2013 09:18, Claudio Fontana wrote: >> >> add preliminary support for TCG target aarch64. > > Richard's handling the technical bits of the review, so > just some minor style nits here. > > I tested this on t

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Claudio Fontana
On 23.05.2013 18:29, Richard Henderson wrote: > On 05/23/2013 01:18 AM, Claudio Fontana wrote: >> +static inline void patch_reloc(uint8_t *code_ptr, int type, >> + tcg_target_long value, tcg_target_long >> addend) >> +{ >>

[Qemu-devel] AArch64 register SP value always appearing as zero in "info registers" (kvm control)

2014-02-20 Thread Claudio Fontana
Hello, I am running kvm controlled qemu using mach virt, and I have this glitch where the SP value in "info registers" always appears as zero to me: (qemu) info registers PC=400b0044 SP= X00=40324000 X01=40331000 X02=400b X03=

[Qemu-devel] Fwd: AArch64 register SP value always appearing as zero in "info registers" (kvm control)

2014-02-21 Thread Claudio Fontana
;info registers" (kvm control) To: Claudio Fontana On 20 February 2014 15:13, Claudio Fontana wrote: > I got it to "work for me" by replacing AARCH64_CORE_REG(regs.sp) > with AARCH64_CORE_REG(sp_el1), since I am at EL1. > > I read in kvm_arch_put_registers:

Re: [Qemu-devel] [PATCH] tcg/aarch64: refactoring, remove inline magic insn numbers

2014-02-28 Thread Claudio Fontana
19:17, Claudio Fontana wrote: > From: Claudio Fontana > > this is general polishing for tcg/aarch64, removing the inline magic > insn numbers, and putting up enums for intruction classes and subclasses > in their stead. > > Signed-off-by: Claudio Fontana > Tested-by: Claudio

[Qemu-devel] kvm control qemu-system-aarch64 state

2014-02-04 Thread Claudio Fontana
Hello Peter, I just wanted to ask what is the current state of kvm control for qemu-system-aarch64. I tried latest mainline but I think it's not all there yet (it complains about missing cpu when I use -M virt and -cpu host, so I suspect some of VOS patches are still missing). Is your aarch64-kvm

Re: [Qemu-devel] kvm control qemu-system-aarch64 state

2014-02-04 Thread Claudio Fontana
Hello Peter, thank you for your answer, On 4 February 2014 16:39, Peter Maydell wrote: > > On 4 February 2014 15:36, Claudio Fontana wrote: > > I just wanted to ask what is the current state of kvm control for > > qemu-system-aarch64. > > I tried latest mainline but I

Re: [Qemu-devel] kvm control qemu-system-aarch64 state

2014-02-05 Thread Claudio Fontana
On 4 February 2014 20:40, Christoffer Dall wrote: > On Tue, Feb 04, 2014 at 04:52:08PM +, Peter Maydell wrote: >> On 4 February 2014 16:37, Claudio Fontana wrote: >> > On 4 February 2014 16:39, Peter Maydell wrote: >> >> On 4 February 2014 15:36, Claudio

[Qemu-devel] [PATCH] tcg/aarch64: refactoring, remove inline magic insn numbers

2014-02-07 Thread Claudio Fontana
From: Claudio Fontana this is general polishing for tcg/aarch64, removing the inline magic insn numbers, and putting up enums for intruction classes and subclasses in their stead. Signed-off-by: Claudio Fontana Tested-by: Claudio Fontana --- tcg/aarch64/tcg-target.c | 528

Re: [Qemu-devel] [PATCH v3 7/8] target-arm: A64: add support for 3 src data proc insns

2013-12-16 Thread Claudio Fontana
Hello Peter, On 13.12.2013 20:18, Peter Maydell wrote: > From: Alexander Graf > > This patch adds emulation for the "Data-processing (3 source)" > family of instructions, namely MADD, MSUB, SMADDL, SMSUBL, SMULH, > UMADDL, UMSUBL, UMULH. > > Signed-off-by: Alexander Graf > Signed-off-by: Alex

[Qemu-devel] [RFC] target-arm: provide skeleton for a64 insn decoding

2013-11-11 Thread Claudio Fontana
provide a skeleton for a64 instruction decoding in translate-a64.c, by dividing instructions into the classes defined by the ARM Architecture Reference Manual(DDI0487A_a) C3 Signed-off-by: Claudio Fontana --- The following patch has been started during Linaro Connect by me and Alex Bennee. The

[Qemu-devel] [RFC v2] target-arm: provide skeleton for a64 insn decoding

2013-11-12 Thread Claudio Fontana
provide a skeleton for a64 instruction decoding in translate-a64.c, by dividing instructions into the classes defined by the ARM Architecture Reference Manual(DDI0487A_a) C3 Signed-off-by: Claudio Fontana Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée --- target-arm/translate-a64.c | 368

Re: [Qemu-devel] [PATCH 14/60] AArch64: Add orr instruction emulation

2013-11-18 Thread Claudio Fontana
Hello, On 09/27/2013 08:25 PM, Richard Henderson wrote: > On 09/26/2013 05:48 PM, Alexander Graf wrote: >> This patch adds emulation support for the orr instruction. >> >> Signed-off-by: Alexander Graf >> --- >> target-arm/helper-a64.c| 28 +++ >> target-arm/helper-a64.h| 1 +

Re: [Qemu-devel] [PATCH 14/60] AArch64: Add orr instruction emulation

2013-11-18 Thread Claudio Fontana
On 11/18/2013 02:15 PM, Peter Maydell wrote: > On 18 November 2013 13:12, Michael Matz wrote: >> Hi, >> >> On Mon, 18 Nov 2013, Claudio Fontana wrote: >> >>>>> +case 3: >>>>> +tcg_gen_rotr_i64(r, cpu_reg(reg), tcg_shift); &

Re: [Qemu-devel] [PATCH 14/60] AArch64: Add orr instruction emulation

2013-11-18 Thread Claudio Fontana
Btw, in the first patch: On 11/18/2013 02:12 PM, Michael Matz wrote: > > From df54486da31d6329696effa61096eda5ab85395a Mon Sep 17 00:00:00 2001 > From: Michael Matz > Date: Sun, 24 Mar 2013 02:52:42 +0100 > Subject: [PATCH] Fix 32bit rotates. > > The 32bit shifts generally weren't careful with

  1   2   3   4   5   6   7   8   9   10   >