[PATCH V2] kvm: make vcpu life cycle separated from kvm instance

2011-12-08 Thread Liu Ping Fan
From: Liu Ping Fan 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. Signed-off-by: Liu Ping Fan --- arch/x86/kvm/i8254.c | 10 -- arch/x86

Re: [PATCH V2] kvm: make vcpu life cycle separated from kvm instance

2011-12-09 Thread Gleb Natapov
On Fri, Dec 09, 2011 at 01:23:18PM +0800, Liu Ping Fan wrote: > From: Liu Ping Fan > > 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. > Now refc