Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-09-08 Thread Paolo Bonzini
On 08/09/20 08:39, Philippe Mathieu-Daudé wrote: > Le mar. 8 sept. 2020 08:33, Paolo Bonzini > a écrit : > > On 07/09/20 22:35, Alexander Bulekov wrote: > >>> RFC because I believe the correct fix is to NOT use current_cpu > >>> out of cpus.c, at least use

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-09-07 Thread Philippe Mathieu-Daudé
Le mar. 8 sept. 2020 08:33, Paolo Bonzini a écrit : > On 07/09/20 22:35, Alexander Bulekov wrote: > >>> RFC because I believe the correct fix is to NOT use current_cpu > >>> out of cpus.c, at least use qemu_get_cpu(0) to get the first vCPU. > >> Yes, I agree -- I don't think this is the correct f

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-09-07 Thread Paolo Bonzini
On 07/09/20 22:35, Alexander Bulekov wrote: >>> RFC because I believe the correct fix is to NOT use current_cpu >>> out of cpus.c, at least use qemu_get_cpu(0) to get the first vCPU. >> Yes, I agree -- I don't think this is the correct fix. >> current_cpu is documented as "only valid inside cpu_exe

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-09-07 Thread Alexander Bulekov
On 200701 2135, Peter Maydell wrote: > On Wed, 1 Jul 2020 at 19:21, Philippe Mathieu-Daudé wrote: > > > > We can run I/O access with the 'i' or 'o' HMP commands in the > > monitor. These commands are expected to run on a vCPU. The > > monitor is not a vCPU thread. To avoid crashing, initialize > >

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-02 Thread Alex Bennée
Paolo Bonzini writes: > On 01/07/20 22:35, Peter Maydell wrote: >> For the monitor, that >> would be the current "default cpu" as set by the "cpu" >> command (cf monitor_set_cpu()). The bug here will be that >> somewhere along the line we are probably missing plumbing >> sufficient to pass down

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-02 Thread Paolo Bonzini
On 01/07/20 22:35, Peter Maydell wrote: > For the monitor, that > would be the current "default cpu" as set by the "cpu" > command (cf monitor_set_cpu()). The bug here will be that > somewhere along the line we are probably missing plumbing > sufficient to pass down "which CPU do we want". Yeah, t

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-02 Thread Philippe Mathieu-Daudé
On 7/1/20 10:35 PM, Peter Maydell wrote: > On Wed, 1 Jul 2020 at 19:21, Philippe Mathieu-Daudé wrote: >> >> We can run I/O access with the 'i' or 'o' HMP commands in the >> monitor. These commands are expected to run on a vCPU. The >> monitor is not a vCPU thread. To avoid crashing, initialize >>

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-01 Thread Peter Maydell
On Wed, 1 Jul 2020 at 19:21, Philippe Mathieu-Daudé wrote: > > We can run I/O access with the 'i' or 'o' HMP commands in the > monitor. These commands are expected to run on a vCPU. The > monitor is not a vCPU thread. To avoid crashing, initialize > the 'current_cpu' variable with the first vCPU c

Re: [RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-01 Thread Alexander Bulekov
On 200701 2021, Philippe Mathieu-Daudé wrote: > We can run I/O access with the 'i' or 'o' HMP commands in the > monitor. These commands are expected to run on a vCPU. The > monitor is not a vCPU thread. To avoid crashing, initialize > the 'current_cpu' variable with the first vCPU created. The > co

[RFC PATCH] cpus: Initialize current_cpu with the first vCPU created

2020-07-01 Thread Philippe Mathieu-Daudé
We can run I/O access with the 'i' or 'o' HMP commands in the monitor. These commands are expected to run on a vCPU. The monitor is not a vCPU thread. To avoid crashing, initialize the 'current_cpu' variable with the first vCPU created. The command executed on the monitor will end using it. This f