[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EDB4A0D.1000609@redhat.com>
Date: Sun, 04 Dec 2011 12:23:09 +0200
From: Avi Kivity <avi@...hat.com>
To: Liu Ping Fan <kernelfans@...il.com>
CC: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
aliguori@...ibm.com, gleb@...hat.com, jan.kiszka@....de
Subject: Re: [PATCH] kvm: make vcpu life cycle separated from kvm instance
On 12/02/2011 08:26 AM, Liu Ping Fan wrote:
> From: Liu Ping Fan <pingfank@...ux.vnet.ibm.com>
>
> Currently, vcpu can be destructed only when kvm instance destroyed.
> Change this to vcpu's destruction taken when its refcnt is zero,
> and then vcpu MUST and CAN be destroyed before kvm's destroy.
>
>
> @@ -315,9 +315,17 @@ static void pit_do_work(struct work_struct *work)
> * LVT0 to NMI delivery. Other PIC interrupts are just sent to
> * VCPU0, and only if its LVT0 is in EXTINT mode.
> */
> - if (kvm->arch.vapics_in_nmi_mode > 0)
> - kvm_for_each_vcpu(i, vcpu, kvm)
> + if (kvm->arch.vapics_in_nmi_mode > 0) {
> + rcu_read_lock();
> + kvm_for_each_vcpu(i, cnt, vcpu, kvm) {
> + vcpu = kvm_get_vcpu(kvm, i);
> + if (vcpu == NULL)
> + continue;
> + cnt++;
> kvm_apic_nmi_wd_deliver(vcpu);
> + }
> + rcu_read_unlock();
> + }
> }
> }
This pattern keeps repeating, please fold it into kvm_for_each_vcpu().
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists