* Anthony Liguori (anth...@codemonkey.ws) 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to