From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com,
Ian.Campbell@citrix.com
Subject: Re: [PATCH v9 05/10] xen/arm: physical irq follow virtual irq
Date: Fri, 01 Aug 2014 18:54:16 +0100 [thread overview]
Message-ID: <53DBD448.7030801@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1408011821061.2293@kaball.uk.xensource.com>
Hi Stefano,
On 01/08/14 18:22, Stefano Stabellini wrote:
> On Mon, 28 Jul 2014, Julien Grall wrote:
>> On 07/28/2014 05:20 PM, Stefano Stabellini wrote:
>>> On Mon, 28 Jul 2014, Julien Grall wrote:
>>>> Hi stefano,
>>>>
>>>> On 07/24/2014 06:33 PM, Stefano Stabellini wrote:
>>>>> +void arch_move_irqs(struct vcpu *v)
>>>>> +{
>>>>> + const cpumask_t *cpu_mask = cpumask_of(v->processor);
>>>>> + struct domain *d = v->domain;
>>>>> + struct pending_irq *p;
>>>>> + struct vcpu *v_target;
>>>>> + int i;
>>>>> +
>>>>> + for ( i = 32; i < d->arch.vgic.nr_lines; i++ )
>>>>
>>>> Sorry, I didn't spot this error until now.
>>>>
>>>> For the VGIC nr_lines contains the number of *SPIs* rather on the GIC
>>>> structure it's the number of IRQs... the name is very confusing. I have
>>>> a patch to rename nr_lines into nr_spis, along with adding a macro
>>>> vgic_number_lines.
>>>
>>> I couldn't parse this sentence.
>>
>> Sorry it was not very clear.
>>
>>> I guess you are saying that vgic.nr_lines doesn't represent the number
>>> of spis?
>>
>> Yes. In the VGIC structure nr_lines = number of SPIs.
>>
>> On GIC structure nr_lines = number of IRQs.
>
> Wait a second. If in the vgic struct, nr_lines = number of SPIs, then
> the code in this patch is correct as it is, isn't it?
No because your loop starts at 32 and you check against vgic.nr_lines.
The loop should be:
for ( i = 32; i < (d->arch.vgic.nr_lines + 32); i++ )
Otherwise you will forget to migrate the last 32 SPIs.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-08-01 17:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 17:31 [PATCH v9 00/10] gic and vgic fixes and improvements Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 01/10] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 02/10] xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier Stefano Stabellini
2014-07-28 15:16 ` Julien Grall
2014-07-28 16:18 ` Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 03/10] xen/arm: inflight irqs during migration Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 04/10] xen/arm: support irq delivery to vcpu > 0 Stefano Stabellini
2014-07-28 16:16 ` Julien Grall
2014-07-24 17:33 ` [PATCH v9 05/10] xen/arm: physical irq follow virtual irq Stefano Stabellini
2014-07-28 15:47 ` Julien Grall
2014-07-28 16:20 ` Stefano Stabellini
2014-07-28 16:42 ` Julien Grall
2014-08-01 17:22 ` Stefano Stabellini
2014-08-01 17:54 ` Julien Grall [this message]
2014-08-01 17:58 ` Stefano Stabellini
2014-08-01 18:00 ` Julien Grall
2014-07-24 17:33 ` [PATCH v9 06/10] xen: introduce sched_move_irqs Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 07/10] xen: remove workaround to inject evtchn_irq on irq enable Stefano Stabellini
2014-07-25 8:12 ` Jan Beulich
2014-08-01 17:00 ` Stefano Stabellini
2014-08-04 7:15 ` Jan Beulich
2014-08-04 10:02 ` Stefano Stabellini
2014-08-04 10:18 ` Jan Beulich
2014-08-04 20:29 ` Stefano Stabellini
2014-08-05 6:25 ` Jan Beulich
2014-08-05 11:26 ` Stefano Stabellini
2014-07-24 17:33 ` [PATCH v9 08/10] xen/arm: take the rank lock before accessing ipriority Stefano Stabellini
2014-07-28 16:22 ` Julien Grall
2014-07-24 17:33 ` [PATCH v9 09/10] xen: introduce bit access macros for the IRQ line status flags Stefano Stabellini
2014-07-25 12:21 ` Julien Grall
2014-07-24 17:33 ` [PATCH v9 10/10] xen/arm: make accesses to desc->status flags atomic Stefano Stabellini
2014-07-25 12:40 ` Julien Grall
2014-07-28 16:31 ` Stefano Stabellini
2014-07-28 17:14 ` Julien Grall
2014-07-29 10:25 ` Stefano Stabellini
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=53DBD448.7030801@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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 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).