Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-15 Thread Avi Kivity
On 08/14/2012 08:23 PM, Alex Williamson wrote: > >> Unrelated nit: memcmp() doesn't return a boolean or a count, so >> !memcmp() is really unintuitive, at least to me. > > I figure we're all pretty used to it growing up on !strcmp though. I hate that one too. >> > + >> > +/* XXX This should mov

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 18:53 +0300, Avi Kivity wrote: > On 08/01/2012 08:18 AM, Alex Williamson wrote: > > This adds the core of the QEMU VFIO-based PCI device assignment driver. > > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > > and CONFIG_VFIO_PCI in your host Linux k

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Avi Kivity
On 08/01/2012 08:18 AM, Alex Williamson wrote: > This adds the core of the QEMU VFIO-based PCI device assignment driver. > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci > module. To assign device

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 08:12 +0100, Stefan Hajnoczi wrote: > On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: > > This adds the core of the QEMU VFIO-based PCI device assignment driver. > > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > > and CONFIG_VFIO_P

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Stefan Hajnoczi
On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: > This adds the core of the QEMU VFIO-based PCI device assignment driver. > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci > module.

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:18 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > +static int vfio_load_rom(VFIODevice *vdev) > > +{ > > +uint64_t size = vdev->rom_size; > > +const VMStateDescription *vmsd; > > +char name[32]; > > +off_t off = 0, voff = vdev->rom_offset; > >