[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

From: Wen Congyang
Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device
Date: Wed, 07 Sep 2011 12:39:09 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4

At 09/06/2011 03:45 PM, Avi Kivity Write:
> On 09/06/2011 06:06 AM, Wen Congyang wrote:
>> >  Use the uio driver -
>> >  http://docs.blackfin.uclinux.org/kernel/generated/uio-howto/.  You
>> just
>> >  mmap() the BAR from userspace and play with it.
>> When I try to bind ivshmem to uio_pci_generic, I get the following
>> messages:
>> uio_pci_generic 0000:01:01.0: No IRQ assigned to device: no support
>> for interrupts?
> No idea what this means.

PCI 3.0 6.2.4
For x86 based PCs, the values in this register correspond to IRQ numbers (0-15) 
of the standard dual
8259 configuration. The value 255 is defined as meaning "unknown" or "no 
connection" to the interrupt
controller. Values between 15 and 254 are reserved.

The register is interrupt line.

I read the config of this device, the interrupt line is 0. It means that it 
uses the IRQ0.

The following is the uio_pci_generic's code:
static int __devinit probe(struct pci_dev *pdev,
                           const struct pci_device_id *id)
        struct uio_pci_generic_dev *gdev;
        int err;

        err = pci_enable_device(pdev);
        if (err) {
                dev_err(&pdev->dev, "%s: pci_enable_device failed: %d\n",
                        __func__, err);
                return err;

        if (!pdev->irq) {
                dev_warn(&pdev->dev, "No IRQ assigned to device: "
                         "no support for interrupts?\n");
                return -ENODEV;

This function will be called when we write 'domain:bus:slot.function' to 
pdev->irq is 0, it means the device uses IRQ0. But we refuse it. I do not why.

To Michael S. Tsirkin
This code is writen by you. Do you know why you check whether pdev->irq is 0?

Wen Congyang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]