From: Chris Wright <chrisw@sous-sol.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH corrected RFC] uio: add generic driver for PCI 2.3 devices
Date: Thu, 9 Jul 2009 19:22:29 -0700 [thread overview]
Message-ID: <20090710022229.GF30379@sequoia.sous-sol.org> (raw)
In-Reply-To: <4A5604B3.2090508@codemonkey.ws>
* Anthony Liguori (anthony@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
next prev parent reply other threads:[~2009-07-10 2:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 11:48 [PATCH corrected RFC] uio: add generic driver for PCI 2.3 devices Michael S. Tsirkin
2009-07-09 14:54 ` Anthony Liguori
2009-07-09 18:12 ` Michael S. Tsirkin
2009-07-09 20:14 ` Anthony Liguori
2009-07-09 20:21 ` Michael S. Tsirkin
2009-07-10 2:22 ` Chris Wright [this message]
2009-07-12 6:17 ` Avi Kivity
2009-07-10 2:19 ` Chris Wright
2009-07-10 13:56 ` Michael S. Tsirkin
-- strict thread matches above, loose matches on Subject: below --
2009-07-09 18:13 Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090710022229.GF30379@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox