Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-14 Thread Alex Bennée
alvise rigo writes: > 1. LL(x) // x requires a flush > 2. query flush to all the n VCPUs > 3. exit from the CPU loop and wait until all the flushes are done > 4. enter the loop to re-execute LL(x). This time no flush is required > > Now, points

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-14 Thread alvise rigo
1. LL(x) // x requires a flush 2. query flush to all the n VCPUs 3. exit from the CPU loop and wait until all the flushes are done 4. enter the loop to re-execute LL(x). This time no flush is required Now, points 2. and 3. can be done either with n calls of

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-14 Thread Alex Bennée
alvise rigo writes: > On Fri, Jun 10, 2016 at 5:21 PM, Sergey Fedorov wrote: >> On 26/05/16 19:35, Alvise Rigo wrote: >>> Using tcg_exclusive_{lock,unlock}(), make the emulation of >>> LoadLink/StoreConditional thread safe. >>> >>> During an

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-14 Thread Sergey Fedorov
On 14/06/16 11:37, Alex Bennée wrote: > Alex Bennée writes: > >> Sergey Fedorov writes: >> >>> On 26/05/16 19:35, Alvise Rigo wrote: Using tcg_exclusive_{lock,unlock}(), make the emulation of LoadLink/StoreConditional thread safe.

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-14 Thread Alex Bennée
Alex Bennée writes: > Sergey Fedorov writes: > >> On 26/05/16 19:35, Alvise Rigo wrote: >>> Using tcg_exclusive_{lock,unlock}(), make the emulation of >>> LoadLink/StoreConditional thread safe. >>> >>> During an LL access, this lock protects the

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-11 Thread Sergey Fedorov
On 10/06/16 19:15, Alex Bennée wrote: > Sergey Fedorov writes: > >> On 26/05/16 19:35, Alvise Rigo wrote: >>> Using tcg_exclusive_{lock,unlock}(), make the emulation of >>> LoadLink/StoreConditional thread safe. >>> >>> During an LL access, this lock protects the load access

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread Alex Bennée
Sergey Fedorov writes: > On 26/05/16 19:35, Alvise Rigo wrote: >> Using tcg_exclusive_{lock,unlock}(), make the emulation of >> LoadLink/StoreConditional thread safe. >> >> During an LL access, this lock protects the load access itself, the >> update of the exclusive

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread alvise rigo
This would require to fill again the whole history which I find very unlikely. In any case, this has to be documented. Thank you, alvise On Fri, Jun 10, 2016 at 6:00 PM, Sergey Fedorov wrote: > On 10/06/16 18:53, alvise rigo wrote: >> On Fri, Jun 10, 2016 at 5:21 PM,

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread Sergey Fedorov
On 10/06/16 18:53, alvise rigo wrote: > On Fri, Jun 10, 2016 at 5:21 PM, Sergey Fedorov wrote: >> On 26/05/16 19:35, Alvise Rigo wrote: >>> Using tcg_exclusive_{lock,unlock}(), make the emulation of >>> LoadLink/StoreConditional thread safe. >>> >>> During an LL access, this

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread alvise rigo
On Fri, Jun 10, 2016 at 5:21 PM, Sergey Fedorov wrote: > On 26/05/16 19:35, Alvise Rigo wrote: >> Using tcg_exclusive_{lock,unlock}(), make the emulation of >> LoadLink/StoreConditional thread safe. >> >> During an LL access, this lock protects the load access itself, the >>

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread Sergey Fedorov
On 26/05/16 19:35, Alvise Rigo wrote: > Using tcg_exclusive_{lock,unlock}(), make the emulation of > LoadLink/StoreConditional thread safe. > > During an LL access, this lock protects the load access itself, the > update of the exclusive history and the update of the VCPU's protected > range. In

[Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-05-26 Thread Alvise Rigo
Using tcg_exclusive_{lock,unlock}(), make the emulation of LoadLink/StoreConditional thread safe. During an LL access, this lock protects the load access itself, the update of the exclusive history and the update of the VCPU's protected range. In a SC access, the lock protects the store access