> From: Yongji Xie
> Sent: Wednesday, April 27, 2016 8:22 PM
>
> Current vfio-pci implementation disallows to mmap
> sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio
> page may be shared with other BARs. This will cause some
> performance issues when we passthrough a PCI device with
>
> From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com]
> Sent: Tuesday, May 03, 2016 1:52 PM
>
> >> +
> >> + if (!(res->start & ~PAGE_MASK)) {
> >> + /*
> >> + * Add shadow resource for sub-page bar whose mmio
> >> + * page is exclusive
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> +static int iommufd_fault_init(struct iommufd_fault *fault, char *name,
> + struct iommufd_ctx *ictx)
> +{
> + struct file *filep;
> + int fdno;
> +
> + fault->ictx = ictx;
while at it coul
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
> +
> +/* An iommufd_virq represents a vIOMMU interrupt in an eventq_virq
> queue */
> +struct iommufd_virq {
> + struct iommufd_eventq_virq *eventq_virq;
> + struct list_head node;
> + ssize_t irq_len;
> + void *irq_
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> Use it to store all vSMMU-related data. The vsid (Virtual Stream ID) will
> be the first use case. Then, add a rw_semaphore to protect it.
>
> Also add a pair of arm_smmu_attach_prepare/commit_vmaster helpers and
> put
> them i
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> +
> +/**
> + * struct iommu_virq_arm_smmuv3 - ARM SMMUv3 Virtual IRQ
> + *(IOMMU_VIRQ_TYPE_ARM_SMMUV3)
> + * @evt: 256-bit ARM SMMUv3 Event record, little-endian.
> + *
> + * StreamID field report
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> The new vIRQ object will need a similar function for drivers to report the
> vIOMMU related interrupts. Split the common part out to a smaller helper,
> and place it in the header so that CONFIG_IOMMUFD_DRIVER_CORE can
> include
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> The fault object was designed exclusively for hwpt's IO page faults (PRI).
> But its implementation can actually be reused for other purposes too, such
> as hardware IRQ and event injections to user space.
>
> Meanwhile, a faul
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> Rename the file, aligning with the new eventq object.
>
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> With the introduction of the new objects, update the doc to reflect that.
>
> Signed-off-by: Nicolin Chen
> ---
> Documentation/userspace-api/iommufd.rst | 19 +++
> 1 file changed, 19 insertions(+)
>
> diff
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> +/* Return 0 if device is not associated to the vIOMMU */
> +unsigned long iommufd_viommu_get_vdev_id(struct iommufd_viommu
> *viommu,
> + struct device *dev)
> +{
> + struct iommufd_vdev
> From: Nicolin Chen
> Sent: Wednesday, December 4, 2024 6:10 AM
>
> +/* Typically called in driver's threaded IRQ handler */
> +int iommufd_viommu_report_irq(struct iommufd_viommu *viommu,
> unsigned int type,
> + void *irq_ptr, size_t irq_len)
> +{
> + struct iommu
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
> +
> +int iommufd_veventq_alloc(struct iommufd_ucmd *ucmd)
> +{
> + struct iommu_veventq_alloc *cmd = ucmd->cmd;
> + struct iommufd_veventq *veventq;
> + struct iommufd_viommu *viommu;
> + int fdno;
> + int rc;
>
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
> +
> + xa_lock(&viommu->vdevs);
> + xa_for_each(&viommu->vdevs, index, vdev) {
> + if (vdev && vdev->dev == dev) {
> + vdev_id = (unsigned long)vdev->id;
> + break;
> +
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
>
> With the introduction of the new objects, update the doc to reflect that.
>
> Reviewed-by: Lu Baolu
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
>
> +/*
> + * Typically called in driver's threaded IRQ handler.
> + * The @type and @event_data must be defined in
> include/uapi/linux/iommufd.h
> + */
> +int iommufd_viommu_report_event(struct iommufd_viommu *viommu,
> +
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
>
> The fault object was designed exclusively for hwpt's IO page faults (PRI).
> But its queue implementation can be reused for other purposes too, such as
> hardware IRQ and event injections to user space.
>
> Meanwhile, a fault ob
> From: Nicolin Chen
> Sent: Wednesday, January 8, 2025 1:10 AM
>
> Reorder the existing OBJ/IOCTL lists.
>
> Also run clang-format for the same coding style at line wrappings.
>
> No functional change.
>
> Reviewed-by: Lu Baolu
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
> From: Nicolin Chen
> Sent: Wednesday, January 22, 2025 3:16 PM
>
> On Tue, Jan 21, 2025 at 08:21:28PM -0400, Jason Gunthorpe wrote:
> > On Tue, Jan 21, 2025 at 01:40:05PM -0800, Nicolin Chen wrote:
> > > > There is also the minor detail of what happens if the hypervisor HW
> > > > queue overflo
> From: Nicolin Chen
> Sent: Monday, January 13, 2025 12:51 PM
>
> On Mon, Jan 13, 2025 at 02:52:32AM +, Tian, Kevin wrote:
> > > From: Nicolin Chen
> > > Sent: Saturday, January 11, 2025 5:29 AM
> > >
> > > On Fri, Jan 10, 2025 at 07:
> From: Nicolin Chen
> Sent: Saturday, January 11, 2025 5:29 AM
>
> On Fri, Jan 10, 2025 at 07:06:49AM +, Tian, Kevin wrote:
> > > From: Nicolin Chen
> > > Sent: Wednesday, January 8, 2025 1:10 AM
> > > +
> > > +int iommufd_veventq_alloc(st
> From: Nicolin Chen
> Sent: Friday, February 21, 2025 5:16 AM
>
> On Wed, Feb 19, 2025 at 06:58:16AM +, Tian, Kevin wrote:
> > > From: Jason Gunthorpe
> > > Sent: Tuesday, February 18, 2025 11:36 PM
> > >
> > > On Fri, Jan 24, 2025 at 04
> From: Jason Gunthorpe
> Sent: Tuesday, February 18, 2025 11:36 PM
>
> On Fri, Jan 24, 2025 at 04:30:36PM -0800, Nicolin Chen wrote:
> > +int iommufd_viommu_report_event(struct iommufd_viommu *viommu,
> > + enum iommu_veventq_type type, void
> *event_data,
> > +
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> There is no need to keep them in the header. The vEVENTQ version of these
> two functions will turn out to be a different implementation and will not
> share with this fault version. Thus, move them out of the header.
>
> Signed
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
> +
> +/*
> + * An iommufd_veventq object represents an interface to deliver vIOMMU
> events to
> + * the user space. It is created/destroyed by the user space and associated
> with
> + * vIOMMU object(s) during the allocations.
s/ob
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> The handler will get vDEVICE object from the given mdev and convert it to
> its per-vIOMMU virtual ID to mimic a real IOMMU driver.
>
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> Trigger vEVENTs by feeding an idev ID and validating the returned output
> virt_ids whether they equal to the value that was set to the vDEVICE.
>
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> Aside from the IOPF framework, iommufd provides an additional pathway to
> report hardware events, via the vEVENTQ of vIOMMU infrastructure.
>
> Define an iommu_vevent_arm_smmuv3 uAPI structure, and report stage-1
> events
> in
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> When attaching a device to a vIOMMU-based nested domain, vdev_id must
> be
> present. Add a piece of code hard-requesting it, preparing for a vEVENTQ
> support in the following patch. Then, update the TEST_F.
>
> A HWPT-based ne
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> There is a DoS concern on the shared hardware event queue among devices
> passed through to VMs, that too many translation failures that belong to
> VMs could overflow the shared hardware event queue if those VMs or their
> VMMs
> From: Nicolin Chen
> Sent: Saturday, January 25, 2025 8:31 AM
>
> Similar to iommu_report_device_fault, this allows IOMMU drivers to report
> vIOMMU events from threaded IRQ handlers to user space hypervisors.
>
> Reviewed-by: Lu Baolu
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
31 matches
Mail list logo