Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-10-15 Thread Tom Lyon
Michael Alex et al - Sorry for going quiet; I've been digesting the comments and researching a lot more stuff. I plan to release V5 shortly after 2.6.36 is out, highlights will be: 1. Re-written pci config tables - using approach suggested by MST to clean things up. Looking much

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-10-03 Thread Michael S. Tsirkin
On Thu, Sep 30, 2010 at 02:43:11PM -0700, Tom Lyon wrote: + vdev-mapcount--; + listener-mm-locked_vm -= mlp-npage; Is there a race against mlock call here? Alas, yes. I took another look at the related infiniband code, and now have adopted their way of doing it. Just make sure to

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-10-03 Thread Michael S. Tsirkin
On Thu, Sep 30, 2010 at 04:09:39PM -0700, Tom Lyon wrote: On Monday, September 27, 2010 04:54:21 am Michael S. Tsirkin wrote: On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them for

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-30 Thread Tom Lyon
On Monday, September 27, 2010 04:54:21 am Michael S. Tsirkin wrote: On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them for the Nth time - something needs to be done with the rvirt/write

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( + int write, + struct vfio_dev *vdev, + char __user *buf, + size_t count, + loff_t *ppos)

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 02:57:49PM -0600, Alex Williamson wrote: On Mon, 2010-09-27 at 13:54 +0200, Michael S. Tsirkin wrote: On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Alex Williamson
On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( + int write, + struct vfio_dev *vdev, + char __user

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( +

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Alex Williamson
On Tue, 2010-09-28 at 16:40 +0200, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700,

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 11:10:42AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 16:40 +0200, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-27 Thread Michael S. Tsirkin
On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them for the Nth time - something needs to be done with the rvirt/write tables. I doubt anyone besides me and you has gone over them: one has to

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-27 Thread Alex Williamson
On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +/* + * Pretend we're hardware and tweak the values + * of the *virtual* pci BARs to reflect the hardware + * capabilities + */ +static void vfio_bar_fixup(struct vfio_dev *vdev) +{ + struct pci_dev *pdev = vdev-pdev; + int bar;

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-27 Thread Alex Williamson
On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( + int write, + struct vfio_dev *vdev, + char __user *buf, + size_t count, + loff_t *ppos) +{ + struct pci_dev *pdev = vdev-pdev; +

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-27 Thread Alex Williamson
On Mon, 2010-09-27 at 13:54 +0200, Michael S. Tsirkin wrote: On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them for the Nth time - something needs to be done with the rvirt/write tables.