* [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread
@ 2013-05-02 9:52 Andreas Färber
2013-05-02 10:14 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-05-02 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: jan.kiszka, Andreas Färber, peter.maydell
Due to a preceding while loop, no CPU would've been put into stopped
state. Reinitialize the variable.
This fixes commit d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to use
pause_all_vcpus from VCPU context) for non-KVM case.
While at it, change a 0 to false, amending commit
4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to
CPUState).
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
For 1.5 I'm going for the least invasive change here.
On qom-cpu-10 I'm preparing to replace each CPU loop with qemu_for_each_cpu().
cpus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index a2d92c7..c232265 100644
--- a/cpus.c
+++ b/cpus.c
@@ -974,9 +974,10 @@ void pause_all_vcpus(void)
if (qemu_in_vcpu_thread()) {
cpu_stop_current();
if (!kvm_enabled()) {
+ penv = first_cpu;
while (penv) {
CPUState *pcpu = ENV_GET_CPU(penv);
- pcpu->stop = 0;
+ pcpu->stop = false;
pcpu->stopped = true;
penv = penv->next_cpu;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread
2013-05-02 9:52 [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread Andreas Färber
@ 2013-05-02 10:14 ` Jan Kiszka
2013-05-02 11:47 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2013-05-02 10:14 UTC (permalink / raw)
To: Andreas Färber; +Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
On 2013-05-02 11:52, Andreas Färber wrote:
> Due to a preceding while loop, no CPU would've been put into stopped
> state. Reinitialize the variable.
> This fixes commit d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to use
> pause_all_vcpus from VCPU context) for non-KVM case.
>
> While at it, change a 0 to false, amending commit
> 4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to
> CPUState).
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> For 1.5 I'm going for the least invasive change here.
> On qom-cpu-10 I'm preparing to replace each CPU loop with qemu_for_each_cpu().
>
> cpus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/cpus.c b/cpus.c
> index a2d92c7..c232265 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -974,9 +974,10 @@ void pause_all_vcpus(void)
> if (qemu_in_vcpu_thread()) {
> cpu_stop_current();
> if (!kvm_enabled()) {
> + penv = first_cpu;
> while (penv) {
> CPUState *pcpu = ENV_GET_CPU(penv);
> - pcpu->stop = 0;
> + pcpu->stop = false;
> pcpu->stopped = true;
> penv = penv->next_cpu;
> }
>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread
2013-05-02 10:14 ` Jan Kiszka
@ 2013-05-02 11:47 ` Andreas Färber
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2013-05-02 11:47 UTC (permalink / raw)
To: Jan Kiszka; +Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
Am 02.05.2013 12:14, schrieb Jan Kiszka:
> On 2013-05-02 11:52, Andreas Färber wrote:
>> Due to a preceding while loop, no CPU would've been put into stopped
>> state. Reinitialize the variable.
>> This fixes commit d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to use
>> pause_all_vcpus from VCPU context) for non-KVM case.
>>
>> While at it, change a 0 to false, amending commit
>> 4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to
>> CPUState).
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>> For 1.5 I'm going for the least invasive change here.
>> On qom-cpu-10 I'm preparing to replace each CPU loop with qemu_for_each_cpu().
>>
>> cpus.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index a2d92c7..c232265 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -974,9 +974,10 @@ void pause_all_vcpus(void)
>> if (qemu_in_vcpu_thread()) {
>> cpu_stop_current();
>> if (!kvm_enabled()) {
>> + penv = first_cpu;
>> while (penv) {
>> CPUState *pcpu = ENV_GET_CPU(penv);
>> - pcpu->stop = 0;
>> + pcpu->stop = false;
>> pcpu->stopped = true;
>> penv = penv->next_cpu;
>> }
>>
>
> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks, applied to qom-cpu:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-02 11:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 9:52 [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread Andreas Färber
2013-05-02 10:14 ` Jan Kiszka
2013-05-02 11:47 ` Andreas Färber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).