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

On 6 February 2018 at 14:55, Marc Zyngier <marc.zyngier@arm.com> wrote:
> 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!
>

Pushed as 61a7b0ec634fa3288f47929ba3ced05ff48de739

Thanks.


  reply	other threads:[~2018-02-06 18:55 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
2018-02-06 19:01   ` Ard Biesheuvel [this message]
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='CAKv+Gu8tgp9HX=mZGfSiwnzcoctFsbTYip7=C99+Y263a5mfjg@mail.gmail.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