Re: [PATCH] net: Fix typos and whitespace.

2016-03-23 Thread Vlad Zolotarov
On 03/23/2016 03:55 PM, Bjorn Helgaas wrote: [+cc Vlad] On Wed, Mar 23, 2016 at 08:45:30AM -0500, Bjorn Helgaas wrote: Fix typos. Capitalize CPU, NAPI, RCU consistently. Align structure indentation. No functional change intended; only comment and whitespace changes. Signed-off-by: Bjorn

Re: [PATCH] net: Fix typos and whitespace.

2016-03-23 Thread Vlad Zolotarov
On 03/23/2016 03:55 PM, Bjorn Helgaas wrote: [+cc Vlad] On Wed, Mar 23, 2016 at 08:45:30AM -0500, Bjorn Helgaas wrote: Fix typos. Capitalize CPU, NAPI, RCU consistently. Align structure indentation. No functional change intended; only comment and whitespace changes. Signed-off-by: Bjorn

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-08 Thread Vlad Zolotarov
On 10/07/15 22:51, Stephen Hemminger wrote: I was thinking of not naming it uio at all U mean doing something completely orthogonal to UIO? And how did u thing to access bars? With UIO or implement this functionality in the new configfs too? If yes - then it will essentially be UIO with

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-08 Thread Vlad Zolotarov
On 10/07/15 22:51, Stephen Hemminger wrote: I was thinking of not naming it uio at all U mean doing something completely orthogonal to UIO? And how did u thing to access bars? With UIO or implement this functionality in the new configfs too? If yes - then it will essentially be UIO with

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 21:05, Stephen Hemminger wrote: Thinking more of a custom filesystem like configfs Why would configfs be better? I imagine the final files layout as follows: uioY device that would have enabled MSI-X would have a separate uio/uioY/msix/irqZ for each IRQ[Z] MSI-X vector. And

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 20:21, Greg KH wrote: On Wed, Oct 07, 2015 at 11:55:01AM +0300, Vlad Zolotarov wrote: On 10/07/15 11:46, Greg KH wrote: On Tue, Oct 06, 2015 at 08:17:36PM +0300, Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 16:44, Vlad Zolotarov wrote: On 10/07/15 13:42, Michael S. Tsirkin wrote: On Wed, Oct 07, 2015 at 11:38:12AM +0300, Vlad Zolotarov wrote: So, as u may see everything that could be addressed have been addressed Yea. Wrt upstream you've chosen a wrong approach, it creates issues

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 13:42, Michael S. Tsirkin wrote: On Wed, Oct 07, 2015 at 11:38:12AM +0300, Vlad Zolotarov wrote: So, as u may see everything that could be addressed have been addressed Yea. Wrt upstream you've chosen a wrong approach, it creates issues that can't be addressed. It has been

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:46, Greg KH wrote: On Tue, Oct 06, 2015 at 08:17:36PM +0300, Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some interaction with the user space beyond sysfs capabilities is required, e.g. query

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 01:51, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:35:27PM +0300, Vlad Zolotarov wrote: On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:17, Vlad Zolotarov wrote: On 10/07/15 00:33, Stephen Hemminger wrote: On Tue, 6 Oct 2015 20:17:36 +0300 Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some interaction with the user space beyond

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 00:33, Stephen Hemminger wrote: On Tue, 6 Oct 2015 20:17:36 +0300 Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some interaction with the user space beyond sysfs capabilities is required, e.g. query

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:00, Vlad Zolotarov wrote: On 10/07/15 09:53, Avi Kivity wrote: On 10/07/2015 12:58 AM, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. Taint should only be applied if bus mastering is enabled (to avoid annoying the users

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 09:53, Avi Kivity wrote: On 10/07/2015 12:58 AM, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. Taint should only be applied if bus mastering is enabled (to avoid annoying the users of the original uio use case) Pls., note that this

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 00:58, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. This patch already does this. thanks, vlad On Tue, Oct 6, 2015 at 10:41 PM, Alex Williamson mailto:alex.william...@redhat.com>> wrote: On Tue, 2015-10-06 at 22:32 +0100,

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/06/15 21:51, Alex Williamson wrote: On Tue, 2015-10-06 at 18:23 +0300, Avi Kivity wrote: On 10/06/2015 05:56 PM, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:43:50PM +0300, Vlad Zolotarov wrote: The only "like VFIO" behavior we implement here is binding the MSI-X

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:00, Vlad Zolotarov wrote: On 10/07/15 09:53, Avi Kivity wrote: On 10/07/2015 12:58 AM, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. Taint should only be applied if bus mastering is enabled (to avoid annoying the users

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 00:58, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. This patch already does this. thanks, vlad On Tue, Oct 6, 2015 at 10:41 PM, Alex Williamson > wrote: On Tue,

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 00:33, Stephen Hemminger wrote: On Tue, 6 Oct 2015 20:17:36 +0300 Vlad Zolotarov <vl...@cloudius-systems.com> wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some interaction with the user space beyond sysfs capabi

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 09:53, Avi Kivity wrote: On 10/07/2015 12:58 AM, Stephen Hemminger wrote: Go ahead and submit a seperate taint bit for UIO as a patch. Taint should only be applied if bus mastering is enabled (to avoid annoying the users of the original uio use case) Pls., note that this

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:17, Vlad Zolotarov wrote: On 10/07/15 00:33, Stephen Hemminger wrote: On Tue, 6 Oct 2015 20:17:36 +0300 Vlad Zolotarov <vl...@cloudius-systems.com> wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some inter

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 01:51, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:35:27PM +0300, Vlad Zolotarov wrote: On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-07 Thread Vlad Zolotarov
On 10/06/15 21:51, Alex Williamson wrote: On Tue, 2015-10-06 at 18:23 +0300, Avi Kivity wrote: On 10/06/2015 05:56 PM, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:43:50PM +0300, Vlad Zolotarov wrote: The only "like VFIO" behavior we implement here is binding the MSI-X

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 11:46, Greg KH wrote: On Tue, Oct 06, 2015 at 08:17:36PM +0300, Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful when some interaction with the user space beyond sysfs capabilities is required, e.g. query

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 13:42, Michael S. Tsirkin wrote: On Wed, Oct 07, 2015 at 11:38:12AM +0300, Vlad Zolotarov wrote: So, as u may see everything that could be addressed have been addressed Yea. Wrt upstream you've chosen a wrong approach, it creates issues that can't be addressed. It has been

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 16:44, Vlad Zolotarov wrote: On 10/07/15 13:42, Michael S. Tsirkin wrote: On Wed, Oct 07, 2015 at 11:38:12AM +0300, Vlad Zolotarov wrote: So, as u may see everything that could be addressed have been addressed Yea. Wrt upstream you've chosen a wrong approach, it creates issues

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 20:21, Greg KH wrote: On Wed, Oct 07, 2015 at 11:55:01AM +0300, Vlad Zolotarov wrote: On 10/07/15 11:46, Greg KH wrote: On Tue, Oct 06, 2015 at 08:17:36PM +0300, Vlad Zolotarov wrote: Add the ability for underlying device drivers to register the ioctl commands. This is useful

Re: [PATCH v5 1/4] uio: add ioctl support

2015-10-07 Thread Vlad Zolotarov
On 10/07/15 21:05, Stephen Hemminger wrote: Thinking more of a custom filesystem like configfs Why would configfs be better? I imagine the final files layout as follows: uioY device that would have enabled MSI-X would have a separate uio/uioY/msix/irqZ for each IRQ[Z] MSI-X vector. And

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 23:35, Vlad Zolotarov wrote: On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic demands INT#x interrupts source

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic demands INT#x interrupts source be available. However there are devices

[PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
into a separate patch. - Update uio_pci_generic example in uio-howto.tmpl. New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (4): uio: add ioctl support uio_pci_generic: properly initialize PCI

[PATCH v5 1/4] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
). Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -704,6

[PATCH v5 4/4] Documentation: update uio-howto

2015-10-06 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov --- New in v4: - Update uio_pci_generic example in uio-howto.tmpl --- Documentation/DocBook/uio-howto.tmpl

[PATCH v5 2/4] uio_pci_generic: properly initialize PCI bars mappings towards UIO

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov --- drivers/uio/uio_pci_generic.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index d0b508b..2c6e2b1 100644 --- a/drivers/uio/uio_pci_generic.c +++ b

[PATCH v5 3/4] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
which the original uio_pci_generic had worked before (i.e. INT#x will be used by default). Signed-off-by: Vlad Zolotarov --- New in v4: - Use portable __u32 and __s32 types from asm/types.h for defining uio_pci_generic_irq_set fields. - Use proper _IO macros for defining read and write

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:00, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:49:21PM +0300, Vlad Zolotarov wrote: and read/write the config space. This means that a single userspace bug is enough to corrupt kernel memory. Could u, pls., provide and example of this simple bug? Because it's

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:13, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:40:23PM +0300, Vlad Zolotarov wrote: I'm guessing it doesn't enable MSI though, does it? Again, enabling MSI is a matter of a trivial patch configuring device registers on the device BAR. No, not really. Sure

[PATCH v4 1/4] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -704,6

[PATCH v4 3/4] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
which the original uio_pci_generic had worked before (i.e. INT#x will be used by default). Signed-off-by: Vlad Zolotarov --- New in v4: - Use portable __u32 and __s32 types from asm/types.h for defining uio_pci_generic_irq_set fields. - Use proper _IO macros for defining read and write

[PATCH v4 4/4] Documentation: update uio-howto

2015-10-06 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov --- New in v4: - Update uio_pci_generic example in uio-howto.tmpl --- Documentation/DocBook/uio-howto.tmpl

[PATCH v4 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
example in uio-howto.tmpl. New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (4): uio: add ioctl support uio_pci_generic: properly initialize PCI bars mappings towards UIO uio_pci_generic: add MSI

[PATCH v4 2/4] uio_pci_generic: properly initialize PCI bars mappings towards UIO

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov --- drivers/uio/uio_pci_generic.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index d0b508b..2c6e2b1 100644 --- a/drivers/uio/uio_pci_generic.c +++ b

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:19, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:30:31PM +0300, Gleb Natapov wrote: On Tue, Oct 06, 2015 at 05:19:22PM +0300, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:33:56AM +0300, Vlad Zolotarov wrote: the solution u propose should be a matter

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:56, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:43:50PM +0300, Vlad Zolotarov wrote: The only "like VFIO" behavior we implement here is binding the MSI-X interrupt notification to eventfd descriptor. There will be more if you add some basic memory protectio

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 16:58, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:23:11AM +0300, Vlad Zolotarov wrote: Michael, how this or any other related patch is related to the problem u r describing? The above ability is there for years and if memory serves me well it was u who wrote

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:38, Michael S. Tsirkin wrote: On Mon, Oct 05, 2015 at 01:20:11PM +0300, Avi Kivity wrote: On 10/05/2015 12:49 PM, Greg KH wrote: On Mon, Oct 05, 2015 at 11:28:03AM +0300, Avi Kivity wrote: Of course it has to be documented, but this just follows vfio. Eventfd is a natural

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:30, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:37:59AM +0300, Vlad Zolotarov wrote: Bus mastering is easily enabled from the user space (taken from DPDK code): static int pci_uio_set_bus_master(int dev_fd) { uint16_t reg; int ret; ret = pread

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/05/15 22:50, Michael S. Tsirkin wrote: On Sun, Oct 04, 2015 at 11:43:15PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic supports only legacy INT#x interrupts source. However there are situations

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 01:29, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 12:43:45AM +0300, Vladislav Zolotarov wrote: So, like it has already been asked in a different thread I'm going to ask a rhetorical question: what adding an MSI and MSI-X interrupts support to uio_pci_generic has to do with

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 01:49, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 01:09:55AM +0300, Vladislav Zolotarov wrote: How about instead of trying to invent the wheel just go and attack the problem directly just like i've proposed already a few times in the last days: instead of limiting the UIO

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:19, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:30:31PM +0300, Gleb Natapov wrote: On Tue, Oct 06, 2015 at 05:19:22PM +0300, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:33:56AM +0300, Vlad Zolotarov wrote: the solution u propose should be a matter

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:56, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:43:50PM +0300, Vlad Zolotarov wrote: The only "like VFIO" behavior we implement here is binding the MSI-X interrupt notification to eventfd descriptor. There will be more if you add some basic memory protectio

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:30, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:37:59AM +0300, Vlad Zolotarov wrote: Bus mastering is easily enabled from the user space (taken from DPDK code): static int pci_uio_set_bus_master(int dev_fd) { uint16_t reg; int ret; ret = pread

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 23:35, Vlad Zolotarov wrote: On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic demands INT#x interrupts source

Re: [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 21:27, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 08:17:35PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic demands INT#x interrupts source be available. However there are devices

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 01:49, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 01:09:55AM +0300, Vladislav Zolotarov wrote: How about instead of trying to invent the wheel just go and attack the problem directly just like i've proposed already a few times in the last days: instead of limiting the UIO

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/05/15 22:50, Michael S. Tsirkin wrote: On Sun, Oct 04, 2015 at 11:43:15PM +0300, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic supports only legacy INT#x interrupts source. However there are situations

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 01:29, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 12:43:45AM +0300, Vladislav Zolotarov wrote: So, like it has already been asked in a different thread I'm going to ask a rhetorical question: what adding an MSI and MSI-X interrupts support to uio_pci_generic has to do with

[PATCH v4 1/4] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:13, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:40:23PM +0300, Vlad Zolotarov wrote: I'm guessing it doesn't enable MSI though, does it? Again, enabling MSI is a matter of a trivial patch configuring device registers on the device BAR. No, not really. Sure

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 18:00, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 05:49:21PM +0300, Vlad Zolotarov wrote: and read/write the config space. This means that a single userspace bug is enough to corrupt kernel memory. Could u, pls., provide and example of this simple bug? Because it's

[PATCH v5 2/4] uio_pci_generic: properly initialize PCI bars mappings towards UIO

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio/uio_pci_generic.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index d0b508b..2c6e2b1 100644 --- a/d

[PATCH v5 3/4] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
which the original uio_pci_generic had worked before (i.e. INT#x will be used by default). Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- New in v4: - Use portable __u32 and __s32 types from asm/types.h for defining uio_pci_generic_irq_set fields. - Use prope

[PATCH v4 2/4] uio_pci_generic: properly initialize PCI bars mappings towards UIO

2015-10-06 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio/uio_pci_generic.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index d0b508b..2c6e2b1 100644 --- a/d

[PATCH v4 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
example in uio-howto.tmpl. New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (4): uio: add ioctl support uio_pci_generic: properly initialize PCI bars mappings towards UIO uio_pci_generic: add MSI

[PATCH v4 4/4] Documentation: update uio-howto

2015-10-06 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- New in v4: - Update uio_pci_generic example in uio-howt

[PATCH v4 3/4] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
which the original uio_pci_generic had worked before (i.e. INT#x will be used by default). Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- New in v4: - Use portable __u32 and __s32 types from asm/types.h for defining uio_pci_generic_irq_set fields. - Use prope

[PATCH v5 4/4] Documentation: update uio-howto

2015-10-06 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- New in v4: - Update uio_pci_generic example in uio-howt

[PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-06 Thread Vlad Zolotarov
into a separate patch. - Update uio_pci_generic example in uio-howto.tmpl. New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (4): uio: add ioctl support uio_pci_generic: properly initialize PCI

[PATCH v5 1/4] uio: add ioctl support

2015-10-06 Thread Vlad Zolotarov
). Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 17:38, Michael S. Tsirkin wrote: On Mon, Oct 05, 2015 at 01:20:11PM +0300, Avi Kivity wrote: On 10/05/2015 12:49 PM, Greg KH wrote: On Mon, Oct 05, 2015 at 11:28:03AM +0300, Avi Kivity wrote: Of course it has to be documented, but this just follows vfio. Eventfd is a natural

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

2015-10-06 Thread Vlad Zolotarov
On 10/06/15 16:58, Michael S. Tsirkin wrote: On Tue, Oct 06, 2015 at 11:23:11AM +0300, Vlad Zolotarov wrote: Michael, how this or any other related patch is related to the problem u r describing? The above ability is there for years and if memory serves me well it was u who wrote

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 14:47, Avi Kivity wrote: On 10/05/2015 02:41 PM, Vlad Zolotarov wrote: On 10/05/15 13:57, Greg KH wrote: On Mon, Oct 05, 2015 at 01:48:39PM +0300, Vlad Zolotarov wrote: On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 13:57, Greg KH wrote: On Mon, Oct 05, 2015 at 01:48:39PM +0300, Vlad Zolotarov wrote: On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct msix_info { + int num_irqs; + struct msix_entry *table; + struct

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct msix_info { + int num_irqs; + struct msix_entry *table; + struct uio_msix_irq_ctx { + struct eventfd_ctx *trigger;/* MSI-x vector to eventfd */ Why

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:01, Greg KH wrote: On Mon, Oct 05, 2015 at 10:33:20AM +0300, Vlad Zolotarov wrote: On 10/05/15 06:03, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:16PM +0300, Vlad Zolotarov wrote: Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 12:08, Vlad Zolotarov wrote: On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ +int i, m = 0, p = 0, err; +static const char * const bar_names

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ + int i, m = 0, p = 0, err; + static const char * const bar_names[] = { + "BAR0",

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ + int i, m = 0, p = 0, err; + static const char * const bar_names[] = { + "BAR0",

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 06:11, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:17PM +0300, Vlad Zolotarov wrote: Add support for MSI and MSI-X interrupt modes: - Interrupt mode selection order is: INT#X (for backward compatibility) -> MSI-X -> MSI. - Add ioctl() co

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 06:03, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:16PM +0300, Vlad Zolotarov wrote: Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) You add an ioctl yet fail

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 06:03, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:16PM +0300, Vlad Zolotarov wrote: Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 06:11, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:17PM +0300, Vlad Zolotarov wrote: Add support for MSI and MSI-X interrupt modes: - Interrupt mode selection order is: INT#X (for backward compatibility) -> MSI-X -> MSI. - Add ioctl() co

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov <vl...@cloudius-systems.com> wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ + int i, m = 0, p = 0, err; + static const char * const bar

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov <vl...@cloudius-systems.com> wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ + int i, m = 0, p = 0, err; + static const char * const bar

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct msix_info { + int num_irqs; + struct msix_entry *table; + struct uio_msix_irq_ctx { + struct eventfd_ctx *trigger;/* MSI-x vector to eventfd */ Why

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 13:57, Greg KH wrote: On Mon, Oct 05, 2015 at 01:48:39PM +0300, Vlad Zolotarov wrote: On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct msix_info { + int num_irqs; + struct msix_entry *table; + struct

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 14:47, Avi Kivity wrote: On 10/05/2015 02:41 PM, Vlad Zolotarov wrote: On 10/05/15 13:57, Greg KH wrote: On Mon, Oct 05, 2015 at 01:48:39PM +0300, Vlad Zolotarov wrote: On 10/05/15 10:56, Greg KH wrote: On Mon, Oct 05, 2015 at 10:41:39AM +0300, Vlad Zolotarov wrote: +struct

Re: [PATCH v3 1/3] uio: add ioctl support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 11:01, Greg KH wrote: On Mon, Oct 05, 2015 at 10:33:20AM +0300, Vlad Zolotarov wrote: On 10/05/15 06:03, Greg KH wrote: On Sun, Oct 04, 2015 at 11:43:16PM +0300, Vlad Zolotarov wrote: Signed-off-by: Vlad Zolotarov <vl...@cloudius-systems.com> --- drivers/uio

Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-05 Thread Vlad Zolotarov
On 10/05/15 12:08, Vlad Zolotarov wrote: On 10/05/15 11:41, Stephen Hemminger wrote: On Sun, 4 Oct 2015 23:43:17 +0300 Vlad Zolotarov <vl...@cloudius-systems.com> wrote: +static int setup_maps(struct pci_dev *pdev, struct uio_info *info) +{ +int i, m = 0, p = 0, err; +

Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver

2015-10-04 Thread Vlad Zolotarov
On 10/04/15 22:03, Greg KH wrote: On Sun, Oct 04, 2015 at 07:49:35PM +0300, Vlad Zolotarov wrote: FYI: I've just posted to linux-kernel list patches that add support for both MSI and MSI-X interrupt modes to uio_pci_generic driver. It addresses most (all) remarks on this thread and also fixes

Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-04 Thread Vlad Zolotarov
This is the same v3 but with the correct email address of Greg. In the first iteration the first letter of the email was missing... ;) On 10/04/15 23:43, Vlad Zolotarov wrote: This series add support for MSI and MSI-X interrupts to uio_pci_generic driver. Currently uio_pci_generic supports

[PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-04 Thread Vlad Zolotarov
by default). New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (3): uio: add ioctl support uio_pci_generic: add MSI/MSI-X support Documentation: update uio-howto Documentation/DocBook/uio-howto.tmpl

[PATCH v3 3/3] Documentation: update uio-howto

2015-10-04 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov --- Documentation/DocBook/uio-howto.tmpl | 29 ++--- 1 file changed, 26 insertions(+), 3

[PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-04 Thread Vlad Zolotarov
query the maximum number of IRQs. - UIO_PCI_GENERIC_IRQ_SET: bind the IRQ to eventfd (similar to vfio). - Add mappings to all bars (memory and portio): some devices have registers related to MSI/MSI-X handling outside BAR0. Signed-off-by: Vlad Zolotarov --- New in v3: - Add __iomem qua

[PATCH v3 1/3] uio: add ioctl support

2015-10-04 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -704,6

[PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver

2015-10-04 Thread Vlad Zolotarov
by default). New in v3: - Add __iomem qualifier to temp buffer receiving ioremap value. New in v2: - Added #include to uio_pci_generic.c Vlad Zolotarov (3): uio: add ioctl support uio_pci_generic: add MSI/MSI-X support Documentation: update uio-howto Documentation/DocBook/uio-howto.tmpl

[PATCH v3 1/3] uio: add ioctl support

2015-10-04 Thread Vlad Zolotarov
Signed-off-by: Vlad Zolotarov --- drivers/uio/uio.c | 15 +++ include/linux/uio_driver.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 8196581..714b0e5 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -704,6

[PATCH v3 3/3] Documentation: update uio-howto

2015-10-04 Thread Vlad Zolotarov
Change the chapters related to uio_pci_generic that refer interrupt mode. Add the relevant explanation regarding MSI and MSI-X interrupt modes support. Signed-off-by: Vlad Zolotarov --- Documentation/DocBook/uio-howto.tmpl | 29 ++--- 1 file changed, 26 insertions(+), 3

[PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support

2015-10-04 Thread Vlad Zolotarov
query the maximum number of IRQs. - UIO_PCI_GENERIC_IRQ_SET: bind the IRQ to eventfd (similar to vfio). - Add mappings to all bars (memory and portio): some devices have registers related to MSI/MSI-X handling outside BAR0. Signed-off-by: Vlad Zolotarov --- New in v3: - Add __iomem qua

  1   2   >