Re: [Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-29 Thread Richard Henderson
On 04/29/2014 10:33 AM, Stefan Weil wrote: > I'm still investigating whether it's necessary to set tci_tb_ptr to 0 > (as you suggested). Up to now, the TCI code did never invalidate > tci_tb_ptr, but there was no obvious indication of problems caused by > this behaviour. Oh, I mis-read this bit be

Re: [Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-29 Thread Richard Henderson
On 04/29/2014 10:33 AM, Stefan Weil wrote: > I'm still investigating whether it's necessary to set tci_tb_ptr to 0 > (as you suggested). Up to now, the TCI code did never invalidate > tci_tb_ptr, but there was no obvious indication of problems caused by > this behaviour. It should be exactly 6 lin

Re: [Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-29 Thread Stefan Weil
Am 29.04.2014 17:20, schrieb Richard Henderson: > On 04/28/2014 10:57 PM, Stefan Weil wrote: >> -static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS]; >> +static inline void save_tb_ptr(void *tb_ptr) >> +{ >> +#ifdef CONFIG_SOFTMMU >> +tci_tb_ptr = (uintptr_t)tb_ptr; >> +#endif >> +} >> > > W

Re: [Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-29 Thread Richard Henderson
On 04/28/2014 10:57 PM, Stefan Weil wrote: > -static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS]; > +static inline void save_tb_ptr(void *tb_ptr) > +{ > +#ifdef CONFIG_SOFTMMU > +tci_tb_ptr = (uintptr_t)tb_ptr; > +#endif > +} > Wouldn't it be better to save this always? I'm a bit confused

[Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-28 Thread Stefan Weil
It is needed by the GETRA() macro which is called in helper functions, so it is sufficient to set it before calling any of these helper functions. In current QEMU, all targets use GETRA(). Therefore tci_tb_ptr is now needed unconditionally. Setting its value is time critical because it happens in