From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xensource.com
Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com
Subject: Re: [PATCH v10 03/10] xen/arm: inflight irqs during migration
Date: Tue, 05 Aug 2014 13:28:39 +0100 [thread overview]
Message-ID: <53E0CDF7.2000900@linaro.org> (raw)
In-Reply-To: <1407237989-27654-3-git-send-email-stefano.stabellini@eu.citrix.com>
Hi Stefano,
On 08/05/2014 12:26 PM, Stefano Stabellini wrote:
> We need to take special care when migrating irqs that are already
> inflight from one vcpu to another. See "The effect of changes to an
> GICD_ITARGETSR", part of chapter 4.3.12 of the ARM Generic Interrupt
> Controller Architecture Specification.
NIT: Can you give the reference of the book? ie: IHI 0048B
[..]
> + i = 0;
> + while ( (i = find_next_bit(&target, 32, i)) < 32 )
> + {
> + unsigned int irq, new_target, old_target;
> + unsigned long old_target_mask;
> + struct vcpu *v_target, *v_old;
> +
> + new_target = i % 8;
> + old_target_mask = vgic_byte_read(rank->itargets[REG_RANK_INDEX(8, gicd_reg - GICD_ITARGETSR, DABT_WORD)], 0, i/8);
Can you try to split this line?
> + old_target = find_first_bit(&old_target_mask, 8);
> +
> + if ( new_target != old_target )
> + {
> + irq = gicd_reg + (i / 8);
gicd_reg contains the register offset (i.e GICD_ITARGETSR + off). How
can you get the correct IRQ number here?
I think this should be
irq = gicd_reg - GICD_ITARGETSR + (i / 8);
--
Julien Grall
next prev parent reply other threads:[~2014-08-05 12:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 11:25 [PATCH v10 00/10] gic and vgic fixes and improvements Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 01/10] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 02/10] xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 03/10] xen/arm: inflight irqs during migration Stefano Stabellini
2014-08-05 12:28 ` Julien Grall [this message]
2014-08-05 14:35 ` Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 04/10] xen/arm: support irq delivery to vcpu > 0 Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 05/10] xen/arm: physical irq follow virtual irq Stefano Stabellini
2014-08-05 11:57 ` Jan Beulich
2014-08-05 12:01 ` Jan Beulich
2014-08-05 11:26 ` [PATCH v10 06/10] xen: introduce sched_move_irqs Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 07/10] xen: remove workaround to inject evtchn_irq on irq enable Stefano Stabellini
2014-08-05 12:00 ` Jan Beulich
2014-08-05 12:34 ` Julien Grall
2014-08-05 11:26 ` [PATCH v10 08/10] xen/arm: take the rank lock before accessing ipriority Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 09/10] xen: introduce bit access macros for the IRQ line status flags Stefano Stabellini
2014-08-05 11:26 ` [PATCH v10 10/10] xen/arm: make accesses to desc->status flags atomic Stefano Stabellini
2014-08-05 12:35 ` Julien Grall
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=53E0CDF7.2000900@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).