On Thu, May 27, 2021 at 06:49:59PM -0700, Dave Jiang wrote:
That is not the point, I'm asking if you should be callingAs we talked about in the other thread. We have a single IMS domain per+static int mdev_msix_enable(struct mdev_irq *mdev_irq, int nvec)Huh? The PCI device should be the only device touching IRQ stuff. I'm
+{
+ struct mdev_device *mdev = irq_to_mdev(mdev_irq);
+ struct device *dev;
+ int rc;
+
+ if (nvec != mdev_irq->num)
+ return -EINVAL;
+
+ if (mdev_irq->ims_num) {
+ dev = &mdev->dev;
+ rc = msi_domain_alloc_irqs(dev_get_msi_domain(dev), dev, mdev_irq->ims_num);
nervous to see you mix in the mdev struct device into this function.
device. The domain is set to the mdev 'struct device' and we allocate the
vectors to each mdev 'struct device' so we can manage those IMS vectors
specifically for that mdev.
dev_set_msi_domain(mdev) at all
Jason