qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] RFC: vfio API changes needed for powerpc (v2)


From: Yoder Stuart-B08248
Subject: Re: [Qemu-devel] RFC: vfio API changes needed for powerpc (v2)
Date: Thu, 4 Apr 2013 21:38:44 +0000

> > /*
> >  * VFIO_PAMU_MAP_MSI_BANK
> >  *
> >  * Maps the MSI bank at the specified index and iova.  User space must
> >  * call this ioctl once for each MSI bank (count of banks is returned by
> >  * VFIO_IOMMU_GET_MSI_BANK_COUNT).
> >  * Caller provides struct vfio_pamu_msi_bank_map with all fields set.
> >  * Operates on VFIO file descriptor (/dev/vfio/vfio).
> >  * Return: 0 on success, -errno on failure
> >  */
> >
> > struct vfio_pamu_msi_bank_map {
> >         __u32   argsz;
> >         __u32   msi_bank_index;  /* the index of the MSI bank */
> >         __u64   iova;      /* the iova the bank is to be mapped to */
> > };
> 
> Again, flags.  If we dynamically add or remove devices from a container
> the bank count can change, right?  If bank count goes from 2 to 3, does
> userspace know assume the new bank is [2]?  If bank count goes from 3 to
> 2, which index was that?  If removing a device removes an MSI bank then
> vfio-pamu will automatically do the unmap, right?

My assumption is that the bank count returned by VFIO_IOMMU_GET_MSI_BANK_COUNT
is the max bank count for a platform.  (number will mostly likely always be
3 or 4).  So it won't change as devices are added or removed.

If devices are added or removed, the kernel side can enable or disable
the corresponding MSI windows.  But that is hidden from user space.

Stuart



reply via email to

[Prev in Thread] Current Thread [Next in Thread]