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 1/2] xen/arm: remove workaround to inject evtchn_irq on irq enable
Date: Wed, 25 Jun 2014 16:03:15 +0100 [thread overview]
Message-ID: <53AAE4B3.4080802@linaro.org> (raw)
In-Reply-To: <1403633514-8853-1-git-send-email-stefano.stabellini@eu.citrix.com>
Hi Stefano,
On 06/24/2014 07:11 PM, Stefano Stabellini wrote:
> evtchn_upcall_pending is already set by common code at vcpu creation,
> therefore on ARM we also need to call vgic_vcpu_inject_irq for it.
> Currently we do that from vgic_enable_irqs as a workaround.
>
> Do this properly by calling vgic_vcpu_inject_irq in the appropriate
> places at vcpu creation time, making sure to call it after the vcpu is
> up (_VPF_down has been cleared).
While it's works perfectly on common case, as the toolstack is always
setting VGCF_online.
It would be possible to call the hypercall DOMCTL_vcpusetcontext without
this flags enable. If so, the new VCPU will never receive event channel
interrupt.
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
> xen/arch/arm/domain.c | 4 +++-
> xen/arch/arm/domain_build.c | 2 ++
> xen/arch/arm/vgic.c | 18 ++++--------------
> 3 files changed, 9 insertions(+), 15 deletions(-)
>
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index e20ba0b..c29b063 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -651,8 +651,10 @@ int arch_set_info_guest(
> v->is_initialised = 1;
>
> if ( ctxt->flags & VGCF_online )
> + {
> clear_bit(_VPF_down, &v->pause_flags);
> - else
> + vgic_vcpu_inject_irq(v, v->domain->arch.evtchn_irq);
I'd like a comment above each vgic_vcpu_inject(v, evtchn_irq) to explain
why we need them.
So in the future we won't need to spend hours to search in log because
someone has moved the line.
> + } else
Coding style:
else
{
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-06-25 15:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 18:11 [PATCH 0/2] more vgic fixes Stefano Stabellini
2014-06-24 18:11 ` [PATCH 1/2] xen/arm: remove workaround to inject evtchn_irq on irq enable Stefano Stabellini
2014-06-25 15:03 ` Julien Grall [this message]
2014-07-02 15:38 ` Ian Campbell
2014-07-02 15:45 ` Julien Grall
2014-07-03 18:33 ` Stefano Stabellini
2014-06-24 18:11 ` [PATCH 2/2] xen/arm: take the rank lock before accessing ipriority Stefano Stabellini
2014-07-02 15:41 ` Ian Campbell
2014-07-03 18:46 ` 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=53AAE4B3.4080802@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 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.