Re: [PATCH corrected RFC] uio: add generic driver for PCI 2.3 devices

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

 



* Anthony Liguori (anthony@xxxxxxxxxxxxx) wrote:
> I didn't know this was possible...  so we could also use this driver for  
> vm-channel.

With MSI things are much nicer (which we could define for vm-channel).
This is for shared legacy INTx.

>> +
>> +	err = pci_request_regions(pdev, "uio_pci_generic");
>> +	if (err) {
>> +		dev_err(&pdev->dev, "%s: pci_request_regions failed: %d\n",
>> +			 __func__, err);
>> +		goto err_verify;
>> +	}
>> +
>> +	dev = kzalloc(sizeof(struct generic_dev), GFP_KERNEL);
>> +	if (!dev) {
>> +		err = -ENOMEM;
>> +		goto err_alloc;
>> +	}
>> +
>> +	dev->info.name = "uio_pci_generic";
>> +	dev->info.version = "0.01";
>> +	dev->info.irq = pdev->irq;
>> +	dev->info.irq_flags = IRQF_SHARED;
>> +	dev->info.handler = irqhandler;
>> +	dev->info.irqcontrol = irqcontrol;
>> +	dev->pdev = pdev;
>> +	spin_lock_init(&dev->lock)
>>   
>
> I know it's not strictly needed for PCI pass through, but it would be  
> useful to register the IO regions via UIO.  The userspace implementation  
> would then use UIO strictly instead of poking the sysfs pci info  
> directly.  I think that ends up being cleaner.

I don't see what the advantage is?

thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux