linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Yijing Wang <wangyijing@huawei.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH 1/3] x86/xen: Introduce a global flag to fix the MSI mask bug
Date: Tue, 28 Oct 2014 12:57:17 -0400	[thread overview]
Message-ID: <20141028165717.GC26801@laptop.dumpdata.com> (raw)
In-Reply-To: <544FC7FC.9040807@citrix.com>

On Tue, Oct 28, 2014 at 04:44:44PM +0000, David Vrabel wrote:
> On 27/10/14 19:45, Konrad Rzeszutek Wilk wrote:
> > On Mon, Oct 27, 2014 at 11:09:42AM +0000, David Vrabel wrote:
> >> On 27/10/14 02:44, Yijing Wang wrote:
> >>> Commit 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()")
> >>> fixed MSI mask bug which may cause kernel crash. But the commit
> >>> made MSI code complex. Introduce a new global flag "pci_msi_ignore_mask"
> >>> to ignore MSI/MSI-X to fix this issue, it's a cleaner solution.
> >>> And the commit 0e4ccb1505a9 will be reverted in the later patch.
> >>
> >> Reviewed-by: David Vrabel <david.vrabel@citrix.com>
> >>
> >> In the sense that it keeps the odd Xen behaviour.  But...
> >>
> >> Konrad, why was this fixed like this in the first place?  IMO, it would
> > 
> > As 0e4ccb1505a9 explains:
> >     PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()
> >     
> >     Certain platforms do not allow writes in the MSI-X BARs to setup or tear
> >     down vector values.  To combat against the generic code trying to write to
> >     that and either silently being ignored or crashing due to the pagetables
> >     being marked R/O this patch introduces a platform override.
> >     
> >     Note that we keep two separate, non-weak, functions default_mask_msi_irqs()
> >     and default_mask_msix_irqs() for the behavior of the arch_mask_msi_irqs()
> >     and arch_mask_msix_irqs(), as the default behavior is needed by x86 PCI
> >     code.
> >     
> >     For Xen, which does not allow the guest to write to MSI-X tables - as the
> >     hypervisor is solely responsible for setting the vector values - we
> >     implement two nops.
> 
> My question specifically was: could this be fixed by allowing writes to
> set/clear the mask bit?  If so, why was this not done and could we do

No.
> this now?
> 
> David

  reply	other threads:[~2014-10-28 16:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  2:44 [PATCH 0/3] xen MSI code clean up Yijing Wang
2014-10-27  2:44 ` [PATCH 1/3] x86/xen: Introduce a global flag to fix the MSI mask bug Yijing Wang
2014-10-27 11:09   ` [Xen-devel] " David Vrabel
2014-10-27 19:45     ` Konrad Rzeszutek Wilk
2014-10-28 16:44       ` David Vrabel
2014-10-28 16:57         ` Konrad Rzeszutek Wilk [this message]
2014-11-11  0:04   ` Bjorn Helgaas
2014-11-11  1:49     ` Yijing Wang
2014-11-11 15:45     ` Konrad Rzeszutek Wilk
2014-11-11 20:24       ` Bjorn Helgaas
2014-11-11 22:04         ` Konrad Rzeszutek Wilk
2014-10-27  2:44 ` [PATCH 2/3] x86/xen: Revert "PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()" Yijing Wang
2014-10-27 11:10   ` David Vrabel
2014-10-27  2:44 ` [PATCH 3/3] s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq() Yijing Wang
2014-11-11 21:23 ` [PATCH 0/3] xen MSI code clean up Bjorn Helgaas
2014-11-12  9:24   ` Sebastian Ott

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=20141028165717.GC26801@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=bhelgaas@google.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=wangyijing@huawei.com \
    --cc=xen-devel@lists.xenproject.org \
    /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).