linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Feng Jin <joe.jin@oracle.com>,
	Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH 2/3 v3] Refactor MSI restore call-chain to drop unnecessary argument
Date: Thu, 29 Aug 2013 17:50:38 +0800	[thread overview]
Message-ID: <521F196E.2010102@oracle.com> (raw)
In-Reply-To: <521F12FC02000078000EF503@nat28.tlf.novell.com>


On 2013-08-29 15:23, Jan Beulich wrote:
>>>> On 29.08.13 at 04:52, Zhenzhong Duan <zhenzhong.duan@oracle.com> wrote:
>> But in initial domain (aka priviliged guest), it's different.
>> Driver init call graph under initial domain:
>> driver_init->
>>      msix_capability_init->
>>          msix_program_entries->
>>              msix_mask_irq->
>>                  entry->masked = 1
>>      request_irq->
>>          __setup_irq->
>>              irq_startup->
>>                  __startup_pirq->
>>                      EVTCHNOP_bind_pirq hypercall    (trap into Xen)
>> [Xen:]
>> pirq_guest_bind->
>>      startup_msi_irq->
>>          unmask_msi_irq->
>>              msi_set_mask_bit->
>>                  entry->msi_attrib.masked = 0
>>
>> So entry->msi_attrib.masked in xen side always has newest value. entry->masked
>> in initial domain is untouched and is 1 after msix_capability_init.
> And as said several times before - Linux shouldn't be touching
> the MSI-X table at all during initial setup or resume (it should in
> particular not rely on such accesses to not fault, as being a
> privilege violation); all it needs to do is update its software state.
My patch just remove access to msix mask register in dom0. Anything 
wrong with that?
>
> Hence fiddling with default_restore_msi_irqs() seems the wrong
> approach towards solving the problem.
dom0 uses xen_initdom_restore_msi_irqs, default_restore_msi_irqs is for 
baremetal.

zduan

  reply	other threads:[~2013-08-29  9:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  2:52 [PATCH 2/3 v3] Refactor MSI restore call-chain to drop unnecessary argument Zhenzhong Duan
2013-08-29  7:23 ` [Xen-devel] " Jan Beulich
2013-08-29  9:50   ` Zhenzhong Duan [this message]
2013-08-29 10:47     ` Jan Beulich
2013-08-29 13:31 ` Konrad Rzeszutek Wilk
2013-09-25 22:22 ` Bjorn Helgaas
2013-09-26  1:19   ` Zhenzhong Duan

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=521F196E.2010102@oracle.com \
    --to=zhenzhong.duan@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=bhelgaas@google.com \
    --cc=joe.jin@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sucheta.chakraborty@qlogic.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).