Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-29 Thread Avi Kivity
On 07/26/2012 11:15 PM, Nicholas A. Bellinger wrote: >> > > Example..? If there is a better way to handle ioctl compat I'd > certainly like to hear about it. > r = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_ASSIGN_DEV_IRQ); if (r == -1) ... if (r) // ioctl(fd, KVM_ASSIGN_DEV_IRQ, ...) is

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-29 Thread Michael S. Tsirkin
On Thu, Jul 26, 2012 at 01:15:26PM -0700, Nicholas A. Bellinger wrote: > If there is a better way to handle ioctl compat I'd > certainly like to hear about it. You basically don't touch exiting commands, always add new ones. For example if you want to simply stop some ioctl from working for old

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-29 Thread Michael S. Tsirkin
On Wed, Jul 25, 2012 at 02:10:48PM -0700, Nicholas A. Bellinger wrote: > On Wed, 2012-07-25 at 16:10 +0300, Avi Kivity wrote: > > On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: > > > > >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h > > >> > index e942df9..3d5378f 100

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-26 Thread Nicholas A. Bellinger
On Thu, 2012-07-26 at 11:58 +0300, Avi Kivity wrote: > On 07/26/2012 05:34 AM, Nicholas A. Bellinger wrote: > > > > In that case, respinning a -v5 for tcm_vhost to start from ABI=0 and > > will post an updated patch shortly. > > > >> The main thing I would like to confirm is that this only versio

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-26 Thread Avi Kivity
On 07/26/2012 05:34 AM, Nicholas A. Bellinger wrote: > > In that case, respinning a -v5 for tcm_vhost to start from ABI=0 and > will post an updated patch shortly. > >> The main thing I would like to confirm is that this only versions the >> tcm_vhost ioctls? In that case a single version number

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 23:35 +0100, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > > > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > > > On Mon, 2012-07-23 at

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: > On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > > > On Tue, Jul 24, 20

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > > > From: Nicholas Bel

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 16:10 +0300, Avi Kivity wrote: > On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: > > >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h > >> > index e942df9..3d5378f 100644 > >> > --- a/drivers/vhost/tcm_vhost.h > >> > +++ b/drivers/vhost/tcm_vhost.h

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Avi Kivity
On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h >> > index e942df9..3d5378f 100644 >> > --- a/drivers/vhost/tcm_vhost.h >> > +++ b/drivers/vhost/tcm_vhost.h >> > @@ -80,7 +80,17 @@ struct tcm_vhost_tport { >> > >> > #i

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > > From: Nicholas Bellinger > > > > > > As requested by Anthony, here is a patch agai

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Nicholas A. Bellinger
On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > As requested by Anthony, here is a patch against > > target-pending/for-next-merge > > to expose an ABI version to userspace

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > As requested by Anthony, here is a patch against target-pending/for-next-merge > to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION > ioctl operation. > > As mentioned in

[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION ioctl operation. As mentioned in the comment, ABI Rev 0 is for pre 2012 out-of-tree code, and ABI Rev 1 (the current