Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Gleb Natapov
On Wed, Oct 30, 2013 at 05:10:37PM +0100, Paolo Bonzini wrote: > Il 30/10/2013 16:56, Alex Williamson ha scritto: > > On Wed, 2013-10-30 at 16:42 +0100, Paolo Bonzini wrote: > >> Il 30/10/2013 16:33, Gleb Natapov ha scritto: > Hmm, ok. In that case I can drop this patch and I think the rest j

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Paolo Bonzini
Il 30/10/2013 16:56, Alex Williamson ha scritto: > On Wed, 2013-10-30 at 16:42 +0100, Paolo Bonzini wrote: >> Il 30/10/2013 16:33, Gleb Natapov ha scritto: Hmm, ok. In that case I can drop this patch and I think the rest just boils down to userspace use of the device. I had been close()

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Alex Williamson
On Wed, 2013-10-30 at 16:42 +0100, Paolo Bonzini wrote: > Il 30/10/2013 16:33, Gleb Natapov ha scritto: > > > Hmm, ok. In that case I can drop this patch and I think the rest just > > > boils down to userspace use of the device. I had been close()'ing the > > > kvm device fd when all QEMU vfio de

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Gleb Natapov
On Wed, Oct 30, 2013 at 04:42:15PM +0100, Paolo Bonzini wrote: > Il 30/10/2013 16:33, Gleb Natapov ha scritto: > > > Hmm, ok. In that case I can drop this patch and I think the rest just > > > boils down to userspace use of the device. I had been close()'ing the > > > kvm device fd when all QEMU

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Paolo Bonzini
Il 30/10/2013 16:33, Gleb Natapov ha scritto: > > Hmm, ok. In that case I can drop this patch and I think the rest just > > boils down to userspace use of the device. I had been close()'ing the > > kvm device fd when all QEMU vfio devices are detached, but I can just as > > easily leave it open i

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Gleb Natapov
On Wed, Oct 30, 2013 at 08:30:22AM -0600, Alex Williamson wrote: > On Wed, 2013-10-30 at 12:40 +0200, Gleb Natapov wrote: > > On Tue, Oct 29, 2013 at 10:13:22AM -0600, Alex Williamson wrote: > > > The KVM device interface allocates a struct kvm_device and calls > > > kvm_device_ops.create on it fro

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Alex Williamson
On Wed, 2013-10-30 at 12:40 +0200, Gleb Natapov wrote: > On Tue, Oct 29, 2013 at 10:13:22AM -0600, Alex Williamson wrote: > > The KVM device interface allocates a struct kvm_device and calls > > kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. > > This returns a file descriptor to t

Re: [PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-30 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 10:13:22AM -0600, Alex Williamson wrote: > The KVM device interface allocates a struct kvm_device and calls > kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. > This returns a file descriptor to the user for them to set/get/check > further attributes. On clo

[PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-29 Thread Alex Williamson
The KVM device interface allocates a struct kvm_device and calls kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. This returns a file descriptor to the user for them to set/get/check further attributes. On closing the file descriptor, one would assume that kvm_device_ops.destroy is

[PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-01 Thread Alex Williamson
The KVM device interface allocates a struct kvm_device and calls kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. This returns a file descriptor to the user for them to set/get/check further attributes. On closing the file descriptor, one would assume that kvm_device_ops.destroy is