[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU c
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU context |
Date: |
Sat, 11 Feb 2012 15:31:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-02-11 15:16, Blue Swirl wrote:
> On Fri, Feb 10, 2012 at 18:31, Jan Kiszka <address@hidden> wrote:
>> In order to perform critical manipulations on the VM state in the
>> context of a VCPU, specifically code patching, stopping and resuming of
>> all VCPUs may be necessary. resume_all_vcpus is already compatible, now
>> enable pause_all_vcpus for this use case by stopping the calling context
>> before starting to wait for the whole gang.
>>
>> CC: Paolo Bonzini <address@hidden>
>> Signed-off-by: Jan Kiszka <address@hidden>
>> ---
>> cpus.c | 12 ++++++++++++
>> 1 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index d0c8340..5adfc6b 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -870,6 +870,18 @@ void pause_all_vcpus(void)
>> penv = (CPUState *)penv->next_cpu;
>> }
>>
>> + if (!qemu_thread_is_self(&io_thread)) {
>> + cpu_stop_current();
>> + if (!kvm_enabled()) {
>> + while (penv) {
>> + penv->stop = 0;
>> + penv->stopped = 1;
>> + penv = (CPUState *)penv->next_cpu;
>
> The cast is useless, next_cpu is already CPUState *. I wonder why it
> is used in other cases too.
Indeed, weird. We can clean the others up separately.
Jan
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, (continued)
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Paolo Bonzini, 2012/02/13
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Blue Swirl, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Jan Kiszka, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Blue Swirl, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Jan Kiszka, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Blue Swirl, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once, Jan Kiszka, 2012/02/11
[Qemu-devel] [PATCH v2 6/8] kvmvapic: Simplify mp/up_set_tpr, Jan Kiszka, 2012/02/10
[Qemu-devel] [PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU context, Jan Kiszka, 2012/02/10
[Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/10
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Blue Swirl, 2012/02/11
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/13
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Blue Swirl, 2012/02/13
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Gleb Natapov, 2012/02/13
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/13
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Gleb Natapov, 2012/02/14
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/14
- Re: [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests, Gleb Natapov, 2012/02/14
[Qemu-devel] [PATCH v2 4/8] kvmvapic: Add option ROM, Jan Kiszka, 2012/02/10