lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201007011149.17807.pugs@lyon-about.com>
Date:	Thu, 1 Jul 2010 11:49:17 -0700
From:	Tom Lyon <pugs@...n-about.com>
To:	Alex Williamson <alex.williamson@...hat.com>
Cc:	"Michael S. Tsirkin" <mst@...hat.com>, randy.dunlap@...cle.com,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	chrisw@...s-sol.org, joro@...tes.org, hjk@...utronix.de,
	avi@...hat.com, gregkh@...e.de, aafabbri@...co.com,
	scofeldm@...co.com, Donald Dutile <ddutile@...hat.com>
Subject: Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

On Thursday 01 July 2010 08:48:41 am Alex Williamson wrote:
> On Thu, 2010-07-01 at 18:31 +0300, Michael S. Tsirkin wrote:
> > On Thu, Jul 01, 2010 at 09:29:04AM -0600, Alex Williamson wrote:
> > > On Tue, 2010-06-08 at 14:21 -0700, Tom Lyon wrote:
> > > > +The VFIO_DMA_MASK ioctl is used to set the maximum permissible DMA address
> > > > +(device dependent). It takes a single unsigned 64 bit integer as an argument.
> > > > +This call also has the side effect of enabling PCI bus mastership.
> > > 
> > > Hi Tom,
> > > 
> > > This interface doesn't make sense for the MAP_IOVA user.  Especially in
> > > qemu, we have no idea what the DMA mask is for the device we're
> > > assigning.  It doesn't really matter though because the guest will use
> > > bounce buffers internally once it loads the device specific drivers and
> > > discovers the DMA mask.  This only seems relevant if we're using a
> > > DMA_MAP call that gets to pick the dmaaddr, so I'd propose we only make
> > > this a required call for that interface, and create a separate ioctl for
> > > actually enabling bus master.  Thanks,
> > > 
> > > Alex
> > 
> > I expect there's no need for a separate ioctl to do this:
> > you can do this by write to the control register.
> 
> Nope, vfio only allows direct writes to the memory and io space bits of
> the command register, all other bits are virtualized.  I wonder if
> that's necessary though since we require the device to be attached to an
> iommu domain before we allow config space access.
> 
I had already gotten rid of the mask setting & master mode ioctl. It was a remnant
of using the dma_map_sg API which is no longer in there.  And I tweaked the
config stuff to allow writing the master bit.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ