xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: Drew Jones <drjones@redhat.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [RFC PATCH linux-2.6.18-xen] pciback: clean up	 (MSI-X vec, entrynr) list when resetting PCI device
Date: Wed, 01 Jun 2011 18:16:58 +0200	[thread overview]
Message-ID: <4DE665FA.2040104@redhat.com> (raw)
In-Reply-To: <4DE66FDF0200007800044EC7@vpn.id2.novell.com>

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@xmission.com>
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 being
    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 definitive
    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@xmission.com>
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 been
    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@xmission.com>
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).

Paolo

  parent reply	other threads:[~2011-06-01 16:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 10:05 [RFC PATCH linux-2.6.18-xen] pciback: clean up (MSI-X vec, entrynr) list when resetting PCI device Laszlo Ersek
2011-06-01 11:02 ` Laszlo Ersek
2011-06-01 14:31   ` Konrad Rzeszutek Wilk
2011-06-01 16:18     ` Paolo Bonzini
2011-06-01 17:32     ` Laszlo Ersek
2011-06-01 18:13       ` 2.6.38 (FC15) with PCI passthrough fails mysteriously with iommu=soft Konrad Rzeszutek Wilk
2011-06-02  7:42         ` Laszlo Ersek
2011-06-02 20:49         ` Pasi Kärkkäinen
2011-06-01 12:56 ` [RFC PATCH linux-2.6.18-xen] pciback: clean up (MSI-X vec, entrynr) list when resetting PCI device Jan Beulich
2011-06-01 14:12   ` Laszlo Ersek
2011-06-01 14:59     ` Jan Beulich
2011-06-01 15:27       ` Laszlo Ersek
2011-06-01 16:07         ` Jan Beulich
2011-06-01 16:25           ` Andrew Jones
2011-06-01 16:27             ` Paolo Bonzini
2011-06-01 16:16       ` Paolo Bonzini [this message]
2011-06-01 14:51 ` Konrad Rzeszutek Wilk
2011-06-01 15:01   ` Konrad Rzeszutek Wilk

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=4DE665FA.2040104@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=JBeulich@novell.com \
    --cc=drjones@redhat.com \
    --cc=lersek@redhat.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).