linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Request VFIO inclusion in linux-next
@ 2012-06-26  4:55 Alex Williamson
       [not found] ` <1340686552.1207.128.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
  2012-06-26 23:50 ` Stephen Rothwell
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Williamson @ 2012-06-26  4:55 UTC (permalink / raw)
  To: Stephen Rothwell, Linus Torvalds, Andrew Morton, Greg Kroah-Hartman
  Cc: kvm, Alexey Kardashevskiy, linux-pci, linux-kernel, qemu-devel,
	chrisw, iommu, linux-next-u79uwXL29TY76Z2rM5mHXA,
	Benjamin Herrenschmidt, David Gibson

Hi,

VFIO has been kicking around for well over a year now and has been
posted numerous times for review.  The pre-requirements are finally
available in linux-next (or will be in the 20120626 build) so I'd like
to request a new branch be included in linux-next with a goal of being
accepted into v3.6.

VFIO is a userspace driver interface designed to support assignment of
devices into virtual machines using IOMMU level access control.  This
IOMMU requirement, secure resource access, and flexible interrupt
support make VFIO unique from existing drivers, like UIO.  VFIO supports
modular backends for both IOMMU and device access.  Initial backends are
included for PCI device assignment using the IOMMU API in a manner
compatible with x86 device assignment.  POWER support is also under
development, making use of the same PCI device backend, but adding new
IOMMU support for their platforms.

As with previous versions of VFIO, Qemu is targeted as a primary user
and a working development tree including vfio-pci support can be found
here:

git://github.com/awilliam/qemu-vfio.git iommu-group-vfio

Eventually we hope VFIO can deprecate the x86, PCI-specific device
assignment currently used by KVM.

The info for linux-next:

Tree: git://github.com/awilliam/linux-vfio.git
Branch: next
Contact: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

This branch should be applied after both Bjorn's PCI next branch and
Joerg's IOMMU next branch and contains the following changes:

 Documentation/ioctl/ioctl-number.txt |    1 
 Documentation/vfio.txt               |  315 +++++++
 MAINTAINERS                          |    8 
 drivers/Kconfig                      |    2 
 drivers/Makefile                     |    1 
 drivers/vfio/Kconfig                 |   16 
 drivers/vfio/Makefile                |    3 
 drivers/vfio/pci/Kconfig             |    8 
 drivers/vfio/pci/Makefile            |    4 
 drivers/vfio/pci/vfio_pci.c          |  565 ++++++++++++
 drivers/vfio/pci/vfio_pci_config.c   | 1528 +++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_intrs.c    |  727 ++++++++++++++++
 drivers/vfio/pci/vfio_pci_private.h  |   91 ++
 drivers/vfio/pci/vfio_pci_rdwr.c     |  269 ++++++
 drivers/vfio/vfio.c                  | 1420 ++++++++++++++++++++++++++++++++
 drivers/vfio/vfio_iommu_type1.c      |  754 +++++++++++++++++
 include/linux/vfio.h                 |  445 ++++++++++
 17 files changed, 6157 insertions(+)

If there are any objections to including this, please speak now.  If
anything looks amiss in the branch, let me know.  I've never hosted a
next branch.  Review comments welcome and I'll be glad to post the
series in email again if requested.  Thanks,

Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
       [not found] ` <1340686552.1207.128.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
@ 2012-06-26 21:17   ` Benjamin Herrenschmidt
  2012-06-27 12:37   ` Dan Carpenter
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2012-06-26 21:17 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Stephen Rothwell, kvm, Alexey Kardashevskiy, Greg Kroah-Hartman,
	linux-kernel, qemu-devel, chrisw, iommu,
	linux-next-u79uwXL29TY76Z2rM5mHXA, linux-pci, Andrew Morton,
	Linus Torvalds, David Gibson

On Mon, 2012-06-25 at 22:55 -0600, Alex Williamson wrote:
> Hi,
> 
> VFIO has been kicking around for well over a year now and has been
> posted numerous times for review.  The pre-requirements are finally
> available in linux-next (or will be in the 20120626 build) so I'd like
> to request a new branch be included in linux-next with a goal of being
> accepted into v3.6.

Ack. Let's get that in, it's been simmering for too long and we'll need
that to do PCI pass-through on KVM powerpc.

Cheers,
Ben.

> VFIO is a userspace driver interface designed to support assignment of
> devices into virtual machines using IOMMU level access control.  This
> IOMMU requirement, secure resource access, and flexible interrupt
> support make VFIO unique from existing drivers, like UIO.  VFIO supports
> modular backends for both IOMMU and device access.  Initial backends are
> included for PCI device assignment using the IOMMU API in a manner
> compatible with x86 device assignment.  POWER support is also under
> development, making use of the same PCI device backend, but adding new
> IOMMU support for their platforms.
> 
> As with previous versions of VFIO, Qemu is targeted as a primary user
> and a working development tree including vfio-pci support can be found
> here:
> 
> git://github.com/awilliam/qemu-vfio.git iommu-group-vfio
> 
> Eventually we hope VFIO can deprecate the x86, PCI-specific device
> assignment currently used by KVM.
> 
> The info for linux-next:
> 
> Tree: git://github.com/awilliam/linux-vfio.git
> Branch: next
> Contact: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> 
> This branch should be applied after both Bjorn's PCI next branch and
> Joerg's IOMMU next branch and contains the following changes:
> 
>  Documentation/ioctl/ioctl-number.txt |    1 
>  Documentation/vfio.txt               |  315 +++++++
>  MAINTAINERS                          |    8 
>  drivers/Kconfig                      |    2 
>  drivers/Makefile                     |    1 
>  drivers/vfio/Kconfig                 |   16 
>  drivers/vfio/Makefile                |    3 
>  drivers/vfio/pci/Kconfig             |    8 
>  drivers/vfio/pci/Makefile            |    4 
>  drivers/vfio/pci/vfio_pci.c          |  565 ++++++++++++
>  drivers/vfio/pci/vfio_pci_config.c   | 1528 +++++++++++++++++++++++++++++++++++
>  drivers/vfio/pci/vfio_pci_intrs.c    |  727 ++++++++++++++++
>  drivers/vfio/pci/vfio_pci_private.h  |   91 ++
>  drivers/vfio/pci/vfio_pci_rdwr.c     |  269 ++++++
>  drivers/vfio/vfio.c                  | 1420 ++++++++++++++++++++++++++++++++
>  drivers/vfio/vfio_iommu_type1.c      |  754 +++++++++++++++++
>  include/linux/vfio.h                 |  445 ++++++++++
>  17 files changed, 6157 insertions(+)
> 
> If there are any objections to including this, please speak now.  If
> anything looks amiss in the branch, let me know.  I've never hosted a
> next branch.  Review comments welcome and I'll be glad to post the
> series in email again if requested.  Thanks,
> 
> Alex
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
  2012-06-26  4:55 Request VFIO inclusion in linux-next Alex Williamson
       [not found] ` <1340686552.1207.128.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
@ 2012-06-26 23:50 ` Stephen Rothwell
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2012-06-26 23:50 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Linus Torvalds, Andrew Morton, Greg Kroah-Hartman, linux-kernel,
	kvm, linux-pci, iommu, qemu-devel, Benjamin Herrenschmidt,
	Alexey Kardashevskiy, David Gibson, chrisw, Roedel, Joerg,
	linux-next, Bjorn Helgaas

[-- Attachment #1: Type: text/plain, Size: 2420 bytes --]

Hi Alex,

On Mon, 25 Jun 2012 22:55:52 -0600 Alex Williamson <alex.williamson@redhat.com> wrote:
>
> VFIO has been kicking around for well over a year now and has been
> posted numerous times for review.  The pre-requirements are finally
> available in linux-next (or will be in the 20120626 build) so I'd like
> to request a new branch be included in linux-next with a goal of being
> accepted into v3.6.
> 
> The info for linux-next:
> 
> Tree: git://github.com/awilliam/linux-vfio.git
> Branch: next
> Contact: Alex Williamson <alex.williamson@redhat.com>
> 
> This branch should be applied after both Bjorn's PCI next branch and
> Joerg's IOMMU next branch

I have added this from today.  Since this tree merges (parts of) the pci
and iommu trees, I am hoping that those are to remain stable - if not,
then you need to stay alert if they are rebased.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
       [not found] ` <1340686552.1207.128.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
  2012-06-26 21:17   ` Benjamin Herrenschmidt
@ 2012-06-27 12:37   ` Dan Carpenter
  2012-06-27 19:23     ` Alex Williamson
  2012-07-02  3:41     ` Alexey Kardashevskiy
  1 sibling, 2 replies; 8+ messages in thread
From: Dan Carpenter @ 2012-06-27 12:37 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Stephen Rothwell, Benjamin Herrenschmidt, kvm,
	Alexey Kardashevskiy, Greg Kroah-Hartman, linux-kernel,
	qemu-devel, chrisw, iommu, linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-pci, Andrew Morton, Linus Torvalds, David Gibson

On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote:
> Hi,
> 
> VFIO has been kicking around for well over a year now and has been
> posted numerous times for review.  The pre-requirements are finally
> available in linux-next (or will be in the 20120626 build) so I'd like
> to request a new branch be included in linux-next with a goal of being
> accepted into v3.6.
> 

Could you run Sparse over the driver?
http://lwn.net/Articles/205624/

It reports a bunch of endian problems.  Some are definitely bugs
like:
	*prev |= cpu_to_le32((u32)epos << 20);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
  2012-06-27 12:37   ` Dan Carpenter
@ 2012-06-27 19:23     ` Alex Williamson
       [not found]       ` <1340825003.1207.224.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
  2012-07-02  3:41     ` Alexey Kardashevskiy
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Williamson @ 2012-06-27 19:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Stephen Rothwell, Benjamin Herrenschmidt, kvm,
	Alexey Kardashevskiy, Greg Kroah-Hartman, linux-kernel,
	qemu-devel, chrisw, iommu, linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-pci, Andrew Morton, Linus Torvalds, David Gibson

On Wed, 2012-06-27 at 15:37 +0300, Dan Carpenter wrote:
> On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote:
> > Hi,
> > 
> > VFIO has been kicking around for well over a year now and has been
> > posted numerous times for review.  The pre-requirements are finally
> > available in linux-next (or will be in the 20120626 build) so I'd like
> > to request a new branch be included in linux-next with a goal of being
> > accepted into v3.6.
> > 
> 
> Could you run Sparse over the driver?
> http://lwn.net/Articles/205624/
> 
> It reports a bunch of endian problems.  Some are definitely bugs
> like:
> 	*prev |= cpu_to_le32((u32)epos << 20);

Done.  Mostly just adding annotation, but it did find a bug or two.
Should be cleaned up in tomorrow's next.  Thanks for the report,

Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
       [not found]       ` <1340825003.1207.224.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
@ 2012-06-28  6:44         ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2012-06-28  6:44 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Stephen Rothwell, Benjamin Herrenschmidt, kvm,
	Alexey Kardashevskiy, Greg Kroah-Hartman, linux-kernel,
	qemu-devel, chrisw, iommu, linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-pci, Andrew Morton, Linus Torvalds, David Gibson

On Wed, Jun 27, 2012 at 01:23:23PM -0600, Alex Williamson wrote:
> On Wed, 2012-06-27 at 15:37 +0300, Dan Carpenter wrote:
> > On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote:
> > > Hi,
> > > 
> > > VFIO has been kicking around for well over a year now and has been
> > > posted numerous times for review.  The pre-requirements are finally
> > > available in linux-next (or will be in the 20120626 build) so I'd like
> > > to request a new branch be included in linux-next with a goal of being
> > > accepted into v3.6.
> > > 
> > 
> > Could you run Sparse over the driver?
> > http://lwn.net/Articles/205624/
> > 
> > It reports a bunch of endian problems.  Some are definitely bugs
> > like:
> > 	*prev |= cpu_to_le32((u32)epos << 20);
> 
> Done.  Mostly just adding annotation, but it did find a bug or two.
> Should be cleaned up in tomorrow's next.  Thanks for the report,
> 

Cool.  I have some Smatch fixes as well.  I've updated them to apply
on top of today's linux-next.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
  2012-06-27 12:37   ` Dan Carpenter
  2012-06-27 19:23     ` Alex Williamson
@ 2012-07-02  3:41     ` Alexey Kardashevskiy
       [not found]       ` <4FF11855.2060605-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Alexey Kardashevskiy @ 2012-07-02  3:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Alex Williamson, Stephen Rothwell, Linus Torvalds, Andrew Morton,
	Greg Kroah-Hartman, linux-kernel, kvm, linux-pci, iommu,
	qemu-devel, Benjamin Herrenschmidt, David Gibson, chrisw, Roedel,
	Joerg, linux-next

On 27/06/12 22:37, Dan Carpenter wrote:
> On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote:
>> Hi,
>>
>> VFIO has been kicking around for well over a year now and has been
>> posted numerous times for review.  The pre-requirements are finally
>> available in linux-next (or will be in the 20120626 build) so I'd like
>> to request a new branch be included in linux-next with a goal of being
>> accepted into v3.6.
>>
> 
> Could you run Sparse over the driver?
> http://lwn.net/Articles/205624/
> 
> It reports a bunch of endian problems.  Some are definitely bugs
> like:
> 	*prev |= cpu_to_le32((u32)epos << 20);


What is wrong here?



-- 
Alexey

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Request VFIO inclusion in linux-next
       [not found]       ` <4FF11855.2060605-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
@ 2012-07-02  4:14         ` Alex Williamson
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Williamson @ 2012-07-02  4:14 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: Stephen Rothwell, Benjamin Herrenschmidt, kvm,
	Greg Kroah-Hartman, linux-kernel, qemu-devel, chrisw, iommu,
	linux-next-u79uwXL29TY76Z2rM5mHXA, linux-pci, Andrew Morton,
	Linus Torvalds, Dan Carpenter, David Gibson

On Mon, 2012-07-02 at 13:41 +1000, Alexey Kardashevskiy wrote:
> On 27/06/12 22:37, Dan Carpenter wrote:
> > On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote:
> >> Hi,
> >>
> >> VFIO has been kicking around for well over a year now and has been
> >> posted numerous times for review.  The pre-requirements are finally
> >> available in linux-next (or will be in the 20120626 build) so I'd like
> >> to request a new branch be included in linux-next with a goal of being
> >> accepted into v3.6.
> >>
> > 
> > Could you run Sparse over the driver?
> > http://lwn.net/Articles/205624/
> > 
> > It reports a bunch of endian problems.  Some are definitely bugs
> > like:
> > 	*prev |= cpu_to_le32((u32)epos << 20);
> 
> 
> What is wrong here?

I believe the only thing wrong here was that prev was a u32* instead of
a __le32*.  The new version in my tree has much better endian annotation
after going through all the sparse errors.  The only bug I found in the
cleanup was the handling of rbar.  It was missing the le32_to_cpu as we
copied it out of vconfig.  This is later used with
pci_user_write_config_dword, so it needs to be in native endian.
Thanks,

Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-02  4:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26  4:55 Request VFIO inclusion in linux-next Alex Williamson
     [not found] ` <1340686552.1207.128.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2012-06-26 21:17   ` Benjamin Herrenschmidt
2012-06-27 12:37   ` Dan Carpenter
2012-06-27 19:23     ` Alex Williamson
     [not found]       ` <1340825003.1207.224.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2012-06-28  6:44         ` Dan Carpenter
2012-07-02  3:41     ` Alexey Kardashevskiy
     [not found]       ` <4FF11855.2060605-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
2012-07-02  4:14         ` Alex Williamson
2012-06-26 23:50 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).