Re: [Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-28 Thread Gleb Natapov
On Mon, Nov 28, 2011 at 03:16:01PM +0800, Liu ping fan wrote: > On Sun, Nov 27, 2011 at 6:50 PM, Gleb Natapov wrote: > > On Sun, Nov 27, 2011 at 12:36:55PM +0200, Avi Kivity wrote: > >> On 11/27/2011 04:42 AM, Liu Ping Fan wrote: > >> > From: Liu Ping Fan > >> > > >> > The vcpu can be safely rele

Re: [Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-27 Thread Liu ping fan
On Sun, Nov 27, 2011 at 6:50 PM, Gleb Natapov wrote: > On Sun, Nov 27, 2011 at 12:36:55PM +0200, Avi Kivity wrote: >> On 11/27/2011 04:42 AM, Liu Ping Fan wrote: >> > From: Liu Ping Fan >> > >> > The vcpu can be safely released when >> > --1.guest tells us that the vcpu is not needed any longer.

Re: [Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-27 Thread Gleb Natapov
On Sun, Nov 27, 2011 at 12:36:55PM +0200, Avi Kivity wrote: > On 11/27/2011 04:42 AM, Liu Ping Fan wrote: > > From: Liu Ping Fan > > > > The vcpu can be safely released when > > --1.guest tells us that the vcpu is not needed any longer. > > --2.vcpu hits the last instruction _halt_ > > > > If both

Re: [Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-27 Thread Avi Kivity
On 11/27/2011 04:42 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > The vcpu can be safely released when > --1.guest tells us that the vcpu is not needed any longer. > --2.vcpu hits the last instruction _halt_ > > If both of the conditions are satisfied, kvm exits to userspace > with the reason v

[Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-26 Thread Liu Ping Fan
From: Liu Ping Fan The vcpu can be safely released when --1.guest tells us that the vcpu is not needed any longer. --2.vcpu hits the last instruction _halt_ If both of the conditions are satisfied, kvm exits to userspace with the reason vcpu dead. So the user thread can exit safely. Signed-off-