|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7] interrupts: allow guest to set/clear MSI-X mask bit
>>> On 04.09.13 at 14:01, Joby Poriyath <joby.poriyath@xxxxxxxxxx> wrote:
> On Wed, Sep 04, 2013 at 09:36:09AM +0100, Jan Beulich wrote:
>> >>> On 30.08.13 at 18:12, Joby Poriyath <joby.poriyath@xxxxxxxxxx> wrote:
>> > +static struct msi_desc *virt_to_msi_desc(struct pci_dev *dev, void *virt)
>> > +{
>> > + struct msi_desc *desc;
>> > +
>> > + list_for_each_entry( desc, &dev->msi_list, list )
>> > + if ( desc->msi_attrib.type == PCI_CAP_ID_MSIX &&
>> > + desc->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET
>> > + == virt )
>>
>> To match the function's name I'd prefer this to hit on the full 16-byte
>> range rather than just the control word.
>>
>
> Sorry Jan, I didn't quite understand this. virt points to the control word
> in this function. So how can we do a match on (low | high) address and data
> words?
Each MSI-X table entry occupies 16 bytes. What I'm asking for is
that rather than just matching virt == base + ctrl-offset, you
should use a range check (virt >= base && virt < base + 16) here,
so that the addresses of the three other dwords in the MSI-X table
entry could also be passed in. Otherwise the function doesn't really
do what its name says.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |