qemu-arm.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-arm] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots
@ 2016-01-27 23:42 Edgar E. Iglesias
  2016-01-27 23:42 ` [Qemu-devel] [RFC 1/1] hw/arm: " Edgar E. Iglesias
  2016-01-28 14:16 ` [Qemu-devel] [RFC 0/1] arm: " Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Edgar E. Iglesias @ 2016-01-27 23:42 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: edgar.iglesias, qemu-arm

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Hi,

I've seen some regressions in my test runs lately when enabling
EL2 and EL3. It turns out we are not setting RW when booting 64bit
Linux kernels.

In the long run, I'm not sure if this does the right thing, for
example we might need to revisit if we ever want to support direct
loading of 32bit kernels on an AArch64 core.
Anyway, this fixes my testruns for now.

Cheers,
Edgar

Edgar E. Iglesias (1):
  hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots

 hw/arm/boot.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [RFC 1/1] hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots
  2016-01-27 23:42 [Qemu-arm] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots Edgar E. Iglesias
@ 2016-01-27 23:42 ` Edgar E. Iglesias
  2016-01-28 14:16 ` [Qemu-devel] [RFC 0/1] arm: " Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Edgar E. Iglesias @ 2016-01-27 23:42 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: edgar.iglesias, qemu-arm

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

When booting Linux on AArch64 enabled cores, setup EL1 and
EL2 to use AArch64.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/arm/boot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 7742dd3..d05a998 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -488,7 +488,9 @@ static void do_cpu_reset(void *opaque)
                  * adjust.
                  */
                 if (env->aarch64) {
+                    env->cp15.scr_el3 |= SCR_RW;
                     if (arm_feature(env, ARM_FEATURE_EL2)) {
+                        env->cp15.hcr_el2 |= HCR_RW;
                         env->pstate = PSTATE_MODE_EL2h;
                     } else {
                         env->pstate = PSTATE_MODE_EL1h;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots
  2016-01-27 23:42 [Qemu-arm] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots Edgar E. Iglesias
  2016-01-27 23:42 ` [Qemu-devel] [RFC 1/1] hw/arm: " Edgar E. Iglesias
@ 2016-01-28 14:16 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-01-28 14:16 UTC (permalink / raw)
  To: Edgar E. Iglesias; +Cc: Edgar Iglesias, qemu-arm, QEMU Developers

On 27 January 2016 at 23:42, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Hi,
>
> I've seen some regressions in my test runs lately when enabling
> EL2 and EL3. It turns out we are not setting RW when booting 64bit
> Linux kernels.
>
> In the long run, I'm not sure if this does the right thing, for
> example we might need to revisit if we ever want to support direct
> loading of 32bit kernels on an AArch64 core.
> Anyway, this fixes my testruns for now.

Looks like the right thing to me. Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-28 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 23:42 [Qemu-arm] [RFC 0/1] arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots Edgar E. Iglesias
2016-01-27 23:42 ` [Qemu-devel] [RFC 1/1] hw/arm: " Edgar E. Iglesias
2016-01-28 14:16 ` [Qemu-devel] [RFC 0/1] arm: " Peter Maydell

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).