WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] When doing PT for a device, fails to bind the interrupt, if

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] When doing PT for a device, fails to bind the interrupt, if the specified irq is *not* PT_MACHINE_IRQ_AUTO
From: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Date: Mon, 17 Aug 2009 12:39:03 +0300
Delivery-date: Mon, 17 Aug 2009 02:39:27 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=S6W+tMSy1YRGZjlwcjWuSoDvtew5Afb7A15PFxGCgkA=; b=RzGMKsgk2hkgIKq7d+K/UgLeLwWluJJPGna9CxN8rBAasIa3U/OOL3HkrUlIm2DmjP Bo1ow7Dgbfr1r9MKICxVjfU9Y1De1BQcOxVbmAnlO7nV4JLU659DYUXrgZO/pvl2rxsf 7/J7y0BOdscY9CMGiqBBVn6sJatvCZnARBNV8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=TMjm/Tq3tn7TIckL7YFBRO9JOZqx8J8y5ko+j1zax8V2Z29FgOLzsvkcNKCX7bHv3E 346v53+71oCJLbKp5a2yMlAjX5BS25JJKd8PUYN/lWxRQGpJgl3sb1IwJt7QG1MMkBCg jGffReUyXt1eb5eZCNgXrPPj7mIpyO8goAW6U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When i'm doing PT for a device, if i specify the 'PT_MACHINE_IRQ_AUTO'
as the irq for  the device, it works fine. However, if i try and
specify an irq number (even if i specify the same irq , which will
later be selected by the auto-irq method) - it fails to bind the
interrupt.

I looked at the code a little bit, and it looks like, if the irq isn't
PT_MACHINE_IRQ_AUTO, then the call to 'xc_physdev_map_pirq()' won't be
executed. Here is the code:
    if ( PT_MACHINE_IRQ_AUTO == machine_irq )
    {
        int pirq = pci_dev->irq;

        machine_irq = pci_dev->irq;
        rc = xc_physdev_map_pirq(xc_handle, domid, machine_irq, &pirq);

        if ( rc )
        {
            PT_LOG("Error: Mapping irq failed, rc = %d\n", rc);

            /* Disable PCI intx assertion (turn on bit10 of devctl) */
            pci_write_word(pci_dev, PCI_COMMAND,
                *(uint16_t *)(&assigned_device->dev.config[PCI_COMMAND])
                | PCI_COMMAND_DISABLE_INTx);
            machine_irq = 0;
            assigned_device->machine_irq = 0;
        }
        else
        {
            machine_irq = pirq;
            assigned_device->machine_irq = pirq;
            mapped_machine_irq[machine_irq]++;
        }
    }


This looks like a bug, no?

Tom

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] When doing PT for a device, fails to bind the interrupt, if the specified irq is *not* PT_MACHINE_IRQ_AUTO, Tom Rotenberg <=