All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>,
	xiantao.zhang@intel.com, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH resend 1/3] VT-d: enable for multi-vector MSI
Date: Wed, 17 Jul 2013 10:50:17 +0100	[thread overview]
Message-ID: <51E668D9.8020303@citrix.com> (raw)
In-Reply-To: <51E54B7502000078000E5595@nat28.tlf.novell.com>

On 16/07/13 12:32, Jan Beulich wrote:
>>>> On 16.07.13 at 13:15, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 16/07/13 11:13, Jan Beulich wrote:
>>> The main change being to make alloc_remap_entry() capable of allocating
>>> a block of entries.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> --- a/xen/drivers/passthrough/vtd/intremap.c
>>> +++ b/xen/drivers/passthrough/vtd/intremap.c
>>> @@ -194,18 +194,18 @@ static void free_remap_entry(struct iomm
>>>  }
>>>  
>>>  /*
>>> - * Look for a free intr remap entry.
>>> + * Look for a free intr remap entry (or a contiguous set thereof).
>>>   * Need hold iremap_lock, and setup returned entry before releasing lock.
>>>   */
>>> -static int alloc_remap_entry(struct iommu *iommu)
>>> +static unsigned int alloc_remap_entry(struct iommu *iommu, unsigned int nr)
>> alloc_remap_entries() now that it unconditionally takes a count (and you
>> already have to patch all callsites)
> Actually I checked with Linux, and the use singular in the function
> name too (albeit the name isn't identical).
>
>>> @@ -555,31 +556,29 @@ static int msi_msg_to_remap_entry(
>>>      struct iremap_entry *iremap_entry = NULL, *iremap_entries;
>>>      struct iremap_entry new_ire;
>>>      struct msi_msg_remap_entry *remap_rte;
>>> -    int index;
>>> +    unsigned int index, i, nr = 1;
>> Does this hardcoding of nr=1 defeat the purpose of the following logic?
> In what way?
>
>>>      unsigned long flags;
>>>      struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu);
>>>  
>>> -    remap_rte = (struct msi_msg_remap_entry *) msg;
>>> +    if ( msi_desc->msi_attrib.type == PCI_CAP_ID_MSI )
>>> +        nr = msi_desc->msi.nvec;
> The logic here makes the vector count 1 for MSI-X and msi.nvec
> for MSI.
>
> Jan
>

Ah yes - I see now.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

  reply	other threads:[~2013-07-17  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 10:00 [PATCH resend 0/3] x86/IOMMU: multi-vector MSI Jan Beulich
2013-07-16 10:13 ` [PATCH resend 1/3] VT-d: enable for " Jan Beulich
2013-07-16 11:15   ` Andrew Cooper
2013-07-16 11:32     ` Jan Beulich
2013-07-17  9:50       ` Andrew Cooper [this message]
2013-07-18 10:48         ` Zhang, Xiantao
2013-07-16 10:14 ` [PATCH resend 2/3] x86: enable " Jan Beulich
2013-07-16 11:36   ` Andrew Cooper
2013-07-16 11:48     ` Jan Beulich
2013-07-17 10:02       ` Andrew Cooper
2013-08-05 13:11   ` Ping: " Jan Beulich
2013-08-08  9:02   ` Keir Fraser
2013-07-16 10:15 ` [PATCH resend 3/3] pciif: add multi-vector-MSI command Jan Beulich
2013-07-16 11:19   ` Andrew Cooper
2013-07-16 11:35     ` Jan Beulich
2013-07-17  9:02       ` Andrew Cooper
2013-08-05 13:12   ` Ping: " Jan Beulich
2013-08-08  9:02   ` Keir Fraser

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=51E668D9.8020303@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=xiantao.zhang@intel.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.