[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-pci
Subject:    Re: [Xen-devel] [PATCH 2/3 v3] Refactor MSI restore call-chain to drop unnecessary argument
From:       "Jan Beulich" <JBeulich () suse ! com>
Date:       2013-08-29 10:47:09
Message-ID: 521F42CD02000078000EF5D0 () nat28 ! tlf ! novell ! com
[Download RAW message or body]

>>> On 29.08.13 at 11:50, Zhenzhong Duan <zhenzhong.duan@oracle.com> wrote:

> 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?

Oh, okay, I mis-read the change then - you're moving the mask
bit changing from __pci_restore_msi{,x}_state() to
default_restore_msi_irqs(). Which of course is fine if Xen (as you
say) doesn't use the latter.

Sorry for the noise then,
Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic