[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111213094728.GC12029@redhat.com>
Date: Tue, 13 Dec 2011 11:47:28 +0200
From: Gleb Natapov <gleb@...hat.com>
To: Liu ping fan <kernelfans@...il.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, avi@...hat.com,
aliguori@...ibm.com, jan.kiszka@....de
Subject: Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance
On Tue, Dec 13, 2011 at 05:29:50PM +0800, Liu ping fan wrote:
> On Mon, Dec 12, 2011 at 8:54 PM, Gleb Natapov <gleb@...hat.com> wrote:
> > On Mon, Dec 12, 2011 at 10:41:23AM +0800, 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.
> >>
> > Please drop all printks that you add. You do not use rcu_assign_pointer()
> > during vcpu creation and BTW the code there is incorrect now. It assumed
> > that online_vcpus is never decremented so it is OK to put newly created
> > vcpu into kvm->vcpus[kvm->online_vcpus], but now it is not longer true.
> > We even have BUG_ON() to catch that which I believe you can trigger with
> > this patch by creating 3 vcpus, removing second one and then adding one
> > more. Moving to rculist would solve this of course, and will simplify
> > code that iterates over all vcpus too.
> >
> OK, it seems unavoidable to use rculist now :-). Just one more question, is it
> useless for "case HV_X64_MSR_VP_INDEX" after adopting rculist?
>
Windows does not support cpu hot-unplug IIRC. Just return the index of
the vcpu in the vcpus list there.
--
Gleb.
--
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