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/
Home Products Support Community News


Re: [Xen-devel] [RFC PATCH linux-2.6.18-xen] pciback: clean up (MSI-X v

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC PATCH linux-2.6.18-xen] pciback: clean up (MSI-X vec, entrynr) list when resetting PCI device
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Wed, 01 Jun 2011 18:16:58 +0200
Cc: Drew Jones <drjones@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Laszlo Ersek <lersek@xxxxxxxxxx>
Delivery-date: Wed, 01 Jun 2011 09:17:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DE66FDF0200007800044EC7@xxxxxxxxxxxxxxxxxx>
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>
References: <4DE60EF8.5060902@xxxxxxxxxx> <4DE653290200007800044DE4@xxxxxxxxxxxxxxxxxx> <4DE648C3.40602@xxxxxxxxxx> <4DE66FDF0200007800044EC7@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10
On 06/01/2011 04:59 PM, Jan Beulich wrote:
> The problem is that calling disable_msi_mode() alone is always a
> mistake, this should have been a static function just like its
> counterpart, enable_msi_mode().

MSI has been almost rewritten in the 2.6.21 timeframe, including along
the lines you wrote above:

commit b1cbf4e4dddd708ba268c3a2bf38383a269d490a
Author: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Date:   Mon Mar 5 00:30:10 2007 -0800

    [PATCH] msi: fix up the msi enable/disable logic
    enable/disable_msi_mode have several side effects which keeps them from 
    generally useful.  So this patch replaces them with with two much more
    targeted functions: msi_set_enable and msix_set_enable.
    This patch makes pci_dev->msi_enabled and pci_dev->msix_enabled the 
    way to test if linux has enabled the msi capability, and has the appropriate
    msi data structures set up.

commit f5f2b13129a6541debf8851bae843cbbf48298b7
Author: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Date:   Mon Mar 5 00:30:07 2007 -0800

    [PATCH] msi: sanely support hardware level msi disabling
    In some cases when we are not using msi we need a way to ensure that the
    hardware does not have an msi capability enabled.  Currently the code has 
    calling disable_msi_mode to try and achieve that.  However disable_msi_mode
    has several other side effects and is only available when msi support is
    compiled in so it isn't really appropriate.

commit 866a8c87c4e51046602387953bbef76992107bcb
Author: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Date:   Sun Jan 28 12:45:54 2007 -0700

    msi: Fix msi_remove_pci_irq_vectors.
    Since msi_remove_pci_irq_vectors is designed to be called during
    hotplug remove it is actively wrong to query the hardware and expect
    meaningful results back.
    To that end remove the pci_find_capability calls.  Testing
    dev->msi_enabled and dev->msix_enabled gives us all of the information
    we need.

Probably the situation needs to be re-evaluated with all these applied to dom0.
There's some hope these apply to 2.6.18.

A simple "git log drivers/pci/msi.c" will show a few other patches that the
above might depend on (especially the locking changed).


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>