qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Igor Mitsyanko <i.mitsyanko@samsung.com>,
	Mark Langsdorf <mark.langsdorf@calxeda.com>,
	Evgeny Voevodin <e.voevodin@samsung.com>,
	patches@linaro.org, Marc Zyngier <marc.zyngier@arm.com>,
	Dmitry Solodkiy <d.solodkiy@samsung.com>,
	Maksim Kozlov <m.kozlov@samsung.com>,
	kvmarm@lists.cs.columbia.edu
Subject: [Qemu-devel] [PATCH 0/3] ARM: fix secondary boot GIC init, GIC bugs
Date: Thu, 29 Nov 2012 17:02:54 +0000	[thread overview]
Message-ID: <1354208577-8935-1-git-send-email-peter.maydell@linaro.org> (raw)

The secondary CPU boot code we use on ARM had a couple of
places where it was accidentally relying on bugs or implementation
dependent behaviour of QEMU's on GIC implementation:
 * we weren't initialising the GICC_PMR priority mask, which
   in a correct v1 or v2 GIC is set to mask out all interrupts
   from reset. This worked on the QEMU GIC because our GIC (a)
   gets the reset value of PMR wrong on non-11MPCore and (b) is
   doing an incorrect comparison against the PMR value when
   delivering interrupts anyway.
 * no barrier between initialising the GIC and doing a WFI; this
   is fine for TCG QEMU but could potentially result in the GIC
   config not being guaranteed to have happened before we hit the
   WFI when running on real CPU hardware under ARM KVM.

This patch series first fixes the secondary CPU boot code bugs,
and then corrects our GIC model to match the specs.

NB: I don't have a working test setup/images for highbank or
exynos4 so those changes are only compile tested, but they are
basically the same as the generic boot code changes.

Peter Maydell (3):
  hw/arm_boot, exynos4210, highbank: Fix secondary boot GIC init
  hw/arm_gic: Fix comparison with priority mask register
  hw/arm_gic_common: Correct GICC_PMR reset value for newer GICs

 hw/arm_boot.c       |   17 ++++++++++++++---
 hw/arm_gic.c        |    2 +-
 hw/arm_gic_common.c |    6 +++++-
 hw/armv7m_nvic.c    |    4 +++-
 hw/exynos4210.c     |   10 +++++++---
 hw/highbank.c       |    7 +++++--
 6 files changed, 35 insertions(+), 11 deletions(-)

-- 
1.7.9.5

             reply	other threads:[~2012-11-29 17:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 17:02 Peter Maydell [this message]
2012-11-29 17:02 ` [Qemu-devel] [PATCH 1/3] hw/arm_boot, exynos4210, highbank: Fix secondary boot GIC init Peter Maydell
2012-12-01 21:27   ` Igor Mitsyanko
2012-11-29 17:02 ` [Qemu-devel] [PATCH 2/3] hw/arm_gic: Fix comparison with priority mask register Peter Maydell
2012-12-01 15:50   ` [Qemu-devel] [kvmarm] " Christoffer Dall
2012-12-01 21:27   ` [Qemu-devel] " Igor Mitsyanko
2012-11-29 17:02 ` [Qemu-devel] [PATCH 3/3] hw/arm_gic_common: Correct GICC_PMR reset value for newer GICs Peter Maydell
2012-12-01 21:27   ` Igor Mitsyanko

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=1354208577-8935-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=d.solodkiy@samsung.com \
    --cc=e.voevodin@samsung.com \
    --cc=i.mitsyanko@samsung.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=m.kozlov@samsung.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.langsdorf@calxeda.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).