From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te7rA-0004VO-H8 for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:25:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te7r9-0001K0-4B for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:25:00 -0500 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:49817 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te7r8-0001Je-Se for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:24:59 -0500 From: Peter Maydell Date: Thu, 29 Nov 2012 17:02:54 +0000 Message-Id: <1354208577-8935-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/3] ARM: fix secondary boot GIC init, GIC bugs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mitsyanko , Mark Langsdorf , Evgeny Voevodin , patches@linaro.org, Marc Zyngier , Dmitry Solodkiy , Maksim Kozlov , kvmarm@lists.cs.columbia.edu 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