From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: linux-omap@vger.kernel.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH 2/2] ARM: OMAP5: Add HYP mode entry support for secondary CPUs
Date: Mon, 25 Nov 2013 11:28:36 -0500 [thread overview]
Message-ID: <52937AB4.1060901@ti.com> (raw)
In-Reply-To: <CAMJs5B8XX-93YcRyTiQ1JRcKUB5oer8cV7FLtMPP6SeqeB3RwQ@mail.gmail.com>
On Monday 25 November 2013 10:09 AM, Christoffer Dall wrote:
> On 23 November 2013 16:07, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
>> Boot-CPU entry into the HYP mode is managed in boot-loader but
>> the secondary CPUs directly jumps to kernel during boot. Same
>> path is also used for CPU hotplug as well during suspend for
>> secondary CPU.
>>
>> Hence patch the secondary CPU boot path for hyp mode etry.
>>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>> arch/arm/mach-omap2/omap-headsmp.S | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
>> index 75e9295..4844dd8 100644
>> --- a/arch/arm/mach-omap2/omap-headsmp.S
>> +++ b/arch/arm/mach-omap2/omap-headsmp.S
>> @@ -22,6 +22,7 @@
>>
>> /* Physical address needed since MMU not enabled yet on secondary core */
>> #define AUX_CORE_BOOT0_PA 0x48281800
>> +#define API_HYP_ENTRY 0x102
>>
>> /*
>> * OMAP5 specific entry point for secondary CPU to jump from ROM
>> @@ -38,6 +39,12 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
>> and r4, r4, #0x0f
>> cmp r0, r4
>> bne wait
>> +#ifdef CONFIG_KVM_ARM_HOST
>> + ldr r12, =API_HYP_ENTRY
>> + adr r0, hyp_boot
>> + smc #0
>> +hyp_boot:
>> +#endif
>> b secondary_startup
>> END(omap5_secondary_startup)
>> /*
>
> hmm, this means that currently running this in a guest will fail to
> bring-up SMP, right?
>
Nope. Because the code under 'KVM_ARM_HOST' macro. Guest build
will not enable CONFIG_KVM_ARM_HOST and things should be fine then.
Right ?
> Couldn't you create a little wrapper-pen in U-Boot instead, which
> replicates the omap boot protocol and takes care of the hyp-mode
> startup there instead, keeping this completely out of the kernel?
>
Its not just booting but CPU hotplug also follows the same path
so we need the mechanism in kernel to switch mode.
In general, I think its important to consider the aspect with
CPU PM. CPUs are not going to go through the boot-loaders in
those paths and hence need of HYP entry in the kernel will
be must.
Regards,
Santosh
Regards,
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: OMAP5: Add HYP mode entry support for secondary CPUs
Date: Mon, 25 Nov 2013 11:28:36 -0500 [thread overview]
Message-ID: <52937AB4.1060901@ti.com> (raw)
In-Reply-To: <CAMJs5B8XX-93YcRyTiQ1JRcKUB5oer8cV7FLtMPP6SeqeB3RwQ@mail.gmail.com>
On Monday 25 November 2013 10:09 AM, Christoffer Dall wrote:
> On 23 November 2013 16:07, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
>> Boot-CPU entry into the HYP mode is managed in boot-loader but
>> the secondary CPUs directly jumps to kernel during boot. Same
>> path is also used for CPU hotplug as well during suspend for
>> secondary CPU.
>>
>> Hence patch the secondary CPU boot path for hyp mode etry.
>>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>> arch/arm/mach-omap2/omap-headsmp.S | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
>> index 75e9295..4844dd8 100644
>> --- a/arch/arm/mach-omap2/omap-headsmp.S
>> +++ b/arch/arm/mach-omap2/omap-headsmp.S
>> @@ -22,6 +22,7 @@
>>
>> /* Physical address needed since MMU not enabled yet on secondary core */
>> #define AUX_CORE_BOOT0_PA 0x48281800
>> +#define API_HYP_ENTRY 0x102
>>
>> /*
>> * OMAP5 specific entry point for secondary CPU to jump from ROM
>> @@ -38,6 +39,12 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
>> and r4, r4, #0x0f
>> cmp r0, r4
>> bne wait
>> +#ifdef CONFIG_KVM_ARM_HOST
>> + ldr r12, =API_HYP_ENTRY
>> + adr r0, hyp_boot
>> + smc #0
>> +hyp_boot:
>> +#endif
>> b secondary_startup
>> END(omap5_secondary_startup)
>> /*
>
> hmm, this means that currently running this in a guest will fail to
> bring-up SMP, right?
>
Nope. Because the code under 'KVM_ARM_HOST' macro. Guest build
will not enable CONFIG_KVM_ARM_HOST and things should be fine then.
Right ?
> Couldn't you create a little wrapper-pen in U-Boot instead, which
> replicates the omap boot protocol and takes care of the hyp-mode
> startup there instead, keeping this completely out of the kernel?
>
Its not just booting but CPU hotplug also follows the same path
so we need the mechanism in kernel to switch mode.
In general, I think its important to consider the aspect with
CPU PM. CPUs are not going to go through the boot-loaders in
those paths and hence need of HYP entry in the kernel will
be must.
Regards,
Santosh
Regards,
Santosh
next prev parent reply other threads:[~2013-11-25 16:29 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 0:07 [PATCH 0/2] ARM: OMAP5: Couple of patches for KVM Santosh Shilimkar
2013-11-24 0:07 ` Santosh Shilimkar
2013-11-24 0:07 ` [PATCH 1/2] ARM: dts: OMAP5: Add maintenance interrupt for virtualisation Santosh Shilimkar
2013-11-24 0:07 ` Santosh Shilimkar
2013-11-24 0:38 ` Santosh Shilimkar
2013-11-24 0:38 ` Santosh Shilimkar
2013-11-24 0:07 ` [PATCH 2/2] ARM: OMAP5: Add HYP mode entry support for secondary CPUs Santosh Shilimkar
2013-11-24 0:07 ` Santosh Shilimkar
2013-11-25 15:09 ` Christoffer Dall
2013-11-25 15:09 ` Christoffer Dall
2013-11-25 16:28 ` Santosh Shilimkar [this message]
2013-11-25 16:28 ` Santosh Shilimkar
2013-11-25 16:33 ` Christoffer Dall
2013-11-25 16:33 ` Christoffer Dall
2013-11-25 16:59 ` HYP Kernel boot requirements [Was ...Re: [PATCH 2/2] ARM: OMAP5: Add HYP mode entry support for secondary CPUs] Santosh Shilimkar
2013-11-25 16:59 ` Santosh Shilimkar
2013-11-25 17:28 ` Catalin Marinas
2013-11-25 17:28 ` Catalin Marinas
2013-11-25 19:44 ` HYP Kernel boot requirements Santosh Shilimkar
2013-11-25 19:44 ` Santosh Shilimkar
2013-11-26 14:13 ` Catalin Marinas
2013-11-26 14:13 ` Catalin Marinas
2013-11-26 14:47 ` Santosh Shilimkar
2013-11-26 14:47 ` Santosh Shilimkar
2013-11-26 17:37 ` Dave Martin
2013-11-26 17:37 ` Dave Martin
2013-11-26 21:49 ` Santosh Shilimkar
2013-11-26 21:49 ` Santosh Shilimkar
2013-11-27 14:38 ` Lorenzo Pieralisi
2013-11-27 14:38 ` Lorenzo Pieralisi
2013-11-25 16:42 ` [PATCH 2/2] ARM: OMAP5: Add HYP mode entry support for secondary CPUs Marc Zyngier
2013-11-25 16:42 ` Marc Zyngier
2013-11-25 17:02 ` Santosh Shilimkar
2013-11-25 17:02 ` Santosh Shilimkar
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=52937AB4.1060901@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tony@atomide.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.