Re: [PATCH v4 1/6] kvm: add device control API

2013-04-26 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 11:55:27AM +0200, Alexander Graf wrote: > > On 26.04.2013, at 11:53, Gleb Natapov wrote: > > > On Thu, Apr 25, 2013 at 01:59:20PM -0500, Scott Wood wrote: > >> On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: > >>> On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote:

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-26 Thread Alexander Graf
On 26.04.2013, at 11:53, Gleb Natapov wrote: > On Thu, Apr 25, 2013 at 01:59:20PM -0500, Scott Wood wrote: >> On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: >>> On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: On 04/25/2013 05:47:39 AM, Alexander Graf wrote: > > On 25.04.

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-26 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 01:59:20PM -0500, Scott Wood wrote: > On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: > >On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: > >> On 04/25/2013 05:47:39 AM, Alexander Graf wrote: > >> > > >> >On 25.04.2013, at 11:43, Gleb Natapov wrote: > >> > > >> >>>

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Scott Wood
On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: > On 04/25/2013 05:47:39 AM, Alexander Graf wrote: > > > >On 25.04.2013, at 11:43, Gleb Natapov wrote: > > > >>> +void kvm_device_put(struct kvm_device *dev) > >>> +{ > >>> + if (atomic_

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: > On 04/25/2013 05:47:39 AM, Alexander Graf wrote: > > > >On 25.04.2013, at 11:43, Gleb Natapov wrote: > > > >>> +void kvm_device_put(struct kvm_device *dev) > >>> +{ > >>> + if (atomic_dec_and_test(&dev->users)) > >>> + dev->ops->

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Scott Wood
On 04/25/2013 05:47:39 AM, Alexander Graf wrote: On 25.04.2013, at 11:43, Gleb Natapov wrote: >> +void kvm_device_put(struct kvm_device *dev) >> +{ >> + if (atomic_dec_and_test(&dev->users)) >> + dev->ops->destroy(dev); >> +} >> + >> +static int kvm_device_release(struct inode

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 03:45:14PM +0200, Alexander Graf wrote: > >>> Please move struct definitions and KVM_CREATE_DEVICE_TEST define out > >>> from ioctl definition block. > >> > >> Let me change that in my tree... > >> > > So are you sending this via your tree and I should not apply it directl

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Alexander Graf
On 25.04.2013, at 14:07, Gleb Natapov wrote: > On Thu, Apr 25, 2013 at 12:47:39PM +0200, Alexander Graf wrote: >> >> On 25.04.2013, at 11:43, Gleb Natapov wrote: >> >>> On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: Currently, devices that are emulated inside KVM are configure

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 12:47:39PM +0200, Alexander Graf wrote: > > On 25.04.2013, at 11:43, Gleb Natapov wrote: > > > On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: > >> Currently, devices that are emulated inside KVM are configured in a > >> hardcoded manner based on an assumption

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Alexander Graf
On 25.04.2013, at 11:43, Gleb Natapov wrote: > On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: >> Currently, devices that are emulated inside KVM are configured in a >> hardcoded manner based on an assumption that any given architecture >> only has one way to do it. If there's any ne

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: > Currently, devices that are emulated inside KVM are configured in a > hardcoded manner based on an assumption that any given architecture > only has one way to do it. If there's any need to access device state, > it is done through infl

[PATCH v4 1/6] kvm: add device control API

2013-04-12 Thread Scott Wood
Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through inflexible one-purpose-only IOCTLs (e.g. KVM_GET/SET_LAPIC). Defining n