Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-13 Thread Paolo Bonzini
On 02/11/2012 03:12 PM, Andreas Färber wrote: Yes and no. They can have any target-specific pointer they want, just as before. But no global first_cpu / cpu_single_env pointer - that's replaced by CPU pointers, through which members of derived classes can be accessed (which did not work for CPUSt

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.02.2012 15:24, schrieb Jan Kiszka: > On 2012-02-11 15:12, Andreas Färber wrote: >> Am 11.02.2012 15:02, schrieb Jan Kiszka: >>> On 2012-02-11 14:59, Andreas Färber wrote: Am 11.02.2012 14:35, schrieb Jan Kiszka: > On 2012-02-11 14:21, An

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 15:12, Andreas Färber wrote: > Am 11.02.2012 15:02, schrieb Jan Kiszka: >> On 2012-02-11 14:59, Andreas Färber wrote: >>> Am 11.02.2012 14:35, schrieb Jan Kiszka: On 2012-02-11 14:21, Andreas Färber wrote: > CPU base class v3: http://patchwork.ozlabs.org/patch/139284/ > (

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Blue Swirl
On Sat, Feb 11, 2012 at 14:18, Jan Kiszka wrote: > On 2012-02-11 15:11, Blue Swirl wrote: >> On Sat, Feb 11, 2012 at 14:00, Jan Kiszka wrote: >>> On 2012-02-11 14:54, Blue Swirl wrote: On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: > On 2012-02-11 12:49, Andreas Färber wrote: >> A

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 15:11, Blue Swirl wrote: > On Sat, Feb 11, 2012 at 14:00, Jan Kiszka wrote: >> On 2012-02-11 14:54, Blue Swirl wrote: >>> On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: On 2012-02-11 12:49, Andreas Färber wrote: > Am 11.02.2012 12:25, schrieb Blue Swirl: >> I think us

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.02.2012 15:02, schrieb Jan Kiszka: > On 2012-02-11 14:59, Andreas Färber wrote: >> Am 11.02.2012 14:35, schrieb Jan Kiszka: >>> On 2012-02-11 14:21, Andreas Färber wrote: CPU base class v3: http://patchwork.ozlabs.org/patch/139284/ (v4

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Blue Swirl
On Sat, Feb 11, 2012 at 14:00, Jan Kiszka wrote: > On 2012-02-11 14:54, Blue Swirl wrote: >> On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: >>> On 2012-02-11 12:49, Andreas Färber wrote: Am 11.02.2012 12:25, schrieb Blue Swirl: > I think using cpu_single_env is an indication of a probl

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 14:59, Andreas Färber wrote: > Am 11.02.2012 14:35, schrieb Jan Kiszka: >> On 2012-02-11 14:21, Andreas Färber wrote: >>> CPU base class v3: http://patchwork.ozlabs.org/patch/139284/ (v4 >>> coming up) >>> >>> That doesn't prevent target-specific devices. Although Paolo does >>> want

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 14:54, Blue Swirl wrote: > On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: >> On 2012-02-11 12:49, Andreas Färber wrote: >>> Am 11.02.2012 12:25, schrieb Blue Swirl: I think using cpu_single_env is an indication of a problem, like poor code, layering violation or poor API

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.02.2012 14:35, schrieb Jan Kiszka: > On 2012-02-11 14:21, Andreas Färber wrote: >> CPU base class v3: http://patchwork.ozlabs.org/patch/139284/ (v4 >> coming up) >> >> That doesn't prevent target-specific devices. Although Paolo does >> want tha

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Blue Swirl
On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: > On 2012-02-11 12:49, Andreas Färber wrote: >> Am 11.02.2012 12:25, schrieb Blue Swirl: >>> I think using cpu_single_env is an indication of a problem, like poor >>> code, layering violation or poor API (vmport). What is your use case? >> >> I coul

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 14:21, Andreas Färber wrote: > Am 11.02.2012 14:07, schrieb Jan Kiszka: >> On 2012-02-11 14:06, Andreas Färber wrote: >>> Am 11.02.2012 13:43, schrieb Jan Kiszka: On 2012-02-11 12:49, Andreas Färber wrote: > Am 11.02.2012 12:25, schrieb Blue Swirl: >> I think using cpu_si

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.02.2012 14:07, schrieb Jan Kiszka: > On 2012-02-11 14:06, Andreas Färber wrote: >> Am 11.02.2012 13:43, schrieb Jan Kiszka: >>> On 2012-02-11 12:49, Andreas Färber wrote: Am 11.02.2012 12:25, schrieb Blue Swirl: > I think using cpu_singl

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 14:06, Andreas Färber wrote: > Am 11.02.2012 13:43, schrieb Jan Kiszka: >> On 2012-02-11 12:49, Andreas Färber wrote: >>> Am 11.02.2012 12:25, schrieb Blue Swirl: I think using cpu_single_env is an indication of a problem, like poor code, layering violation or poor API (vmpo

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.02.2012 13:43, schrieb Jan Kiszka: > On 2012-02-11 12:49, Andreas Färber wrote: >> Am 11.02.2012 12:25, schrieb Blue Swirl: >>> I think using cpu_single_env is an indication of a problem, >>> like poor code, layering violation or poor API (vmport

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 12:49, Andreas Färber wrote: > Am 11.02.2012 12:25, schrieb Blue Swirl: >> I think using cpu_single_env is an indication of a problem, like poor >> code, layering violation or poor API (vmport). What is your use case? > > I couldn't spot any in this series. Jan, note that any new use

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Andreas Färber
Am 11.02.2012 12:25, schrieb Blue Swirl: > I think using cpu_single_env is an indication of a problem, like poor > code, layering violation or poor API (vmport). What is your use case? I couldn't spot any in this series. Jan, note that any new use of env or cpu_single_env will need to be redone wh

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Blue Swirl
On Fri, Feb 10, 2012 at 18:31, Jan Kiszka wrote: > As we have thread-local cpu_single_env now and KVM uses exactly one > thread per VCPU, we can drop the cpu_single_env updates from the loop > and initialize this variable only once during setup. I don't think this is correct. Maybe you missed the