Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2013 at 05:37:54PM +0200, Paolo Bonzini wrote: Il 28/06/2013 17:35, Ed Maste ha scritto: On 28 June 2013 11:11, Paolo Bonzini pbonz...@redhat.com wrote: And of course if bsd-user supported 1:1 mapping between guest and host threads on FreeBSD, cpu_single_env would have to be

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Michael Tokarev
24.06.2013 23:21, Ed Maste wrote: Signed-off-by: Ed Maste ema...@freebsd.org --- I have had this in a local tree for some time, and it is needed by the BSD-user work that is now being proposed. So I'm not applying this to -trivial, because it caused quite some discussion. If nevertheless

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Ed Maste
On 28 June 2013 06:34, Michael Tokarev m...@tls.msk.ru wrote: 24.06.2013 23:21, Ed Maste wrote: Signed-off-by: Ed Maste ema...@freebsd.org --- I have had this in a local tree for some time, and it is needed by the BSD-user work that is now being proposed. So I'm not applying this to

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Paolo Bonzini
Il 28/06/2013 14:54, Ed Maste ha scritto: On 28 June 2013 06:34, Michael Tokarev m...@tls.msk.ru wrote: 24.06.2013 23:21, Ed Maste wrote: Signed-off-by: Ed Maste ema...@freebsd.org --- I have had this in a local tree for some time, and it is needed by the BSD-user work that is now being

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Peter Maydell
On 28 June 2013 14:03, Paolo Bonzini pbonz...@redhat.com wrote: Il 28/06/2013 14:54, Ed Maste ha scritto: An objection seemed to be that it is not really needed yet, but as pointed out by Peter this isn't really the case. This patch brings us (FreeBSD) in line with per-thread data semantics

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Ed Maste
On 28 June 2013 09:05, Peter Maydell peter.mayd...@linaro.org wrote: On 28 June 2013 14:03, Paolo Bonzini pbonz...@redhat.com wrote: Il 28/06/2013 14:54, Ed Maste ha scritto: An objection seemed to be that it is not really needed yet, but as pointed out by Peter this isn't really the case.

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Paolo Bonzini
Il 28/06/2013 15:05, Peter Maydell ha scritto: An objection seemed to be that it is not really needed yet, but as pointed out by Peter this isn't really the case. This patch brings us (FreeBSD) in line with per-thread data semantics on Linux and is used by qemu system emulation as well.

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Peter Maydell
On 28 June 2013 15:47, Paolo Bonzini pbonz...@redhat.com wrote: Il 28/06/2013 15:05, Peter Maydell ha scritto: I don't understand what you mean by no need for it. We are already multithreaded in system mode, so this is simply making FreeBSD do the same thing as Linux. cpu_single_env is

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Paolo Bonzini
Il 28/06/2013 16:55, Peter Maydell ha scritto: I don't understand what you mean by no need for it. We are already multithreaded in system mode, so this is simply making FreeBSD do the same thing as Linux. cpu_single_env is protected by the BQL unless you're running on KVM. That doesn't

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Ed Maste
On 28 June 2013 11:11, Paolo Bonzini pbonz...@redhat.com wrote: And of course if bsd-user supported 1:1 mapping between guest and host threads on FreeBSD, cpu_single_env would have to be thread-local. This is the case for the bsd-user work that Stacey posted at the beginning of the week and is

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-28 Thread Paolo Bonzini
Il 28/06/2013 17:35, Ed Maste ha scritto: On 28 June 2013 11:11, Paolo Bonzini pbonz...@redhat.com wrote: And of course if bsd-user supported 1:1 mapping between guest and host threads on FreeBSD, cpu_single_env would have to be thread-local. This is the case for the bsd-user work that