Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239988

Re: [PATCH 2/2] uio: new driver to support PCI MSI-X

From "Michael S. Tsirkin" <mst@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] uio: new driver to support PCI MSI-X
Date 2015-10-06 00:00 +0200
Message-ID <qglXB-37e-29@gated-at.bofh.it> (permalink)
References <qey2R-1z4-5@gated-at.bofh.it> <qey2S-1z4-13@gated-at.bofh.it> <qeHzc-76i-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote:
> Just forwarding events is not enough to make a valid driver.
> What is missing is a way to access the device in a safe way.

Thinking about it some more, maybe some devices don't do DMA, and merely
signal events with MSI/MSI-X.

The fact you mention igb_uio in the cover letter seems to hint that this
isn't the case, and that the real intent is to abuse it for DMA-capable
devices, but still ...

If we assume such a simple device, we need to block userspace from
tweaking at least the MSI control and the MSI-X table.
And changing BARs might make someone else corrupt the MSI-X
table, so we need to block it from changing BARs, too.

Things like device reset will clear the table.  I guess this means we
need to track access to reset, too, make sure we restore the
table to a sane config.

PM  capability can be used to reset things tooI think. Better be
careful about that.

And a bunch of devices could be doing weird things that need
to be special-cased.

All of this is what VFIO is already dealing with.

Maybe extending VFIO for this usecase, or finding another way to share
code might be a better idea than duplicating the code within uio?

-- 
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
  [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
    Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 10:40 +0200
      Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 12:40 +0200
        Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 18:10 +0200
      Re: [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 17:00 +0200
        Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 17:30 +0200
      Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 18:40 +0200
        Re: [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 19:30 +0200
          Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 20:30 +0200
      Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 00:00 +0200
        Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 00:50 +0200
          Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-06 09:40 +0200
            Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Avi Kivity <avi@scylladb.com> - 2015-10-06 14:20 +0200
              Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 16:10 +0200
                Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Avi Kivity <avi@scylladb.com> - 2015-10-06 17:50 +0200
              Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Thomas Monjalon <thomas.monjalon@6wind.com> - 2015-10-16 19:20 +0200
                Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-16 19:30 +0200
            Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 15:50 +0200
          Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 10:30 +0200
            Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 16:00 +0200
              Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 16:50 +0200
                Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 17:10 +0200
                Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 18:50 +0200
    Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:50 +0200
      Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
        Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 04:40 +0200
      Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
        Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 03:30 +0200
  [PATCH 1/2] uio: add support for ioctls Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
  Re: [PATCH 0/2] uio_msi: device driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 10:40 +0200
  Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Avi Kivity <avi@scylladb.com> - 2015-10-01 13:00 +0200
    Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 17:00 +0200
      Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-01 21:50 +0200
        Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 00:10 +0200
          Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:10 +0200
            Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 01:40 +0200
              Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:50 +0200
                Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
                Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 03:40 +0200
                Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-04 19:00 +0200
                Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Greg KH <gregkh@linux-foundation.org> - 2015-10-04 21:10 +0200
                Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-04 22:50 +0200

csiph-web