public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	edk2-devel@lists.01.org, leif.lindholm@linaro.org
Subject: Re: [PATCH] ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver
Date: Tue, 6 Feb 2018 14:55:58 +0000	[thread overview]
Message-ID: <20bc6e59-61a2-3cfc-20b9-010b8e7eb8f8@arm.com> (raw)
In-Reply-To: <20180206120416.17462-1-ard.biesheuvel@linaro.org>

On 06/02/18 12:04, Ard Biesheuvel wrote:
> Currently, the GIC driver has a static dependency on the CPU arch protocol
> driver, so it can register its IRQ handler at init time. This means there
> is a window between dispatch of the CPU driver and dispatch of the GIC
> driver where any unexpected GIC state may trigger an interrupt which we
> are not set up to handle yet. Note that this is even the case if we enter
> UEFI with interrupts disabled at the CPU, given that any TPL manipulation
> involving TPL_HIGH_LEVEL will unconditionally enable IRQs at the CPU side
> regardless of whether they were enabled to begin with (but only as soon as
> the CPU arch protocol is actually installed)
> 
> So let's reorder the GIC driver with the CPU driver, and let it run its
> initialization that puts the GIC into a known state before enabling
> interrupts. Move its installation of its IRQ handler to a protocol notify
> callback on the CPU arch protocol so that it runs as soon as it becomes
> available.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 
> This fixes an issue observed with GICv3 guests running under KVM.

This fixes the problem I was seeing, so here's my:

Tested-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks a lot Ard!

	M.
-- 
Jazz is not dead. It just smells funny...


  parent reply	other threads:[~2018-02-06 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 12:04 [PATCH] ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver Ard Biesheuvel
2018-02-06 13:01 ` Leif Lindholm
2018-02-06 14:55 ` Marc Zyngier [this message]
2018-02-06 19:01   ` Ard Biesheuvel
2018-03-21 13:15 ` Shannon Zhao

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-list 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=20bc6e59-61a2-3cfc-20b9-010b8e7eb8f8@arm.com \
    --to=devel@edk2.groups.io \
    /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