From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Eli Cohen <eli@mellanox.com>, Amir Vadai <amirv@mellanox.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Yevgeny Petrilin <yevgenyp@mellanox.com>,
Peter Paneah <peter@mellanox.com>
Subject: Re: [PATCH v2] PCI: Mark broken INTx masking for Mellanox devices
Date: Thu, 7 Aug 2014 13:09:16 +1000 [thread overview]
Message-ID: <20140807030916.GA13426@shangw> (raw)
In-Reply-To: <20140804003437.GA4039@shangw>
On Mon, Aug 04, 2014 at 10:34:38AM +1000, Gavin Shan wrote:
>On Sun, Aug 03, 2014 at 09:08:06AM -0600, Alex Williamson wrote:
>>On Mon, 2014-08-04 at 00:30 +1000, Gavin Shan wrote:
>>> On Sun, Aug 03, 2014 at 08:57:39AM +0000, Eli Cohen wrote:
>>> >>>
>>> >>>What is the problem with masking the interrupts with the PCI command
>>> >>>register? I'm asking because I want to understand in which devices we
>>> >>>have the problem, and if it could be fixed by firmware guys.
>>> >>>What are the implications of having the quirk?
>>> >>>
>>> >
>>> >>The way to mask the interrupt through PCI command register isn't taking effect on IBM power platform. So we have to have the >quirk so that the interrupt could be masked from interrupt controller side with function disable_irq_nosync().
>>> >>
>>> >>If the interrupt can't be masked properly, we detect interrupt storm reported from host/guest when passing through those devices >via VFIO without suprise.
>>> >
>>> >Hi Gavin,
>>> >Does it have any effect on performance. Also, can you tell in which cases interrupts need to be masked?
>>> >
>>>
>>> Eli, more code needed to be run for masking the LSI from interrupt controller
>>> side than from PCI command register.
>>>
>>> I was passing through Mellanox devices from host to guest with VFIO, and I
>>> designated to use LSI in the guest side. More details could be found in
>>> drivers/vfio/pci/vfio_pci_intrs.c::vfio_intx_handler()
>>
>>INTx is relatively high overhead already for device assignment since the
>>interrupt is level triggered and needs to be masked on the host while
>>the guest is processing it. The more important restriction imposed by
>>marking broken INTx masking is that the device needs an exclusive
>>interrupt line in order to be assigned to a guest. That may be common
>>practice on IBM power, but on x86 it can make it much harder to
>>configure the system for this use case. Thanks,
>>
>
>Power platform has the similar situation: Each PCI controller has 4
>LSIs shared by all child devices attached to the PHB. It would be
>racy if one LSI is shared by 2 or more devices. So masking LSI with
>PCI command register is the preferred mechanism. Unfortunately, it
>doesn't work on those 2 Mellanox devices. With the quirk, it's workable
>at least.
>
ping, Any more comments on this? :-)
Thanks,
Gavin
next prev parent reply other threads:[~2014-08-07 3:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 4:54 [PATCH v2] PCI: Mark broken INTx masking for Mellanox devices Gavin Shan
2014-08-03 7:51 ` Amir Vadai
2014-08-03 8:20 ` Gavin Shan
2014-08-03 8:57 ` Eli Cohen
2014-08-03 14:30 ` Gavin Shan
2014-08-03 15:08 ` Alex Williamson
2014-08-04 0:34 ` Gavin Shan
2014-08-07 3:09 ` Gavin Shan [this message]
2014-08-11 13:48 ` Wei Yang
2014-08-12 3:52 ` Gavin Shan
2014-08-12 7:51 ` Amir Vadai
2014-08-12 8:57 ` Gavin Shan
2014-08-12 9:04 ` Amir Vadai
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=20140807030916.GA13426@shangw \
--to=gwshan@linux.vnet.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=amirv@mellanox.com \
--cc=eli@mellanox.com \
--cc=linux-pci@vger.kernel.org \
--cc=peter@mellanox.com \
--cc=yevgenyp@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.